Class Inventory

Class Documentation

class game::item::Inventory

Public Functions

Inventory(uint16_t width, uint16_t height, uint8_t pages = 1)
~Inventory()
void Load(uint32_t playerId, uint16_t window, const std::shared_ptr<ItemManager> &manager, const std::function<void()> &cb)
std::shared_ptr<Item> Get(uint32_t position)
std::shared_ptr<Item> Get(uint8_t page, uint16_t x, uint16_t y)
bool Set(uint32_t position, const std::shared_ptr<Item> &item)
void Clear(uint32_t position)
bool HasSpace(uint32_t position, uint8_t size)
const std::map<uint32_t, std::shared_ptr<Item>> &GetItems() const