mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/ZoneScript: Implemented ProcessEvent function for units.
Signed-off-by: Manuel <manue.l@live.com.ar>
This commit is contained in:
@@ -47,6 +47,7 @@ class ZoneScript
|
||||
virtual void SetData(uint32 /*DataId*/, uint32 /*Value*/) {}
|
||||
|
||||
virtual void ProcessEvent(GameObject * /*obj*/, uint32 /*eventId*/) {}
|
||||
virtual void ProcessEvent(Unit* /*unit*/, uint32 /*eventId*/) {}
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -2175,6 +2175,12 @@ void Spell::EffectSendEvent(SpellEffIndex effIndex)
|
||||
else
|
||||
pTarget = NULL;
|
||||
|
||||
if (unitTarget)
|
||||
{
|
||||
if (ZoneScript* zoneScript = unitTarget->GetZoneScript())
|
||||
zoneScript->ProcessEvent(unitTarget, m_spellInfo->EffectMiscValue[effIndex]);
|
||||
}
|
||||
|
||||
m_caster->GetMap()->ScriptsStart(sEventScripts, m_spellInfo->EffectMiscValue[effIndex], m_caster, pTarget);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user