diff options
author | megamage <none@none> | 2009-05-10 14:30:04 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-10 14:30:04 -0500 |
commit | 66c4b7b56086e59eb8e6fc324f48d90e92fb44f6 (patch) | |
tree | 7275f772147786806efe052bc986c10c2a998fc0 /src | |
parent | 40a8e6d3aba7410fe34c4b6b81f4036f26e0f338 (diff) |
[7804] Allow swap and move by bag slots equipped ammopouch and quiver Author: Foks
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Player.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index bfd47aa8279..4185e18ee47 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -9848,14 +9848,17 @@ uint8 Player::CanEquipItem( uint8 slot, uint16 &dest, Item *pItem, bool swap, bo { if( Item* pBag = GetItemByPos( INVENTORY_SLOT_BAG_0, i ) ) { - if( ItemPrototype const* pBagProto = pBag->GetProto() ) + if( pBag != pItem ) { - if( pBagProto->Class==pProto->Class && (!swap || pBag->GetSlot() != eslot ) ) + if( ItemPrototype const* pBagProto = pBag->GetProto() ) { - if(pBagProto->SubClass == ITEM_SUBCLASS_AMMO_POUCH) - return EQUIP_ERR_CAN_EQUIP_ONLY1_AMMOPOUCH; - else - return EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER; + if( pBagProto->Class==pProto->Class && (!swap || pBag->GetSlot() != eslot ) ) + { + if(pBagProto->SubClass == ITEM_SUBCLASS_AMMO_POUCH) + return EQUIP_ERR_CAN_EQUIP_ONLY1_AMMOPOUCH; + else + return EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER; + } } } } |