Release 0.75

master
Kasi 2018-07-22 11:12:31 +01:00
parent c6e6b17cd3
commit 983bbec098
2 changed files with 37 additions and 5 deletions

View File

@ -1,9 +1,11 @@
#ifndef EXCHANGE_HPP_INCLUDED #ifndef EXCHANGE_HPP_INCLUDED
#define EXCHANGE_HPP_INCLUDED #define EXCHANGE_HPP_INCLUDED
#include "../../Core/Classes/ExchangeOffer.hpp"
#include <cstdint> #include <cstdint>
#include <string> #include <string>
#include <vector> #include <vector>
#include <functional>
/** @addtogroup Interfaces /** @addtogroup Interfaces
* @{ */ * @{ */
@ -11,6 +13,8 @@ class Exchange
{ {
public: public:
typedef std::int32_t SLOT;
typedef enum SLOT_STATE typedef enum SLOT_STATE
{ {
STATE_EMPTY = 0, STATE_EMPTY = 0,
@ -39,11 +43,12 @@ class Exchange
static bool IsOpen(); static bool IsOpen();
static bool Open(); static bool Open();
static bool Close(); static bool Close();
static SLOT_STATE GetSlotState(const std::uint32_t Slot); static SLOT_STATE GetSlotState(const Exchange::SLOT Slot);
static bool SlotOccupied(const std::uint32_t Slot); static bool SlotOccupied(const Exchange::SLOT Slot);
static std::vector<SLOT_STATE> GetAllSlotStates(); static std::vector<SLOT_STATE> GetAllSlotStates();
static bool AllSlotsOccupied(); static bool AllSlotsOccupied();
static std::int32_t GetOfferIndex(); static std::int32_t GetOfferIndex();
static SLOT_MODE GetOfferMode(); static SLOT_MODE GetOfferMode();
static std::int32_t GetOfferItemID(); static std::int32_t GetOfferItemID();
static std::string GetOfferItemName(); static std::string GetOfferItemName();
@ -52,12 +57,39 @@ class Exchange
static bool OfferOpen(); static bool OfferOpen();
static bool CloseOffer(); static bool CloseOffer();
static bool OffersOpen(); static bool OffersOpen();
static bool SlotUseble(const std::uint32_t Slot); static bool SlotUseble(const Exchange::SLOT Slot);
static bool CanCollect(); static bool CanCollect();
static bool Collect(const bool Inventory = true); static bool Collect(const bool Inventory = true);
static bool OpenBuyOffer(); static bool IsBuyOfferOpen();
static bool OpenSellOffer(); 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<bool (const Internal::ExchangeOffer&)>& Filter);
static std::vector<Exchange::SLOT> GetBuyOffers(std::int32_t ID);
static std::vector<Exchange::SLOT> GetBuyOffers(const std::string& Name);
static std::vector<Exchange::SLOT> GetBuyOffers(const std::function<bool (const Internal::ExchangeOffer&)>& Filter);
static Exchange::SLOT GetSellOffer(std::int32_t ID);
static Exchange::SLOT GetSellOffer(const std::string& Name);
static Exchange::SLOT GetSellOffer(const std::function<bool (const Internal::ExchangeOffer&)>& Filter);
static std::vector<Exchange::SLOT> GetSellOffers(std::int32_t ID);
static std::vector<Exchange::SLOT> GetSellOffers(const std::string& Name);
static std::vector<Exchange::SLOT> GetSellOffers(const std::function<bool (const Internal::ExchangeOffer&)>& 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();
}; };
/** @} */ /** @} */

Binary file not shown.