Remove/Add creature from/to map when it changes map.
Note: creatures was never supposed to change map, but now the core allows them to move with transports...
This commit is contained in:
1 parent
3ba22d0d06
commit
3569121d80
3 files changed
+12
-13
No files matched your search
@@ -13710,7 +13710,7 @@ void Unit::RemoveFromWorld()
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::CleanupsBeforeDelete(bool finalCleanup)
|
||||
void Unit::CleanupBeforeRemoveFromMap(bool finalCleanup)
|
||||
{
|
||||
// This needs to be before RemoveFromWorld to make GetCaster() return a valid pointer on aura removal
|
||||
InterruptNonMeleeSpells(true);
|
||||
@@ -13734,6 +13734,11 @@ void Unit::CleanupsBeforeDelete(bool finalCleanup)
|
||||
DeleteThreatList();
|
||||
getHostileRefManager().setOnlineOfflineState(false);
|
||||
GetMotionMaster()->Clear(false); // remove different non-standard movement generators.
|
||||
}
|
||||
|
||||
void Unit::CleanupsBeforeDelete(bool finalCleanup)
|
||||
{
|
||||
CleanupBeforeRemoveFromMap(finalCleanup);
|
||||
|
||||
if (Creature* thisCreature = ToCreature())
|
||||
if (GetTransport())
|
||||
|
||||
Reference in new issue
Block a user