fix(Scripts/HellfireRamparts): Fix Gargolmar Retalliation procs with … (#16585)

fix(Scripts/HellfireRamparts): Fix Gargolmar Retalliation procs with targets behind him
This commit is contained in:
Skjalf
2023-06-18 11:54:05 -03:00
committed by GitHub
parent 5060407598
commit 7ae4b85c43
2 changed files with 25 additions and 0 deletions

View File

@@ -144,7 +144,28 @@ private:
};
class spell_gargolmar_retalliation : public AuraScript
{
PrepareAuraScript(spell_gargolmar_retalliation);
bool CheckProc(ProcEventInfo& eventInfo)
{
if (!eventInfo.GetActor() || !eventInfo.GetProcTarget())
{
return false;
}
return GetTarget()->isInFront(eventInfo.GetActor(), M_PI);
}
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_gargolmar_retalliation::CheckProc);
}
};
void AddSC_boss_watchkeeper_gargolmar()
{
RegisterHellfireRampartsCreatureAI(boss_watchkeeper_gargolmar);
RegisterSpellScript(spell_gargolmar_retalliation);
}