mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[9765] Prevent crash at use .npc delitem to item with multiply extanded costs.
This commit is contained in:
parent
6398abc725
commit
f2dd9daf45
2 changed files with 5 additions and 3 deletions
|
|
@ -59,14 +59,16 @@ TrainerSpell const* TrainerSpellData::Find(uint32 spell_id) const
|
|||
bool VendorItemData::RemoveItem( uint32 item_id )
|
||||
{
|
||||
bool found = false;
|
||||
for(VendorItemList::iterator i = m_items.begin(); i != m_items.end(); ++i )
|
||||
for(VendorItemList::iterator i = m_items.begin(); i != m_items.end(); )
|
||||
{
|
||||
// can have many examples
|
||||
if((*i)->item == item_id)
|
||||
{
|
||||
m_items.erase(i);
|
||||
m_items.erase(i++);
|
||||
found = true;
|
||||
}
|
||||
else
|
||||
++i;
|
||||
}
|
||||
|
||||
return found;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9764"
|
||||
#define REVISION_NR "9765"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue