diff --git a/Include/Core/Classes/CollisionData.hpp b/Include/Core/Classes/CollisionData.hpp index 5952945..1788fef 100644 --- a/Include/Core/Classes/CollisionData.hpp +++ b/Include/Core/Classes/CollisionData.hpp @@ -20,8 +20,8 @@ namespace Internal CollisionData& operator=(const CollisionData& Obj) = default; static Class GetClass(); - std::vector> GetFlags() const; + std::int32_t GetFlag(std::int32_t X, std::int32_t Y) const; std::int32_t GetHeight() const; std::int32_t GetWidth() const; std::int32_t GetX() const; diff --git a/Include/Core/Classes/Occluder.hpp b/Include/Core/Classes/Occluder.hpp new file mode 100644 index 0000000..dc9b283 --- /dev/null +++ b/Include/Core/Classes/Occluder.hpp @@ -0,0 +1,31 @@ +#ifndef OCCLUDER_HPP_INCLUDED +#define OCCLUDER_HPP_INCLUDED + +#include "../JavaClass/Class.hpp" +#include +#include + +namespace Internal +{ + class Occluder : public Object + { + public: + Occluder(const void* Obj); + + Occluder() = default; + Occluder(Occluder&& Obj) = default; + Occluder(const Occluder& Obj) = default; + Occluder& operator=(Occluder&& Obj) = default; + Occluder& operator=(const Occluder& Obj) = default; + + static Class GetClass(); + + std::int32_t GetMaxTileX() const; + std::int32_t GetMaxTileY() const; + std::int32_t GetMinTileX() const; + std::int32_t GetMinTileY() const; + + }; +} + +#endif // OCCLUDER_HPP_INCLUDED diff --git a/Include/Core/Classes/PlayerUpdater.hpp b/Include/Core/Classes/PlayerUpdater.hpp new file mode 100644 index 0000000..9803bef --- /dev/null +++ b/Include/Core/Classes/PlayerUpdater.hpp @@ -0,0 +1,29 @@ +#ifndef PLAYERUPDATER_HPP_INCLUDED +#define PLAYERUPDATER_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include + +namespace Internal +{ + class PlayerUpdater : public Object + { + public: + PlayerUpdater(const void* Obj); + + PlayerUpdater() = default; + PlayerUpdater(PlayerUpdater&& Obj) = default; + PlayerUpdater(const PlayerUpdater& Obj) = default; + PlayerUpdater& operator=(PlayerUpdater&& Obj) = default; + PlayerUpdater& operator=(const PlayerUpdater& Obj) = default; + + static Class GetClass(); + + std::int32_t GetPlayerCount() const; + std::vector GetPlayerIndices() const; + + }; +} + +#endif // PLAYERUPDATER_HPP_INCLUDED diff --git a/Include/Core/Classes/Region.hpp b/Include/Core/Classes/Region.hpp index eb509e9..f0704b8 100644 --- a/Include/Core/Classes/Region.hpp +++ b/Include/Core/Classes/Region.hpp @@ -6,6 +6,7 @@ #include #include "GameObject.hpp" #include "SceneTile.hpp" +#include "Occluder.hpp" namespace Internal { @@ -25,10 +26,12 @@ namespace Internal std::int32_t GetEntityCount() const; std::vector GetGameObjects() const; GameObject GetGameObjects(std::int32_t I) const; + std::vector GetPlaneOccluderCount() const; + std::vector> GetPlaneOccluders() const; + std::vector GetPlaneOccluders(std::int32_t Plane) const; std::vector>> GetSceneTiles() const; std::vector> GetSceneTiles(std::int32_t Plane) const; SceneTile GetSceneTiles(std::int32_t X, std::int32_t Y, std::int32_t Plane) const; - }; } diff --git a/Include/Core/Classes/RegionContainer.hpp b/Include/Core/Classes/RegionContainer.hpp new file mode 100644 index 0000000..838c0d2 --- /dev/null +++ b/Include/Core/Classes/RegionContainer.hpp @@ -0,0 +1,56 @@ +#ifndef REGIONCONTAINER_HPP_INCLUDED +#define REGIONCONTAINER_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include +#include "Renderable.hpp" +#include +#include "CollisionData.hpp" +#include "Deque.hpp" +#include "NPC.hpp" +#include "PlayerUpdater.hpp" +#include "Player.hpp" +#include "Region.hpp" + +namespace Internal +{ + class RegionContainer : public Object + { + public: + RegionContainer(const void* Obj); + + RegionContainer() = default; + RegionContainer(RegionContainer&& Obj) = default; + RegionContainer(const RegionContainer& Obj) = default; + RegionContainer& operator=(RegionContainer&& Obj) = default; + RegionContainer& operator=(const RegionContainer& Obj) = default; + + static Class GetClass(); + + std::int32_t GetClientPlane() const; + std::int32_t GetClientX() const; + std::int32_t GetClientY() const; + std::vector GetCollisionMaps() const; + CollisionData GetCollisionMap(std::int32_t Plane) const; + Deque GetGraphicsObjects() const; + std::vector>> GetGroundItems() const; + std::vector> GetGroundItems(std::int32_t Plane) const; + Deque GetGroundItems(std::int32_t X, std::int32_t Y, std::int32_t Plane) const; + std::int32_t GetNPCCount() const; + std::vector GetNPCIndices() const; + std::vector GetNPCs() const; + NPC GetNPC(std::int32_t Index) const; + PlayerUpdater GetPlayerUpdater() const; + std::vector GetPlayers() const; + Player GetPlayer(std::int32_t Index) const; + Deque GetProjectiles() const; + Region GetRegion() const; + std::vector>> GetTileHeights() const; + std::int32_t GetTileHeights(std::int32_t X, std::int32_t Y, std::int32_t Plane) const; + std::vector>> GetTileSettings() const; + std::int8_t GetTileSettings(std::int32_t X, std::int32_t Y, std::int32_t Plane) const; + }; +} + +#endif // REGIONCONTAINER_HPP_INCLUDED diff --git a/Include/Core/Internal.hpp b/Include/Core/Internal.hpp index 93900d8..59bbb79 100644 --- a/Include/Core/Internal.hpp +++ b/Include/Core/Internal.hpp @@ -58,6 +58,7 @@ #include "Classes/FontName.hpp" #include "Classes/Fonts.hpp" #include "Classes/Frame.hpp" +#include "Classes/FrameAngles.hpp" #include "Classes/Frames.hpp" #include "Classes/Friend.hpp" #include "Classes/FriendList.hpp" @@ -67,7 +68,6 @@ #include "Classes/GraphicsObject.hpp" #include "Classes/GroundItem.hpp" #include "Classes/GroundObject.hpp" -#include "Classes/ItemLayer.hpp" #include "Classes/HashTable.hpp" #include "Classes/HealthBar.hpp" #include "Classes/HealthInfo.hpp" @@ -77,10 +77,12 @@ #include "Classes/IntegerNode.hpp" #include "Classes/ItemContainer.hpp" #include "Classes/ItemInfo.hpp" +#include "Classes/ItemLayer.hpp" #include "Classes/IterableHashTable.hpp" #include "Classes/IterableQueue.hpp" #include "Classes/KeyListen.hpp" #include "Classes/LinkedList.hpp" +#include "Classes/Matrix.hpp" #include "Classes/MessageNode.hpp" #include "Classes/Model.hpp" #include "Classes/ModelInfo.hpp" @@ -92,14 +94,18 @@ #include "Classes/NPCInfo.hpp" #include "Classes/ObjectInfo.hpp" #include "Classes/ObjectNode.hpp" +#include "Classes/Occluder.hpp" #include "Classes/ParameterInfo.hpp" #include "Classes/Player.hpp" #include "Classes/PlayerInfo.hpp" #include "Classes/PlayerManager.hpp" +#include "Classes/PlayerUpdater.hpp" #include "Classes/Preferences.hpp" #include "Classes/Projectile.hpp" #include "Classes/Queue.hpp" +#include "Classes/Rasterizer2D.hpp" #include "Classes/Region.hpp" +#include "Classes/RegionContainer.hpp" #include "Classes/Renderable.hpp" #include "Classes/SceneTile.hpp" #include "Classes/Skin.hpp" @@ -131,17 +137,13 @@ namespace Internal std::int32_t GetCameraZ(); std::int16_t GetCameraZoom(); Map GetChatLineCache(); + Widget GetClickedWidget(); Map GetClientFonts(); std::vector GetClientKeyCodes(); - std::int32_t GetClientPlane(); Preferences GetClientPreferences(); - std::int32_t GetClientX(); - std::int32_t GetClientY(); - std::vector GetCollisionMaps(); std::int32_t GetCrosshairState(); std::vector GetCurrentLevels(); std::int32_t GetCurrentWorld(); - Widget GetDraggingWidget(); std::int32_t GetDraggingItemDuration(); Cache GetDynamicObjectCache(); std::vector GetExchangeOffers(); @@ -151,8 +153,6 @@ namespace Internal Cache GetAnimationSetCache(); std::int32_t GetGameState(); std::int32_t GetGameTick(); - Deque GetGraphicsObjects(); - std::vector>> GetGroundItems(); std::int32_t GetHintArrowNPCIndex(); std::int32_t GetHintArrowOffsetX(); std::int32_t GetHintArrowOffsetY(); @@ -178,7 +178,7 @@ namespace Internal Player GetLocalPlayer(); std::int32_t GetLocalPlayerIndex(); PlayerManager GetLocalPlayerManager(); - Region GetLocalRegion(); + RegionContainer GetLocalRegionContainer(); WidgetGroup GetLocalWidgetGroup(); std::int32_t GetLoginAccountState(); std::int32_t GetLoginCaret(); @@ -202,30 +202,21 @@ namespace Internal std::int32_t GetMouseX(); std::int32_t GetMouseY(); AttackOption GetNPCAttackOption(); - std::int32_t GetNPCCount(); IndexableData GetNPCIndexableData(); - std::vector GetNPCIndices(); Cache GetNPCInfoCache(); Cache GetNPCModelCache(); - std::vector GetNPCs(); IndexableData GetObjectIndexableData(); Cache GetObjectInfoCache(); Cache GetParameterInfoCache(); std::string GetPassword(); AttackOption GetPlayerAttackOption(); - std::int32_t GetPlayerCount(); - std::vector GetPlayerIndices(); Cache GetPlayerModelCache(); - std::vector GetPlayers(); - Deque GetProjectiles(); std::int32_t GetRunEnergy(); bool GetSelected(); std::string GetSelectedText(); std::vector GetSettings(); Cache GetSpotAnimationCache(); Cache GetSpotAnimationModelCache(); - std::vector>> GetTileHeights(); - std::vector>> GetTileSettings(); std::string GetUsername(); IndexableData GetVarbitIndexableData(); Cache GetVarbitInfoCache(); @@ -233,9 +224,7 @@ namespace Internal std::int32_t GetViewportHeight(); std::int32_t GetViewportScale(); std::int32_t GetViewportWidth(); - std::vector>>> GetVisibilityMap(); std::int32_t GetWeight(); - HashTable GetWidgetNodeCache(); std::int32_t GetWidgetRoot(); std::vector GetWidgetsHeight(); @@ -266,8 +255,6 @@ namespace Internal Box GetWidgetBox(const Widget& W); Box GetWidgetBox(const Widget& W, const std::vector& Xs, const std::vector& Ys); ItemContainer GetItemContainer(std::int32_t ID); - NPC GetNPC(std::int32_t Index); - Player GetPlayer(std::int32_t Index); std::int32_t GetTileHeight(std::int32_t X, std::int32_t Y, std::int32_t Z); std::vector ProjectModel(const Model& M, std::int32_t LocalX, std::int32_t LocalY, std::int32_t LocalZ, std::int32_t Angle); @@ -286,9 +273,7 @@ namespace Internal Model GetDecorativeObjectModel(const DecorativeObject& O); Model GetGroundObjectModel(const GroundObject& O); Model GetDynamicObjectModel(std::int32_t ID); - std::vector> GetGroundItems(std::int32_t Plane); - Deque GetGroundItems(std::int32_t X, std::int32_t Y); - Deque GetGroundItems(std::int32_t X, std::int32_t Y, std::int32_t Plane); + std::int32_t GetInstanceChunkTemplates(std::int32_t X, std::int32_t Y, std::int32_t Plane); std::vector GetPlayerModel(const Player& P); std::vector GetNPCModel(const NPC& N); @@ -317,12 +302,7 @@ namespace Internal std::int32_t GetItemNoteRedirect(std::int32_t ID); double GetHealthPercentage(const Internal::Character& C); - 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); - std::int32_t GetTileHeights(std::int32_t X, std::int32_t Y, std::int32_t Plane); - std::int8_t GetTileSettings(std::int32_t X, std::int32_t Y, std::int32_t Plane); - std::int32_t GetCollisionFlags(std::int32_t X, std::int32_t Y, std::int32_t Plane); + //std::vector> GetVisibilityMap(std::int32_t CameraPitch, std::int32_t CameraYaw); std::vector ToByteArray(const Object& O); std::vector GetKeysPressed(); std::int32_t GetGraphicsID(const Internal::Character& C); @@ -332,6 +312,31 @@ namespace Internal std::vector> GetWidgets(); std::vector GetWidgets(std::int32_t Container); Widget GetWidget(std::int32_t Container, std::int32_t Component); + std::int32_t GetClientPlane(); + std::int32_t GetClientX(); + std::int32_t GetClientY(); + std::vector GetCollisionMaps(); + Deque GetGraphicsObjects(); + std::vector>> GetGroundItems(); + Region GetLocalRegion(); + std::int32_t GetNPCCount(); + std::vector GetNPCIndices(); + std::vector GetNPCs(); + std::int32_t GetPlayerCount(); + std::vector GetPlayerIndices(); + std::vector GetPlayers(); + Deque GetProjectiles(); + std::vector>> GetTileHeights(); + std::vector>> GetTileSettings(); + CollisionData GetCollisionMap(std::int32_t Plane); + std::vector> GetGroundItems(std::int32_t Plane); + Deque GetGroundItems(std::int32_t X, std::int32_t Y); + Deque GetGroundItems(std::int32_t X, std::int32_t Y, std::int32_t Plane); + NPC GetNPC(std::int32_t Index); + Player GetPlayer(std::int32_t Index); + std::int32_t GetTileHeights(std::int32_t X, std::int32_t Y, std::int32_t Plane); + std::int8_t GetTileSettings(std::int32_t X, std::int32_t Y, std::int32_t Plane); + std::int32_t GetCollisionFlags(std::int32_t X, std::int32_t Y, std::int32_t Plane); void LockUpdate(); void UnlockUpdate(); diff --git a/Include/Game/Core.hpp b/Include/Game/Core.hpp index 1e3d3ba..d816ec7 100644 --- a/Include/Game/Core.hpp +++ b/Include/Game/Core.hpp @@ -3,6 +3,8 @@ #include "../Core/Internal.hpp" +#include "Globals.hpp" + #include "Tools/BreakHandler.hpp" #include "Tools/Interact.hpp" #include "Tools/Profile.hpp" diff --git a/Include/Game/Globals.hpp b/Include/Game/Globals.hpp index f5cc040..30cf215 100644 --- a/Include/Game/Globals.hpp +++ b/Include/Game/Globals.hpp @@ -87,6 +87,10 @@ namespace Globals const WidgetDef BANK_ENTER_PIN_STATUS = { BANK_ENTER_PIN_PARENT, 10 }; // Text widget, has FIRST, SECOND, THIRD, FOURTH, Submitting in it const std::int32_t BANK_ENTER_PIN_BUTTON_CHILDREN[10] = { 16, 18, 20, 22, 24, 26, 28, 30, 32, 34 }; // Buttons themselves, uses BANK_ENTER_PIN_PARENT, + const WidgetDef BANK_WARNING_SPACE_NOTNOW = { 289, 7, 8 }; + const WidgetDef BANK_WARNING_SPACE_NOTNOW_HOVER = { 289, 7, 9 }; + + // grandchild 0 = proper widget bounds, grandchild 1 = text //************ Chat.cpp ************// @@ -112,17 +116,17 @@ 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, 25, 19}; - const WidgetDef EXCHANGE_ITEM = { EXCHANGE_PARENT, 25, 21 }; + const WidgetDef EXCHANGE_SPRITE_TYPE = { EXCHANGE_PARENT, 25, 21}; + const WidgetDef EXCHANGE_ITEM = { EXCHANGE_PARENT, 25, 23 }; 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, 24, 2 }; const WidgetDef EXCHANGE_COLLECT_SLOT_TWO = { EXCHANGE_PARENT, 24, 3 }; - 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_AMOUNT = { EXCHANGE_PARENT, 25, 51 }; + const WidgetDef EXCHANGE_PRICE = { EXCHANGE_PARENT, 25, 54 }; + const WidgetDef EXCHANGE_GUIDE = { EXCHANGE_PARENT, 25, 53 }; + const WidgetDef EXCHANGE_CONFIRM = { EXCHANGE_PARENT, 25, 58 }; const WidgetDef EXCHANGE_ABORT = { EXCHANGE_PARENT, 23, 0 }; const WidgetDef EXCHANGE_CHAT = { 162, 41 }; diff --git a/Include/Game/Interfaces/Bank.hpp b/Include/Game/Interfaces/Bank.hpp index 56a99d2..a59aa8b 100644 --- a/Include/Game/Interfaces/Bank.hpp +++ b/Include/Game/Interfaces/Bank.hpp @@ -118,6 +118,9 @@ namespace Bank bool IsEnterPinOpen(); bool EnterPin(bool TerminateOnError = true); + bool IsWarningOpen(); + bool CloseWarning(); + std::int32_t GetDefaultWithdrawQuantity(); bool SetDefaultWithdrawQuantity(std::int32_t Amount); } diff --git a/Library/libAlpacaLibrary.a b/Library/libAlpacaLibrary.a index 45e14ce..79297b1 100644 Binary files a/Library/libAlpacaLibrary.a and b/Library/libAlpacaLibrary.a differ