fix(Scripts/Hyjal): Fix Azgalor Doom targetting tanks since its an AoE spell (#19012)
* fix(Scripts/Hyjal): Fix Azgalor Doom targetting tanks since its an AoE spell * Update boss_azgalor.cpp
This commit is contained in:
@@ -70,7 +70,7 @@ public:
|
|||||||
context.Repeat(18s, 20s);
|
context.Repeat(18s, 20s);
|
||||||
}).Schedule(45s, 55s, [this](TaskContext context)
|
}).Schedule(45s, 55s, [this](TaskContext context)
|
||||||
{
|
{
|
||||||
DoCastRandomTarget(SPELL_DOOM, 1, 100.f, true, false, false);
|
DoCastAOE(SPELL_DOOM);
|
||||||
Talk(SAY_DOOM);
|
Talk(SAY_DOOM);
|
||||||
context.Repeat();
|
context.Repeat();
|
||||||
}).Schedule(10min, [this](TaskContext context)
|
}).Schedule(10min, [this](TaskContext context)
|
||||||
@@ -118,9 +118,27 @@ private:
|
|||||||
bool _recentlySpoken;
|
bool _recentlySpoken;
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_azgalor_doom : public AuraScript
|
class spell_azgalor_doom : public SpellScript
|
||||||
{
|
{
|
||||||
PrepareAuraScript(spell_azgalor_doom);
|
PrepareSpellScript(spell_azgalor_doom);
|
||||||
|
|
||||||
|
void FilterTargets(std::list<WorldObject*>& targets)
|
||||||
|
{
|
||||||
|
if (Unit* victim = GetCaster()->GetVictim())
|
||||||
|
{
|
||||||
|
targets.remove_if(Acore::ObjectGUIDCheck(victim->GetGUID(), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_azgalor_doom::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class spell_azgalor_doom_aura : public AuraScript
|
||||||
|
{
|
||||||
|
PrepareAuraScript(spell_azgalor_doom_aura);
|
||||||
|
|
||||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||||
{
|
{
|
||||||
@@ -133,12 +151,12 @@ class spell_azgalor_doom : public AuraScript
|
|||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
OnEffectRemove += AuraEffectRemoveFn(spell_azgalor_doom::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
|
OnEffectRemove += AuraEffectRemoveFn(spell_azgalor_doom_aura::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_boss_azgalor()
|
void AddSC_boss_azgalor()
|
||||||
{
|
{
|
||||||
RegisterHyjalAI(boss_azgalor);
|
RegisterHyjalAI(boss_azgalor);
|
||||||
RegisterSpellScript(spell_azgalor_doom);
|
RegisterSpellAndAuraScriptPair(spell_azgalor_doom, spell_azgalor_doom_aura);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user