mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
*Fix a memory leak with auras for cases when there are some spells casted on unit during remove from world - all thanks go to debug assert fails, which you all love so much.
--HG-- branch : trunk
This commit is contained in:
@@ -12964,6 +12964,9 @@ void Unit::RemoveFromWorld()
|
||||
|
||||
void Unit::CleanupsBeforeDelete()
|
||||
{
|
||||
if (IsInWorld())
|
||||
RemoveFromWorld();
|
||||
|
||||
assert(GetGUID());
|
||||
|
||||
//A unit may be in removelist and not in world, but it is still in grid
|
||||
@@ -12977,9 +12980,6 @@ void Unit::CleanupsBeforeDelete()
|
||||
DeleteThreatList();
|
||||
getHostilRefManager().setOnlineOfflineState(false);
|
||||
GetMotionMaster()->Clear(false); // remove different non-standard movement generators.
|
||||
|
||||
if (IsInWorld())
|
||||
RemoveFromWorld();
|
||||
}
|
||||
|
||||
void Unit::UpdateCharmAI()
|
||||
|
||||
Reference in New Issue
Block a user