*Try to fix a crash bug.
--HG-- branch : trunk
This commit is contained in:
@@ -162,12 +162,16 @@ m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL),m_creatureInfo(NULL), m_DBTabl
|
||||
|
||||
Creature::~Creature()
|
||||
{
|
||||
CleanupsBeforeDelete();
|
||||
|
||||
m_vendorItemCounts.clear();
|
||||
|
||||
delete i_AI;
|
||||
i_AI = NULL;
|
||||
if(i_AI)
|
||||
{
|
||||
delete i_AI;
|
||||
i_AI = NULL;
|
||||
}
|
||||
|
||||
if(m_uint32Values)
|
||||
sLog.outDetail("Deconstruct Creature Entry = %u", GetEntry());
|
||||
}
|
||||
|
||||
void Creature::AddToWorld()
|
||||
|
||||
@@ -285,6 +285,7 @@ ObjectGridUnloader::Visit(CreatureMapType &m)
|
||||
if(!sWorld.getConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY))
|
||||
obj->SaveRespawnTime();
|
||||
///- object will get delinked from the manager when deleted
|
||||
obj->CleanupsBeforeDelete();
|
||||
delete obj;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,22 +260,6 @@ Unit::~Unit()
|
||||
RemoveAllDynObjects();
|
||||
|
||||
if(m_charmInfo) delete m_charmInfo;
|
||||
|
||||
if(m_uint32Values)
|
||||
{
|
||||
sLog.outDetail("Deconstruct Unit Entry = %u", GetEntry());
|
||||
/*for(int i = 0; i < TOTAL_AURAS; ++i)
|
||||
{
|
||||
if(m_modAuras[i].begin() != m_modAuras[i].end())
|
||||
sLog.outError("Unit %u has mod auras during deconstruction", GetEntry());
|
||||
}
|
||||
if(m_scAuras.begin() != m_scAuras.end())
|
||||
sLog.outError("Unit %u has sc auras during deconstruction", GetEntry());
|
||||
if(m_interruptableAuras.begin() != m_interruptableAuras.end())
|
||||
sLog.outError("Unit %u has interruptable auras during deconstruction", GetEntry());
|
||||
if(m_ccAuras.begin() != m_ccAuras.end())
|
||||
sLog.outError("Unit %u has cc auras during deconstruction", GetEntry());*/
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::Update( uint32 p_time )
|
||||
|
||||
Reference in New Issue
Block a user