mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-17 01:04:34 +00:00
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:
@@ -0,0 +1,4 @@
|
||||
--
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_gargolmar_retalliation' AND `spell_id` = 22857;
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(22857, 'spell_gargolmar_retalliation');
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user