[8859] fixed bug which allowed to loot items multiple times

thx to burned for reporting
This commit is contained in:
balrok 2009-11-22 16:34:45 +01:00
parent d924406bd8
commit d63ea646a0
2 changed files with 6 additions and 6 deletions

View file

@ -9015,7 +9015,7 @@ uint8 Player::_CanStoreItem_InBag( uint8 bag, ItemPosCountVec &dest, ItemPrototy
if (pItem2) 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(); uint32 need_space = pProto->GetMaxStackSize() - pItem2->GetCount();
if(need_space > count) if(need_space > count)
@ -9072,7 +9072,7 @@ uint8 Player::_CanStoreItem_InInventorySlots( uint8 slot_begin, uint8 slot_end,
if (pItem2) 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(); uint32 need_space = pProto->GetMaxStackSize() - pItem2->GetCount();
if (need_space > count) if (need_space > count)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "8858" #define REVISION_NR "8859"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__