Core/ZoneScript: Implemented ProcessEvent function for units.
Signed-off-by: Manuel <[email protected]>
This commit is contained in:
@@ -47,6 +47,7 @@ class ZoneScript
|
|||||||
virtual void SetData(uint32 /*DataId*/, uint32 /*Value*/) {}
|
virtual void SetData(uint32 /*DataId*/, uint32 /*Value*/) {}
|
||||||
|
|
||||||
virtual void ProcessEvent(GameObject * /*obj*/, uint32 /*eventId*/) {}
|
virtual void ProcessEvent(GameObject * /*obj*/, uint32 /*eventId*/) {}
|
||||||
|
virtual void ProcessEvent(Unit* /*unit*/, uint32 /*eventId*/) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -2175,6 +2175,12 @@ void Spell::EffectSendEvent(SpellEffIndex effIndex)
|
|||||||
else
|
else
|
||||||
pTarget = NULL;
|
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);
|
m_caster->GetMap()->ScriptsStart(sEventScripts, m_spellInfo->EffectMiscValue[effIndex], m_caster, pTarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user