From 36239b2d689b862a951a65a9be7376a500f1ace9 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Thu, 18 Aug 2011 03:06:53 +0200 Subject: Improved equip slots description for both protocols. Now the itempopup is also telling what equip slot is under the mouse pointer. --- src/net/tmwa/inventoryhandler.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src/net') diff --git a/src/net/tmwa/inventoryhandler.h b/src/net/tmwa/inventoryhandler.h index 15fa1fac..44ddd896 100644 --- a/src/net/tmwa/inventoryhandler.h +++ b/src/net/tmwa/inventoryhandler.h @@ -36,6 +36,8 @@ #include "resources/iteminfo.h" +#include "utils/gettext.h" + #include namespace TmwAthena { @@ -54,6 +56,37 @@ class EquipBackend : public Equipment::Backend return PlayerInfo::getInventory()->getItem(invyIndex); } + std::string getSlotName(int slotIndex) const + { + switch (slotIndex) + { + case EQUIP_TORSO_SLOT: + return std::string(_("Torso")); + case EQUIP_ARMS_SLOT: + return std::string(_("Arms")); + case EQUIP_HEAD_SLOT: + return std::string(_("Head")); + case EQUIP_LEGS_SLOT: + return std::string(_("Legs")); + case EQUIP_FEET_SLOT: + return std::string(_("Feet")); + case EQUIP_RING1_SLOT: + return std::string(_("Ring 1/2")); + case EQUIP_RING2_SLOT: + return std::string(_("Ring 2/2")); + case EQUIP_NECKLACE_SLOT: + return std::string(_("Necklace")); + case EQUIP_FIGHT1_SLOT: + return std::string(_("Hand 1/2")); + case EQUIP_FIGHT2_SLOT: + return std::string(_("Hand 2/2")); + case EQUIP_PROJECTILE_SLOT: + return std::string(_("Ammo")); + default: + return std::string(); + } + } + void clear() { for (int i = 0; i < EQUIP_VECTOR_END; i++) -- cgit v1.2.3-70-g09d2