Core/Objects: Move EventProcessor update to WorldObject::Update

Port From (https://github.com/TrinityCore/TrinityCore/commit/b6965b2c30eb3317228b328a0c1da71235d7c257)
This commit is contained in:
hondacrx
2023-02-12 01:23:08 -05:00
parent 42f94c354f
commit 1ed5fadf4d
3 changed files with 11 additions and 8 deletions
+2 -4
View File
@@ -120,15 +120,13 @@ namespace Game.Entities
{
// WARNING! Order of execution here is important, do not change.
// Spells must be processed with event system BEFORE they go to _UpdateSpells.
m_Events.Update(diff);
base.Update(diff);
if (!IsInWorld)
return;
_UpdateSpells(diff);
base.Update(diff);
// If this is set during update SetCantProc(false) call is missing somewhere in the code
// Having this would prevent spells from being proced, so let's crash
Cypher.Assert(m_procDeep == 0);
@@ -527,9 +525,9 @@ namespace Game.Entities
if (finalCleanup)
m_cleanupDone = true;
m_Events.KillAllEvents(false); // non-delatable (currently casted spells) will not deleted now but it will deleted at call in Map.RemoveAllObjectsInRemoveList
CombatStop();
}
public override void CleanupsBeforeDelete(bool finalCleanup = true)
{
CleanupBeforeRemoveFromMap(finalCleanup);