summaryrefslogtreecommitdiff
path: root/src/net/manaserv/inventoryhandler.h
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-08-30 21:04:12 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-08-30 21:04:12 +0200
commitaa8a8adb90c17e2a61c5245ea0dc3552ea78794f (patch)
tree52df77ded5c1621fc10e6d762f05235e029a46cc /src/net/manaserv/inventoryhandler.h
parentebe29a9410458abac19c4ba10d5dce476e7ca34b (diff)
downloadmana-aa8a8adb90c17e2a61c5245ea0dc3552ea78794f.tar.gz
mana-aa8a8adb90c17e2a61c5245ea0dc3552ea78794f.tar.bz2
mana-aa8a8adb90c17e2a61c5245ea0dc3552ea78794f.tar.xz
mana-aa8a8adb90c17e2a61c5245ea0dc3552ea78794f.zip
Added a way to specify where the equipment boxes will display.
A <box> sub tag was added to the <slot> tag with a x and y parameter to do so.
Diffstat (limited to 'src/net/manaserv/inventoryhandler.h')
-rw-r--r--src/net/manaserv/inventoryhandler.h8
1 files changed, 8 insertions, 0 deletions
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<unsigned int, Slot> Slots;
Slots mSlots;
+ std::vector<Position> 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;
};