From b73df39ce9832e5c000906e8c757272ca7ce02e7 Mon Sep 17 00:00:00 2001 From: Eduardo Augusto <38956084+duuh30@users.noreply.github.com> Date: Mon, 22 Apr 2024 12:56:23 -0300 Subject: [PATCH] fix: two handed weapons (#2570) --- src/creatures/players/player.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index 75e5b5ef2af..618ffea1081 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -3271,13 +3271,6 @@ ReturnValue Player::queryAdd(int32_t index, const std::shared_ptr &thing, case CONST_SLOT_LEFT: { if (item->isQuiver()) { ret = RETURNVALUE_CANNOTBEDRESSED; - } else if (slotPosition & SLOTP_LEFT) { - WeaponType_t type = item->getWeaponType(); - if (type == WEAPON_NONE || type == WEAPON_SHIELD || type == WEAPON_AMMO) { - ret = RETURNVALUE_CANNOTBEDRESSED; - } else { - ret = RETURNVALUE_NOERROR; - } } else if (slotPosition & SLOTP_TWO_HAND) { if (inventory[CONST_SLOT_RIGHT]) { WeaponType_t type = item->getWeaponType(); @@ -3290,6 +3283,13 @@ ReturnValue Player::queryAdd(int32_t index, const std::shared_ptr &thing, } else { ret = RETURNVALUE_NOERROR; } + } else if (slotPosition & SLOTP_LEFT) { + WeaponType_t type = item->getWeaponType(); + if (type == WEAPON_NONE || type == WEAPON_SHIELD || type == WEAPON_AMMO) { + ret = RETURNVALUE_CANNOTBEDRESSED; + } else { + ret = RETURNVALUE_NOERROR; + } } else if (inventory[CONST_SLOT_RIGHT]) { std::shared_ptr rightItem = inventory[CONST_SLOT_RIGHT]; WeaponType_t type = item->getWeaponType(), rightType = rightItem->getWeaponType();