summaryrefslogtreecommitdiff
path: root/src/net/tmwa/inventoryhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa/inventoryhandler.cpp')
-rw-r--r--src/net/tmwa/inventoryhandler.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index 83bc38e6a..c271cd95b 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -41,6 +41,25 @@
extern Net::InventoryHandler *inventoryHandler;
+// missing EQUIP_RING1_SLOT
+const Equipment::Slot EQUIP_CONVERT[] =
+{
+ Equipment::EQUIP_PROJECTILE_SLOT, // 0 0
+ Equipment::EQUIP_FEET_SLOT, // 1 SPRITE_SHOE
+ Equipment::EQUIP_LEGS_SLOT, // 2 SPRITE_BOTTOMCLOTHES
+ Equipment::EQUIP_TORSO_SLOT, // 3 SPRITE_TOPCLOTHES
+ Equipment::EQUIP_PROJECTILE_SLOT, // 4 0
+ Equipment::EQUIP_NECK_SLOT, // 5 SPRITE_RING
+ Equipment::EQUIP_PROJECTILE_SLOT, // 6 0
+ Equipment::EQUIP_HEAD_SLOT, // 7 SPRITE_HAT
+ Equipment::EQUIP_RING2_SLOT, // 8 0
+ Equipment::EQUIP_GLOVES_SLOT, // 9 SPRITE_GLOVES
+ Equipment::EQUIP_FIGHT1_SLOT, // 10 SPRITE_WEAPON
+ Equipment::EQUIP_FIGHT2_SLOT, // 11 SPRITE_SHIELD
+ Equipment::EQUIP_EVOL_RING1_SLOT, // 12 SPRITE_EVOL1
+ Equipment::EQUIP_EVOL_RING2_SLOT, // 13 SPRITE_EVOL2
+};
+
namespace TmwAthena
{
@@ -610,4 +629,12 @@ void InventoryHandler::selectEgg(const Item *const item A_UNUSED) const
{
}
+int InventoryHandler::convertFromServerSlot(const int serverSlot) const
+{
+ if (serverSlot < 0 || serverSlot > 13)
+ return 0;
+
+ return static_cast<int>(EQUIP_CONVERT[serverSlot]);
+}
+
} // namespace TmwAthena