Core/Unit: Force cancel unit events before invalidating the object on destruction
* Closes #16675 (cherry picked from commit 0c97ef5f74ecd30a16965719b857d0ba71580fbf)
This commit is contained in:
@@ -314,9 +314,11 @@ Unit::~Unit()
|
||||
if (m_currentSpells[i])
|
||||
{
|
||||
m_currentSpells[i]->SetReferencedFromCurrent(false);
|
||||
m_currentSpells[i] = NULL;
|
||||
m_currentSpells[i] = nullptr;
|
||||
}
|
||||
|
||||
m_Events.KillAllEvents(true);
|
||||
|
||||
_DeleteRemovedAuras();
|
||||
|
||||
delete i_motionMaster;
|
||||
|
||||
Reference in New Issue
Block a user