64 return std::string(
_(
"Torso"));
66 return std::string(
_(
"Arms"));
68 return std::string(
_(
"Head"));
70 return std::string(
_(
"Legs"));
72 return std::string(
_(
"Feet"));
74 return std::string(
_(
"Ring 1/2"));
76 return std::string(
_(
"Ring 2/2"));
78 return std::string(
_(
"Necklace"));
80 return std::string(
_(
"Hand 1/2"));
82 return std::string(
_(
"Hand 2/2"));
84 return std::string(
_(
"Ammo"));
97 item->setEquipped(
false);
107 Item *newItem = inventory->
getItem(inventoryIndex);
109 if (!newItem && inventoryIndex >= 0)
111 Log::info(
"EquipBackend: Warning, trying to equip "
112 "non-existing item from inventory index %i at "
113 "equipment slot %i.", inventoryIndex, index);
119 oldItem->setEquipped(
false);
169 size_t getSize(
int type)
const override;
void updateButtons()
Updates the buttons.
Item * getItem(int index) const
Returns the item at the specified index.
Represents one or more instances of a certain item type.
void setEquipped(bool equipped)
Sets whether this item is equipped.
int mEquipment[EQUIP_VECTOR_END]
Item * getEquipment(int index) const override
std::string getSlotName(int slotIndex) const override
void triggerUnequip(int slotIndex) const override
void setEquipment(int index, int inventoryIndex)
int getSlotNumber() const override
size_t getSize(int type) const override
~InventoryHandler() override
void event(Event::Channel channel, const Event &event) override
bool isWeaponSlot(unsigned int slotTypeId) const override
InventoryWindow * mStorageWindow
void handleMessage(MessageIn &msg) override
Equipment::Backend * getEquipmentBackend() override
bool isAmmoSlot(unsigned int slotTypeId) const override
std::vector< InventoryItem > mInventoryItems
Used for parsing an incoming message from eAthena.
InventoryWindow * inventoryWindow
void info(const char *log_text,...) LOG_PRINTF_ATTR
Inventory * getInventory()
Returns the player's inventory.
Warning: buffers and other variables are shared, so there can be only one connection active at a time...
Used to cache storage data until we get size data for it.