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:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user