#ifndef EXCHANGE_HPP_INCLUDED #define EXCHANGE_HPP_INCLUDED #include "../../Core/Classes/ExchangeOffer.hpp" #include #include #include #include /** @addtogroup Interfaces * @{ */ class Exchange { public: typedef std::int32_t SLOT; typedef enum SLOT_STATE { 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_DISABLED = 14, STATE_UNDEFINED = 15 } SLOT_STATE; typedef enum SLOT_MODE { BUY = 0, SELL = 1, MODE_DISABLED = 2, MODE_UNDEFINED = 3 } SLOT_MODE; static bool IsOpen(); static bool Open(); static bool Close(); static SLOT_STATE GetSlotState(const Exchange::SLOT Slot); static bool SlotOccupied(const Exchange::SLOT Slot); static std::vector GetAllSlotStates(); static bool AllSlotsOccupied(); static std::int32_t GetOfferIndex(); static SLOT_MODE GetOfferMode(); static std::int32_t GetOfferItemID(); static std::string GetOfferItemName(); static std::int32_t GetOfferAmount(); static std::int32_t GetOfferPrice(); static bool OfferOpen(); static bool CloseOffer(); static bool OffersOpen(); static bool SlotUseble(const Exchange::SLOT Slot); static bool CanCollect(); static bool Collect(const bool Inventory = true); static bool IsBuyOfferOpen(); static bool IsSellOfferOpen(); static bool OpenBuyOffer(const Exchange::SLOT Slot = -1); static bool OpenSellOffer(const Exchange::SLOT Slot = -1); static Exchange::SLOT GetBuyOffer(std::int32_t ID); static Exchange::SLOT GetBuyOffer(const std::string& Name); static Exchange::SLOT GetBuyOffer(const std::function& Filter); static std::vector GetBuyOffers(std::int32_t ID); static std::vector GetBuyOffers(const std::string& Name); static std::vector GetBuyOffers(const std::function& Filter); static Exchange::SLOT GetSellOffer(std::int32_t ID); static Exchange::SLOT GetSellOffer(const std::string& Name); static Exchange::SLOT GetSellOffer(const std::function& Filter); static std::vector GetSellOffers(std::int32_t ID); static std::vector GetSellOffers(const std::string& Name); static std::vector GetSellOffers(const std::function& Filter); static bool SetSellItem(const std::string& Name); static bool SetSellItem(std::int32_t ID); static bool SetBuyItem(const std::string& Name); static bool SetOfferAmount(std::uint32_t Amount); static bool SetOfferPrice(std::uint32_t Price); static bool SetOfferGuidePrice(); static bool ConfirmOffer(); }; /** @} */ #endif // EXCHANGE_HPP_INCLUDED