mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7804] Allow swap and move by bag slots equipped ammopouch and quiver
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
3c057a92f5
commit
7204f83a55
2 changed files with 10 additions and 7 deletions
|
|
@ -9570,14 +9570,17 @@ uint8 Player::CanEquipItem( uint8 slot, uint16 &dest, Item *pItem, bool swap, bo
|
||||||
{
|
{
|
||||||
if( Item* pBag = GetItemByPos( INVENTORY_SLOT_BAG_0, i ) )
|
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)
|
if( pBagProto->Class==pProto->Class && (!swap || pBag->GetSlot() != eslot ) )
|
||||||
return EQUIP_ERR_CAN_EQUIP_ONLY1_AMMOPOUCH;
|
{
|
||||||
else
|
if(pBagProto->SubClass == ITEM_SUBCLASS_AMMO_POUCH)
|
||||||
return EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER;
|
return EQUIP_ERR_CAN_EQUIP_ONLY1_AMMOPOUCH;
|
||||||
|
else
|
||||||
|
return EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7803"
|
#define REVISION_NR "7804"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue