Core/Scripts: Begin unifying triggering gameevents (not the game_event db stuff)

Port From (https://github.com/TrinityCore/TrinityCore/commit/41a04a0c496c8c0c521eeaa76e34fbeb531cc1d9)
This commit is contained in:
hondacrx
2022-05-31 19:42:40 -04:00
parent 4fe0663b1d
commit da944ab528
7 changed files with 95 additions and 48 deletions
+1 -8
View File
@@ -734,14 +734,7 @@ namespace Game.Spells
Log.outDebug(LogFilter.Spells, "Spell ScriptStart {0} for spellid {1} in EffectSendEvent ", effectInfo.MiscValue, m_spellInfo.Id);
ZoneScript zoneScript = m_caster.GetZoneScript();
InstanceScript instanceScript = m_caster.GetInstanceScript();
if (zoneScript != null)
zoneScript.ProcessEvent(target, (uint)effectInfo.MiscValue, m_caster);
else if (instanceScript != null) // needed in case Player is the caster
instanceScript.ProcessEvent(target, (uint)effectInfo.MiscValue, m_caster);
m_caster.GetMap().ScriptsStart(ScriptsType.Event, (uint)effectInfo.MiscValue, m_caster, target);
GameEvents.Trigger((uint)effectInfo.MiscValue, m_caster, target);
}
[SpellEffectHandler(SpellEffectName.PowerBurn)]