From aa8a8adb90c17e2a61c5245ea0dc3552ea78794f Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Tue, 30 Aug 2011 21:04:12 +0200 Subject: Added a way to specify where the equipment boxes will display. A sub tag was added to the tag with a x and y parameter to do so. --- src/net/manaserv/inventoryhandler.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/net/manaserv/inventoryhandler.h') diff --git a/src/net/manaserv/inventoryhandler.h b/src/net/manaserv/inventoryhandler.h index bf3022ab..1e05b49d 100644 --- a/src/net/manaserv/inventoryhandler.h +++ b/src/net/manaserv/inventoryhandler.h @@ -59,9 +59,13 @@ class EquipBackend : public Equipment::Backend, public EventListener bool isWeaponSlot(int slotTypeId) const; bool isAmmoSlot(int slotTypeId) const; + Position getBoxPosition(unsigned int slotIndex) const; + private: void readEquipFile(); + void readBoxNode(xmlNodePtr slotNode); + struct Slot { Slot(): item(0), @@ -107,6 +111,7 @@ class EquipBackend : public Equipment::Backend, public EventListener // slot client index, slot info typedef std::map Slots; Slots mSlots; + std::vector mBoxesPositions; }; class InventoryHandler : public MessageHandler, Net::InventoryHandler, @@ -132,6 +137,9 @@ class InventoryHandler : public MessageHandler, Net::InventoryHandler, unsigned int getVisibleSlotsNumber() const { return mEquipBackend.getVisibleSlotsNumber(); } + Position getBoxPosition(unsigned int slotIndex) const + { return mEquipBackend.getBoxPosition(slotIndex); } + private: EquipBackend mEquipBackend; }; -- cgit v1.2.3-70-g09d2