diff options
-rw-r--r-- | src/net/eathena/inventoryhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/inventoryhandler.cpp | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index 3911c63fa..19197c851 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -572,7 +572,7 @@ void InventoryHandler::selectEgg(const Item *const item) const int InventoryHandler::convertFromServerSlot(const int serverSlot) const { - if (serverSlot < 0 || serverSlot >= 17) + if (serverSlot < 0 || serverSlot > 17) return 0; return CAST_S32(EQUIP_CONVERT[serverSlot]); diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index a438c2602..076d365f1 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -34,14 +34,13 @@ #include "debug.h" -// missing EQUIP_RING1_SLOT const EquipSlot::Type EQUIP_CONVERT[] = { EquipSlot::PROJECTILE_SLOT, // 0 0 EquipSlot::FEET_SLOT, // 1 SPRITE_HAIR EquipSlot::LEGS_SLOT, // 2 SPRITE_WEAPON EquipSlot::TORSO_SLOT, // 3 SPRITE_HEAD_BOTTOM - EquipSlot::PROJECTILE_SLOT, // 4 0 + EquipSlot::RING1_SLOT, // 4 SPRITE_HEAD_TOP EquipSlot::NECK_SLOT, // 5 SPRITE_RING EquipSlot::PROJECTILE_SLOT, // 6 0 EquipSlot::HEAD_SLOT, // 7 SPRITE_CLOTHES_COLOR |