mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[7259] Prevent memory lost at pet spell reset.
This commit is contained in:
parent
fb6fe325bf
commit
63b8d1f537
2 changed files with 4 additions and 1 deletions
|
|
@ -1440,7 +1440,10 @@ void Pet::InitPetCreateSpells()
|
|||
{
|
||||
m_charmInfo->InitPetActionBar();
|
||||
|
||||
for (PetSpellMap::iterator i = m_spells.begin(); i != m_spells.end(); ++i)
|
||||
delete i->second;
|
||||
m_spells.clear();
|
||||
|
||||
uint32 petspellid;
|
||||
PetCreateSpellEntry const* CreateSpells = objmgr.GetPetCreateSpellEntry(GetEntry());
|
||||
if(CreateSpells)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue