mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[8859] fixed bug which allowed to loot items multiple times
thx to burned for reporting
This commit is contained in:
parent
d924406bd8
commit
d63ea646a0
2 changed files with 6 additions and 6 deletions
|
|
@ -9006,16 +9006,16 @@ uint8 Player::_CanStoreItem_InBag( uint8 bag, ItemPosCountVec &dest, ItemPrototy
|
|||
Item* pItem2 = GetItemByPos( bag, j );
|
||||
|
||||
// ignore move item (this slot will be empty at move)
|
||||
if (pItem2==pSrcItem)
|
||||
if (pItem2 == pSrcItem)
|
||||
pItem2 = NULL;
|
||||
|
||||
// if merge skip empty, if !merge skip non-empty
|
||||
if ((pItem2!=NULL)!=merge)
|
||||
if ((pItem2 != NULL) != merge)
|
||||
continue;
|
||||
|
||||
if (pItem2)
|
||||
{
|
||||
if (pItem2->GetEntry() == pProto->ItemId && pItem2->GetCount() < pProto->GetMaxStackSize())
|
||||
if (!pItem2->m_lootGenerated && pItem2->GetEntry() == pProto->ItemId && pItem2->GetCount() < pProto->GetMaxStackSize())
|
||||
{
|
||||
uint32 need_space = pProto->GetMaxStackSize() - pItem2->GetCount();
|
||||
if(need_space > count)
|
||||
|
|
@ -9067,12 +9067,12 @@ uint8 Player::_CanStoreItem_InInventorySlots( uint8 slot_begin, uint8 slot_end,
|
|||
pItem2 = NULL;
|
||||
|
||||
// if merge skip empty, if !merge skip non-empty
|
||||
if ((pItem2!=NULL)!=merge)
|
||||
if ((pItem2 != NULL) != merge)
|
||||
continue;
|
||||
|
||||
if (pItem2)
|
||||
{
|
||||
if (pItem2->GetEntry() == pProto->ItemId && pItem2->GetCount() < pProto->GetMaxStackSize())
|
||||
if (!pItem2->m_lootGenerated && pItem2->GetEntry() == pProto->ItemId && pItem2->GetCount() < pProto->GetMaxStackSize())
|
||||
{
|
||||
uint32 need_space = pProto->GetMaxStackSize() - pItem2->GetCount();
|
||||
if (need_space > count)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8858"
|
||||
#define REVISION_NR "8859"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue