Core/Unit: Force cancel unit events before invalidating the object on destruction

* Closes #16675

(cherry picked from commit 0c97ef5f74ecd30a16965719b857d0ba71580fbf)
This commit is contained in:
Naios
2016-08-29 22:07:14 +02:00
parent cf63094e9f
commit cc51ae6f9a
+3 -1
View File
@@ -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;