mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Unit: Force cancel unit events before invalidating the object on destruction
* Closes #16675
(cherry picked from commit 0c97ef5f74)
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