diff --git a/Include/Game/Core.hpp b/Include/Game/Core.hpp index 09a21bb..68d30db 100644 --- a/Include/Game/Core.hpp +++ b/Include/Game/Core.hpp @@ -16,6 +16,7 @@ #include "Interfaces/Bank.hpp" #include "Interfaces/Chat.hpp" #include "Interfaces/DepositBox.hpp" +#include "Interfaces/Exchange.hpp" #include "Interfaces/Login.hpp" #include "Interfaces/Mainscreen.hpp" #include "Interfaces/Makescreen.hpp" diff --git a/Include/Game/Interfaces/Bank.hpp b/Include/Game/Interfaces/Bank.hpp index 90f4d54..77548ad 100644 --- a/Include/Game/Interfaces/Bank.hpp +++ b/Include/Game/Interfaces/Bank.hpp @@ -52,7 +52,6 @@ class Bank static std::vector GetItems(const std::vector& Names); static std::vector GetItems(const std::function& Filter); - static Interactable::Item GetItem(); static Interactable::Item GetItem(std::int32_t ID); static Interactable::Item GetItem(const std::string& Name); static Interactable::Item GetItem(const std::vector& IDs); diff --git a/Include/Game/Interfaces/Exchange.hpp b/Include/Game/Interfaces/Exchange.hpp new file mode 100644 index 0000000..9b330ee --- /dev/null +++ b/Include/Game/Interfaces/Exchange.hpp @@ -0,0 +1,56 @@ +#ifndef EXCHANGE_HPP_INCLUDED +#define EXCHANGE_HPP_INCLUDED + +#include +#include +#include + +/** @addtogroup Interfaces +* @{ */ +class Exchange +{ + public: + + typedef enum SLOT_STATE + { + EMPTY = 0, + STARTING_BUY_OFFER = 1, + BUY_OFFER_INCOMPLETE = 2, + BUY_OFFER_UPDATING = 3, + BUY_OFFER_CANCELING = 4, + BUY_OFFER_COMPLETE = 5, + STARTING_SELL_OFFER = 9, + SELL_OFFER_INCOMPLETE = 10, + SELL_OFFER_UPDATING = 11, + SELL_OFFER_CANCELING = 12, + SELL_OFFER_COMPLETE = 13, + STATE_UNDEFINED = 14 + } SLOT_STATE; + + typedef enum SLOT_MODE + { + BUY = 0, + SELL = 1, + MODE_UNDEFINED = 2 + } SLOT_MODE; + + static bool IsOpen(); + static bool Close(); + static SLOT_STATE GetSlotState(const std::uint32_t Slot); + static bool SlotOccupied(const std::uint32_t Slot); + static std::vector GetAllSlotStates(); + static bool AllSlotsOccupied(); + static std::int32_t GetCurrentSlotIndex(); + static SLOT_MODE GetCurrentSlotMode(); + static std::int32_t GetCurrentSlotItemID(); + static std::string GetCurrentSlotItemName(); + static std::int32_t GetCurrentSlotAmount(); + static std::int32_t GetCurrentSlotPrice(); + static bool OfferOpen(); + static bool CloseOffer(); + +}; + +/** @} */ + +#endif // EXCHANGE_HPP_INCLUDED diff --git a/Include/Game/Interfaces/GameTabs/Equipment.hpp b/Include/Game/Interfaces/GameTabs/Equipment.hpp index 184242a..6169038 100644 --- a/Include/Game/Interfaces/GameTabs/Equipment.hpp +++ b/Include/Game/Interfaces/GameTabs/Equipment.hpp @@ -43,7 +43,6 @@ class Equipment static std::vector GetItems(const std::vector& Names); static std::vector GetItems(const std::function& Filter); - static Interactable::Item GetItem(); static Interactable::Item GetItem(SLOT Slot); static Interactable::Item GetItem(std::int32_t ID); static Interactable::Item GetItem(const std::string& Name); diff --git a/Include/Game/Interfaces/GameTabs/Inventory.hpp b/Include/Game/Interfaces/GameTabs/Inventory.hpp index 4943d75..94f83d2 100644 --- a/Include/Game/Interfaces/GameTabs/Inventory.hpp +++ b/Include/Game/Interfaces/GameTabs/Inventory.hpp @@ -29,7 +29,6 @@ class Inventory static std::vector GetItems(const std::vector& Names); static std::vector GetItems(const std::function& Filter); - static Interactable::Item GetItem(); static Interactable::Item GetItem(std::int32_t ID); static Interactable::Item GetItem(const std::string& Name); static Interactable::Item GetItem(const std::vector& IDs); diff --git a/Include/Game/Interfaces/Trade.hpp b/Include/Game/Interfaces/Trade.hpp index 714b57c..bbb10c9 100644 --- a/Include/Game/Interfaces/Trade.hpp +++ b/Include/Game/Interfaces/Trade.hpp @@ -10,9 +10,9 @@ class Trade public: static bool IsOpen(); - static std::vector GetYourOfferItemIDs(); - static std::vector GetYourOfferItemNames(); - static std::vector GetYourOfferItemAmounts(); + static std::vector GetMyOfferItemIDs(); + static std::vector GetMyOfferItemNames(); + static std::vector GetMyOfferItemAmounts(); static std::vector GetTheirOfferItemIDs(); static std::vector GetTheirOfferItemNames(); diff --git a/Library/libAlpacaLibrary.a b/Library/libAlpacaLibrary.a index 64d820c..d4b9696 100644 Binary files a/Library/libAlpacaLibrary.a and b/Library/libAlpacaLibrary.a differ