fix(Scripts/AzjolNerub): Fix Drain Power spell (#22933)

This commit is contained in:
Andrew
2025-09-16 06:59:09 -03:00
committed by GitHub
parent 56f2a8e4f3
commit 6a156a69fd
2 changed files with 44 additions and 0 deletions

View File

@@ -126,9 +126,36 @@ class spell_azjol_nerub_web_wrap_aura : public AuraScript
}
};
enum DrainPowerSpells
{
SPELL_DRAIN_POWER_AURA = 54315
};
// 54314, 59354 - Drain Power
class spell_azjol_drain_power : public SpellScript
{
PrepareSpellScript(spell_azjol_drain_power);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_DRAIN_POWER_AURA });
}
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
GetCaster()->CastSpell(GetCaster(), SPELL_DRAIN_POWER_AURA, true);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_azjol_drain_power::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
}
};
void AddSC_instance_azjol_nerub()
{
new instance_azjol_nerub();
RegisterSpellScript(spell_azjol_nerub_fixate);
RegisterSpellScript(spell_azjol_nerub_web_wrap_aura);
RegisterSpellScript(spell_azjol_drain_power);
}