diff options
author | Fedja Beader <fedja@protonmail.ch> | 2024-04-27 16:36:36 +0000 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2024-04-27 16:36:36 +0000 |
commit | c831c69d9f50bf418295834ae83e9eb400dfc6b7 (patch) | |
tree | cda966e5de3ef56ffcc832c02f63170e48d1b3cb /src/net | |
parent | 40b605c41542baf9b10a1a2b03af10e3baaa362f (diff) | |
download | manaverse-c831c69d9f50bf418295834ae83e9eb400dfc6b7.tar.gz manaverse-c831c69d9f50bf418295834ae83e9eb400dfc6b7.tar.bz2 manaverse-c831c69d9f50bf418295834ae83e9eb400dfc6b7.tar.xz manaverse-c831c69d9f50bf418295834ae83e9eb400dfc6b7.zip |
Fix "Show items" (equipment display on other players)
See #73 for discussion
Squashed with:
* Fix mana pearl showing in arrows slot in Classic
* Fix off-by-one. Was causing Old Towel to render in torso slot in ML.
****
mana/plus!78
Diffstat (limited to 'src/net')
-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 |