*Fix the bug that ~Unit makes crash.
--HG-- branch : trunk
This commit is contained in:
+2
-2
@@ -11095,6 +11095,8 @@ void Unit::CleanupsBeforeDelete()
|
|||||||
{
|
{
|
||||||
if(m_uint32Values) // only for fully created object
|
if(m_uint32Values) // only for fully created object
|
||||||
{
|
{
|
||||||
|
UnpossessSelf(false);
|
||||||
|
RemoveAllFromVision();
|
||||||
InterruptNonMeleeSpells(true);
|
InterruptNonMeleeSpells(true);
|
||||||
m_Events.KillAllEvents(false); // non-delatable (currently casted spells) will not deleted now but it will deleted at call in Map::RemoveAllObjectsInRemoveList
|
m_Events.KillAllEvents(false); // non-delatable (currently casted spells) will not deleted now but it will deleted at call in Map::RemoveAllObjectsInRemoveList
|
||||||
CombatStop();
|
CombatStop();
|
||||||
@@ -11104,8 +11106,6 @@ void Unit::CleanupsBeforeDelete()
|
|||||||
RemoveAllAuras();
|
RemoveAllAuras();
|
||||||
RemoveAllGameObjects();
|
RemoveAllGameObjects();
|
||||||
RemoveAllDynObjects();
|
RemoveAllDynObjects();
|
||||||
UnpossessSelf(false);
|
|
||||||
RemoveAllFromVision();
|
|
||||||
GetMotionMaster()->Clear(false); // remove different non-standard movement generators.
|
GetMotionMaster()->Clear(false); // remove different non-standard movement generators.
|
||||||
}
|
}
|
||||||
RemoveFromWorld();
|
RemoveFromWorld();
|
||||||
|
|||||||
Reference in New Issue
Block a user