diff --git a/Include/Core/Classes/WidgetGroup.hpp b/Include/Core/Classes/WidgetGroup.hpp new file mode 100644 index 0000000..2e1451f --- /dev/null +++ b/Include/Core/Classes/WidgetGroup.hpp @@ -0,0 +1,32 @@ +#ifndef WIDGETGROUP_HPP_INCLUDED +#define WIDGETGROUP_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include "Cache.hpp" +#include "Widget.hpp" + +namespace Internal +{ + class WidgetGroup : public Object + { + public: + WidgetGroup(const void* Obj); + + WidgetGroup() = default; + WidgetGroup(WidgetGroup&& Obj) = default; + WidgetGroup(const WidgetGroup& Obj) = default; + WidgetGroup& operator=(WidgetGroup&& Obj) = default; + WidgetGroup& operator=(const WidgetGroup& Obj) = default; + + static Class GetClass(); + + Cache GetWidgetFontCache() const; + std::vector> GetWidgets() const; + std::vector GetWidgets(std::int32_t I) const; + Widget GetWidgets(std::int32_t I, std::int32_t II) const; + + }; +} + +#endif // WIDGETGROUP_HPP_INCLUDED diff --git a/Include/Core/Internal.hpp b/Include/Core/Internal.hpp index 2b79813..b85f412 100644 --- a/Include/Core/Internal.hpp +++ b/Include/Core/Internal.hpp @@ -111,6 +111,7 @@ #include "Classes/VarbitInfo.hpp" #include "Classes/WallObject.hpp" #include "Classes/Widget.hpp" +#include "Classes/WidgetGroup.hpp" #include "Classes/WidgetNode.hpp" #include "Classes/World.hpp" @@ -178,6 +179,7 @@ namespace Internal std::int32_t GetLocalPlayerIndex(); PlayerManager GetLocalPlayerManager(); Region GetLocalRegion(); + WidgetGroup GetLocalWidgetGroup(); std::int32_t GetLoginAccountState(); std::int32_t GetLoginCaret(); std::string GetLoginMessage0(); @@ -233,10 +235,9 @@ namespace Internal std::int32_t GetViewportWidth(); std::vector>>> GetVisibilityMap(); std::int32_t GetWeight(); - Cache GetWidgetFontCache(); + HashTable GetWidgetNodeCache(); std::int32_t GetWidgetRoot(); - std::vector> GetWidgets(); std::vector GetWidgetsHeight(); std::vector GetWidgetsWidth(); std::vector GetWidgetsX(); @@ -255,7 +256,7 @@ namespace Internal NPCInfo GetNPCInfo(std::int32_t ID); ObjectInfo GetObjectInfo(std::int32_t ID); ObjectInfo GetObjectInfo(std::int32_t ID, const std::vector& Buckets); - Widget GetWidget(std::int32_t Container, std::int32_t Component); + Widget GetWidgetParent(const Widget& W); std::int32_t GetWidgetX(const Widget& W); std::int32_t GetWidgetX(const Widget& W, const std::vector& Xs); @@ -312,8 +313,10 @@ namespace Internal std::int32_t GetVarbit(std::int32_t ID); bool IsItemPlaceholder(std::int32_t ID); bool IsItemStackable(std::int32_t ID); + bool IsItemNoted(std::int32_t ID); + std::int32_t GetItemNoteRedirect(std::int32_t ID); double GetHealthPercentage(const Internal::Character& C); - std::vector GetWidgets(std::int32_t Container); + CollisionData GetCollisionMap(std::int32_t Plane); std::int8_t GetKeyPressed(std::int32_t Index); std::vector> GetVisibilityMap(std::int32_t CameraPitch, std::int32_t CameraYaw); @@ -325,5 +328,10 @@ namespace Internal std::int32_t GetGraphicsID(const Internal::Character& C); std::int32_t GetGraphicsFrame(const Internal::Character& C); + Cache GetWidgetFontCache(); + std::vector> GetWidgets(); + std::vector GetWidgets(std::int32_t Container); + Widget GetWidget(std::int32_t Container, std::int32_t Component); + } #endif // INTERNAL_HPP_INCLUDED diff --git a/Include/Game/Globals.hpp b/Include/Game/Globals.hpp index f352547..edaabe0 100644 --- a/Include/Game/Globals.hpp +++ b/Include/Game/Globals.hpp @@ -112,20 +112,22 @@ namespace Globals const WidgetDef EXCHANGE_MAIN = { EXCHANGE_PARENT, 0 }; const WidgetDef EXCHANGE_BACK = { EXCHANGE_PARENT, 4 }; const WidgetDef EXCHANGE_CLOSE = { EXCHANGE_PARENT, 2, 11 }; - const WidgetDef EXCHANGE_SPRITE_TYPE = { EXCHANGE_PARENT, 24, 19}; - const WidgetDef EXCHANGE_ITEM = { EXCHANGE_PARENT, 24, 21 }; + const WidgetDef EXCHANGE_SPRITE_TYPE = { EXCHANGE_PARENT, 25, 19}; + const WidgetDef EXCHANGE_ITEM = { EXCHANGE_PARENT, 25, 21 }; + const WidgetDef EXCHANGE_ITEM_GUIDE_PRICE = { EXCHANGE_PARENT, 27}; const WidgetDef EXCHANGE_COLLECT_CONTAINER_WIDGET = { EXCHANGE_PARENT, 6, 1 }; - const WidgetDef EXCHANGE_COLLECT_SLOT_ONE = { EXCHANGE_PARENT, 23, 2 }; - const WidgetDef EXCHANGE_COLLECT_SLOT_TWO = { EXCHANGE_PARENT, 23, 3 }; - const WidgetDef EXCHANGE_AMOUNT = { EXCHANGE_PARENT, 24, 7 }; - const WidgetDef EXCHANGE_PRICE = { EXCHANGE_PARENT, 24, 12 }; - const WidgetDef EXCHANGE_GUIDE = { EXCHANGE_PARENT, 24, 11}; - const WidgetDef EXCHANGE_CONFIRM = { EXCHANGE_PARENT, 27, 0 }; - const WidgetDef EXCHANGE_ABORT = { EXCHANGE_PARENT, 22, 0 }; + const WidgetDef EXCHANGE_COLLECT_SLOT_ONE = { EXCHANGE_PARENT, 24, 2 }; + const WidgetDef EXCHANGE_COLLECT_SLOT_TWO = { EXCHANGE_PARENT, 24, 3 }; - const WidgetDef EXCHANGE_CHAT = { 162, 44 }; - const WidgetDef EXCHANGE_CHAT_ENTER = { 162, 45 }; - const WidgetDef EXCHANGE_CHAT_CHOOSE = { 162, 53 }; + const WidgetDef EXCHANGE_AMOUNT = { EXCHANGE_PARENT, 25, 49 }; + const WidgetDef EXCHANGE_PRICE = { EXCHANGE_PARENT, 25, 52 }; + const WidgetDef EXCHANGE_GUIDE = { EXCHANGE_PARENT, 25, 51}; + const WidgetDef EXCHANGE_CONFIRM = { EXCHANGE_PARENT, 25, 54 }; + const WidgetDef EXCHANGE_ABORT = { EXCHANGE_PARENT, 23, 0 }; + + const WidgetDef EXCHANGE_CHAT = { 162, 41 }; + const WidgetDef EXCHANGE_CHAT_ENTER = { 162, 42 }; + const WidgetDef EXCHANGE_CHAT_CHOOSE = { 162, 50 }; const std::int32_t EXCHANGE_SLOT_START = 7; const std::int32_t EXCHANGE_WIDGET_SPRITE_BUY = 26; // Widget Grandchild diff --git a/Include/Game/Interfaces/Exchange.hpp b/Include/Game/Interfaces/Exchange.hpp index 7dd2845..33e3a99 100644 --- a/Include/Game/Interfaces/Exchange.hpp +++ b/Include/Game/Interfaces/Exchange.hpp @@ -86,11 +86,12 @@ namespace Exchange std::vector GetSellOffers(const std::function& Filter); - bool SetSellItem(const std::string& Name); + bool SetSellItem(const std::string& Name, std::int32_t ID = -1); bool SetSellItem(std::int32_t ID); - bool SetBuyItem(const std::string& Name); + bool SetBuyItem(const std::string& Name, std::int32_t ID = -1); bool SetOfferAmount(std::uint32_t Amount); bool SetOfferPrice(std::uint32_t Price); + std::int32_t GetGuidePrice(); bool SetOfferGuidePrice(); bool ConfirmOffer(); diff --git a/Library/libAlpacaLibrary.a b/Library/libAlpacaLibrary.a index 441b583..6e14b3b 100644 Binary files a/Library/libAlpacaLibrary.a and b/Library/libAlpacaLibrary.a differ