mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[10151] Prevent autostoring not empty bags
Thanks to The_Game_Master for detailed information about the bug.
This commit is contained in:
parent
59871ac550
commit
091b69500d
2 changed files with 5 additions and 1 deletions
|
|
@ -9925,6 +9925,10 @@ uint8 Player::_CanStoreItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, uint3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Normally it would be impossible to autostore not empty bags
|
||||||
|
if(pItem->IsBag() && !((Bag*)pItem)->IsEmpty())
|
||||||
|
return EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG;
|
||||||
|
|
||||||
// search free slot
|
// search free slot
|
||||||
res = _CanStoreItem_InInventorySlots(INVENTORY_SLOT_ITEM_START,INVENTORY_SLOT_ITEM_END,dest,pProto,count,false,pItem,bag,slot);
|
res = _CanStoreItem_InInventorySlots(INVENTORY_SLOT_ITEM_START,INVENTORY_SLOT_ITEM_END,dest,pProto,count,false,pItem,bag,slot);
|
||||||
if (res!=EQUIP_ERR_OK)
|
if (res!=EQUIP_ERR_OK)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10150"
|
#define REVISION_NR "10151"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue