diff --git a/Include/Core/Classes/ExchangeOffer.hpp b/Include/Core/Classes/ExchangeOffer.hpp index 0e02d21..cd284c0 100644 --- a/Include/Core/Classes/ExchangeOffer.hpp +++ b/Include/Core/Classes/ExchangeOffer.hpp @@ -17,7 +17,9 @@ namespace Internal std::int32_t GetAmountTraded() const; std::int32_t GetItemID() const; + std::int32_t GetPrice() const; std::int8_t GetProgress() const; + std::int32_t GetSpent() const; std::int32_t GetTotalAmount() const; }; diff --git a/Include/Core/Internal.hpp b/Include/Core/Internal.hpp index 511e408..573d57f 100644 --- a/Include/Core/Internal.hpp +++ b/Include/Core/Internal.hpp @@ -152,6 +152,7 @@ namespace Internal std::int32_t GetLoginState(); std::int32_t GetLoginWindow(); std::int32_t GetMapAngle(); + std::vector GetMapRegions(); std::vector GetMenuActions(); std::int32_t GetMenuCount(); std::int32_t GetMenuHeight(); @@ -253,6 +254,7 @@ namespace Internal Point TileToMainscreen(const Tile& T, std::int32_t X, std::int32_t Y, std::int32_t Z); std::string GetItemName(std::int32_t ID); bool IsItemPlaceholder(std::int32_t ID); + bool IsItemStackable(std::int32_t ID); std::vector GetBlockingWidgetBoxes(); std::int32_t GetHealthPercentage(const Internal::Character& C); std::vector GetWidgets(std::int32_t Container); diff --git a/Include/Core/Types/Point.hpp b/Include/Core/Types/Point.hpp index b7bc949..7517b73 100644 --- a/Include/Core/Types/Point.hpp +++ b/Include/Core/Types/Point.hpp @@ -46,17 +46,17 @@ class Point * @brief Returns the distance from one Point to another * @return The distance from one Point to another */ - double DistanceFrom(Point P) const; + double DistanceFrom(const Point& P) const; /** * @brief Returns True if the Point is inside the passed Box * @return True if the Point is inside the passed Box */ - bool InBox(Box B) const; + bool InBox(const Box& B) const; /** * @brief Returns True if the Point is inside a Circle defined by a starting Point, and Radius * @return True if the Point is inside a Circle defined by a starting Point, and Radius */ - bool InCircle(Point P, std::int32_t Radius) const; + bool InCircle(const Point& P, std::int32_t Radius) const; /** * @brief Returns True if the Point is less than 0, not equal to * @return True if the Point is less than 0, not equal to diff --git a/Include/Core/Types/Tile.hpp b/Include/Core/Types/Tile.hpp index 7ce4e40..6655342 100644 --- a/Include/Core/Types/Tile.hpp +++ b/Include/Core/Types/Tile.hpp @@ -50,7 +50,7 @@ class Tile * @brief Returns the distance from one Tile to another * @return The distance from one Tile to another */ - double DistanceFrom(Tile T) const; + double DistanceFrom(const Tile& T) const; /** * @brief Returns True if the Tile is less than 0, not equal to * @return True if the Tile is less than 0, not equal to diff --git a/Include/Game/Interactable/GroundItem.hpp b/Include/Game/Interactable/GroundItem.hpp index b09aad9..aa3b7ff 100644 --- a/Include/Game/Interactable/GroundItem.hpp +++ b/Include/Game/Interactable/GroundItem.hpp @@ -18,6 +18,7 @@ namespace Interactable private: Tile LocalTile; public: + GroundItem(); GroundItem(const Internal::GroundItem& G); GroundItem(const Internal::GroundItem& G, const Tile& LocalTile); GroundItem(const GroundItem& G); diff --git a/Include/Game/Interfaces/Exchange.hpp b/Include/Game/Interfaces/Exchange.hpp index 17bd475..d54163e 100644 --- a/Include/Game/Interfaces/Exchange.hpp +++ b/Include/Game/Interfaces/Exchange.hpp @@ -40,6 +40,13 @@ class Exchange MODE_UNDEFINED = 3 } SLOT_MODE; + typedef enum COLLECT_METHOD + { + ITEM, + NOTE, + BANK + } COLLECT_METHOD; + static bool IsOpen(); static bool Open(); static bool Close(); @@ -57,9 +64,11 @@ class Exchange static bool OfferOpen(); static bool CloseOffer(); static bool OffersOpen(); - static bool SlotUseble(const Exchange::SLOT Slot); + static bool SlotUsable(const Exchange::SLOT Slot); static bool CanCollect(); - static bool Collect(const bool Inventory = true); + + static bool CollectAll(const bool Inventory = true); + static bool Collect(const Exchange::COLLECT_METHOD Method = Exchange::BANK); static bool IsBuyOfferOpen(); static bool IsSellOfferOpen(); diff --git a/Include/Game/Models/DecorativeObjects.hpp b/Include/Game/Models/DecorativeObjects.hpp index 273b72c..e3a6a14 100644 --- a/Include/Game/Models/DecorativeObjects.hpp +++ b/Include/Game/Models/DecorativeObjects.hpp @@ -13,19 +13,21 @@ class DecorativeObjects { public: + static std::vector GetAllWithin(std::int32_t Distance); + static std::vector GetAll(); - static std::vector GetAll(std::int32_t ID); - static std::vector GetAll(const std::string& Name); - static std::vector GetAll(const std::vector& IDs); - static std::vector GetAll(const std::vector& Names); - static std::vector GetAll(const std::function& Filter); + static std::vector GetAll(std::int32_t ID, std::int32_t Distance = -1); + static std::vector GetAll(const std::string& Name, std::int32_t Distance = -1); + static std::vector GetAll(const std::vector& IDs, std::int32_t Distance = -1); + static std::vector GetAll(const std::vector& Names, std::int32_t Distance = -1); + static std::vector GetAll(const std::function& Filter, std::int32_t Distance = -1); static Interactable::DecorativeObject Get(const Tile& T); - static Interactable::DecorativeObject Get(std::int32_t ID); - static Interactable::DecorativeObject Get(const std::string& Name); - static Interactable::DecorativeObject Get(const std::vector& IDs); - static Interactable::DecorativeObject Get(const std::vector& Names); - static Interactable::DecorativeObject Get(const std::function& Filter); + static Interactable::DecorativeObject Get(std::int32_t ID, std::int32_t Distance = -1); + static Interactable::DecorativeObject Get(const std::string& Name, std::int32_t Distance = -1); + static Interactable::DecorativeObject Get(const std::vector& IDs, std::int32_t Distance = -1); + static Interactable::DecorativeObject Get(const std::vector& Names, std::int32_t Distance = -1); + static Interactable::DecorativeObject Get(const std::function& Filter, std::int32_t Distance = -1); }; /** @} */ diff --git a/Include/Game/Models/GameObjects.hpp b/Include/Game/Models/GameObjects.hpp index 69a84ba..5ddb039 100644 --- a/Include/Game/Models/GameObjects.hpp +++ b/Include/Game/Models/GameObjects.hpp @@ -13,20 +13,22 @@ class GameObjects { public: + static std::vector GetAllWithin(std::int32_t Distance); + static std::vector GetAll(); static std::vector GetAll(const Tile& T); - static std::vector GetAll(std::int32_t ID); - static std::vector GetAll(const std::string& Name); - static std::vector GetAll(const std::vector& IDs); - static std::vector GetAll(const std::vector& Names); - static std::vector GetAll(const std::function& Filter); + static std::vector GetAll(std::int32_t ID, std::int32_t Distance = -1); + static std::vector GetAll(const std::string& Name, std::int32_t Distance = -1); + static std::vector GetAll(const std::vector& IDs, std::int32_t Distance = -1); + static std::vector GetAll(const std::vector& Names, std::int32_t Distance = -1); + static std::vector GetAll(const std::function& Filter, std::int32_t Distance = -1); static Interactable::GameObject Get(const Tile& T); - static Interactable::GameObject Get(std::int32_t ID); - static Interactable::GameObject Get(const std::string& Name); - static Interactable::GameObject Get(const std::vector& IDs); - static Interactable::GameObject Get(const std::vector& Names); - static Interactable::GameObject Get(const std::function& Filter); + static Interactable::GameObject Get(std::int32_t ID, std::int32_t Distance = -1); + static Interactable::GameObject Get(const std::string& Name, std::int32_t Distance = -1); + static Interactable::GameObject Get(const std::vector& IDs, std::int32_t Distance = -1); + static Interactable::GameObject Get(const std::vector& Names, std::int32_t Distance = -1); + static Interactable::GameObject Get(const std::function& Filter, std::int32_t Distance = -1); }; /** @} */ diff --git a/Include/Game/Models/GroundItems.hpp b/Include/Game/Models/GroundItems.hpp index 1d2fe8c..754dcb7 100644 --- a/Include/Game/Models/GroundItems.hpp +++ b/Include/Game/Models/GroundItems.hpp @@ -13,20 +13,22 @@ class GroundItems { public: + static std::vector GetAllWithin(std::int32_t Distance); + static std::vector GetAll(); static std::vector GetAll(const Tile& T); - static std::vector GetAll(std::int32_t ID); - static std::vector GetAll(const std::string& Name); - static std::vector GetAll(const std::vector& IDs); - static std::vector GetAll(const std::vector& Names); - static std::vector GetAll(const std::function& Filter); + static std::vector GetAll(std::int32_t ID, std::int32_t Distance = -1); + static std::vector GetAll(const std::string& Name, std::int32_t Distance = -1); + static std::vector GetAll(const std::vector& IDs, std::int32_t Distance = -1); + static std::vector GetAll(const std::vector& Names, std::int32_t Distance = -1); + static std::vector GetAll(const std::function& Filter, std::int32_t Distance = -1); static Interactable::GroundItem Get(const Tile& T); - static Interactable::GroundItem Get(std::int32_t ID); - static Interactable::GroundItem Get(const std::string& Name); - static Interactable::GroundItem Get(const std::vector& IDs); - static Interactable::GroundItem Get(const std::vector& Names); - static Interactable::GroundItem Get(const std::function& Filter); + static Interactable::GroundItem Get(std::int32_t ID, std::int32_t Distance = -1); + static Interactable::GroundItem Get(const std::string& Name, std::int32_t Distance = -1); + static Interactable::GroundItem Get(const std::vector& IDs, std::int32_t Distance = -1); + static Interactable::GroundItem Get(const std::vector& Names, std::int32_t Distance = -1); + static Interactable::GroundItem Get(const std::function& Filter, std::int32_t Distance = -1); }; /** @} */ diff --git a/Include/Game/Models/GroundObjects.hpp b/Include/Game/Models/GroundObjects.hpp index 5321d2f..79cecc6 100644 --- a/Include/Game/Models/GroundObjects.hpp +++ b/Include/Game/Models/GroundObjects.hpp @@ -13,19 +13,21 @@ class GroundObjects { public: + static std::vector GetAllWithin(std::int32_t Distance); + static std::vector GetAll(); - static std::vector GetAll(std::int32_t ID); - static std::vector GetAll(const std::string& Name); - static std::vector GetAll(const std::vector& IDs); - static std::vector GetAll(const std::vector& Names); - static std::vector GetAll(const std::function& Filter); + static std::vector GetAll(std::int32_t ID, std::int32_t Distance = -1); + static std::vector GetAll(const std::string& Name, std::int32_t Distance = -1); + static std::vector GetAll(const std::vector& IDs, std::int32_t Distance = -1); + static std::vector GetAll(const std::vector& Names, std::int32_t Distance = -1); + static std::vector GetAll(const std::function& Filter, std::int32_t Distance = -1); static Interactable::GroundObject Get(const Tile& T); - static Interactable::GroundObject Get(std::int32_t ID); - static Interactable::GroundObject Get(const std::string& Name); - static Interactable::GroundObject Get(const std::vector& IDs); - static Interactable::GroundObject Get(const std::vector& Names); - static Interactable::GroundObject Get(const std::function& Filter); + static Interactable::GroundObject Get(std::int32_t ID, std::int32_t Distance = -1); + static Interactable::GroundObject Get(const std::string& Name, std::int32_t Distance = -1); + static Interactable::GroundObject Get(const std::vector& IDs, std::int32_t Distance = -1); + static Interactable::GroundObject Get(const std::vector& Names, std::int32_t Distance = -1); + static Interactable::GroundObject Get(const std::function& Filter, std::int32_t Distance = -1); }; /** @} */ diff --git a/Include/Game/Models/NPCs.hpp b/Include/Game/Models/NPCs.hpp index f293f75..3b0e9c5 100644 --- a/Include/Game/Models/NPCs.hpp +++ b/Include/Game/Models/NPCs.hpp @@ -14,20 +14,22 @@ class NPCs { public: - static std::vector GetAll(); - static std::vector GetAll(const Tile& Tile); - static std::vector GetAll(std::int32_t ID); - static std::vector GetAll(const std::string& Name); - static std::vector GetAll(const std::vector& IDs); - static std::vector GetAll(const std::vector& Names); - static std::vector GetAll(const std::function& Filter); + static std::vector GetAllWithin(std::int32_t Distance); - static Interactable::NPC Get(const Tile& Tile); - static Interactable::NPC Get(std::int32_t ID); - static Interactable::NPC Get(const std::string& Name); - static Interactable::NPC Get(const std::vector& IDs); - static Interactable::NPC Get(const std::vector& Names); - static Interactable::NPC Get(const std::function& Filter); + static std::vector GetAll(); + static std::vector GetAll(const Tile& T); + static std::vector GetAll(std::int32_t ID, std::int32_t Distance = -1); + static std::vector GetAll(const std::string& Name, std::int32_t Distance = -1); + static std::vector GetAll(const std::vector& IDs, std::int32_t Distance = -1); + static std::vector GetAll(const std::vector& Names, std::int32_t Distance = -1); + static std::vector GetAll(const std::function& Filter, std::int32_t Distance = -1); + + static Interactable::NPC Get(const Tile& T); + static Interactable::NPC Get(std::int32_t ID, std::int32_t Distance = -1); + static Interactable::NPC Get(const std::string& Name, std::int32_t Distance = -1); + static Interactable::NPC Get(const std::vector& IDs, std::int32_t Distance = -1); + static Interactable::NPC Get(const std::vector& Names, std::int32_t Distance = -1); + static Interactable::NPC Get(const std::function& Filter, std::int32_t Distance = -1); }; /** @} */ diff --git a/Include/Game/Models/Players.hpp b/Include/Game/Models/Players.hpp index 2b68453..19389b6 100644 --- a/Include/Game/Models/Players.hpp +++ b/Include/Game/Models/Players.hpp @@ -14,16 +14,18 @@ class Players public: static Interactable::Player GetLocal(); + static std::vector GetAllWithin(std::int32_t Distance); + static std::vector GetAll(); static std::vector GetAll(const Tile& Tile); - static std::vector GetAll(const std::string& Name); - static std::vector GetAll(const std::vector& Names); - static std::vector GetAll(const std::function& Filter); + static std::vector GetAll(const std::string& Name, std::int32_t Distance = -1); + static std::vector GetAll(const std::vector& Names, std::int32_t Distance = -1); + static std::vector GetAll(const std::function& Filter, std::int32_t Distance = -1); static Interactable::Player Get(const Tile& Tile); - static Interactable::Player Get(const std::string& Name); - static Interactable::Player Get(const std::vector& Names); - static Interactable::Player Get(const std::function& Filter); + static Interactable::Player Get(const std::string& Name, std::int32_t Distance = -1); + static Interactable::Player Get(const std::vector& Names, std::int32_t Distance = -1); + static Interactable::Player Get(const std::function& Filter, std::int32_t Distance = -1); }; /** @} */ diff --git a/Include/Game/Models/WallObjects.hpp b/Include/Game/Models/WallObjects.hpp index 98b35ae..fae4c38 100644 --- a/Include/Game/Models/WallObjects.hpp +++ b/Include/Game/Models/WallObjects.hpp @@ -13,19 +13,21 @@ class WallObjects { public: + static std::vector GetAllWithin(std::int32_t Distance); + static std::vector GetAll(); - static std::vector GetAll(std::int32_t ID); - static std::vector GetAll(const std::string& Name); - static std::vector GetAll(const std::vector& IDs); - static std::vector GetAll(const std::vector& Names); - static std::vector GetAll(const std::function& Filter); + static std::vector GetAll(std::int32_t ID, std::int32_t Distance = -1); + static std::vector GetAll(const std::string& Name, std::int32_t Distance = -1); + static std::vector GetAll(const std::vector& IDs, std::int32_t Distance = -1); + static std::vector GetAll(const std::vector& Names, std::int32_t Distance = -1); + static std::vector GetAll(const std::function& Filter, std::int32_t Distance = -1); static Interactable::WallObject Get(const Tile& T); - static Interactable::WallObject Get(std::int32_t ID); - static Interactable::WallObject Get(const std::string& Name); - static Interactable::WallObject Get(const std::vector& IDs); - static Interactable::WallObject Get(const std::vector& Names); - static Interactable::WallObject Get(const std::function& Filter); + static Interactable::WallObject Get(std::int32_t ID, std::int32_t Distance = -1); + static Interactable::WallObject Get(const std::string& Name, std::int32_t Distance = -1); + static Interactable::WallObject Get(const std::vector& IDs, std::int32_t Distance = -1); + static Interactable::WallObject Get(const std::vector& Names, std::int32_t Distance = -1); + static Interactable::WallObject Get(const std::function& Filter, std::int32_t Distance = -1); }; /** @} */ diff --git a/Library/libAlpacaLibrary.a b/Library/libAlpacaLibrary.a index 29daf70..cb08d63 100644 Binary files a/Library/libAlpacaLibrary.a and b/Library/libAlpacaLibrary.a differ