mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 01:29:07 +00:00
fix(Core/Spells): Curse of Pain (#16844)
* fix(Core/Spells): Curse of Pain * ocd
This commit is contained in:
@@ -4884,6 +4884,39 @@ class spell_gen_shriveling_gaze : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 38048 - Curse of Pain
|
||||
enum CurseOfPain
|
||||
{
|
||||
SPELL_CURSE_OF_PAIN = 38048,
|
||||
};
|
||||
|
||||
class spell_gen_curse_of_pain : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_gen_curse_of_pain);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_CURSE_OF_PAIN });
|
||||
}
|
||||
|
||||
void OnPeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
if (target && target->ToPlayer())
|
||||
{
|
||||
if (target->GetHealthPct() < 50.f)
|
||||
{
|
||||
target->RemoveAurasDueToSpell(SPELL_CURSE_OF_PAIN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_gen_curse_of_pain::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_silithyst);
|
||||
@@ -5029,4 +5062,5 @@ void AddSC_generic_spell_scripts()
|
||||
RegisterSpellScript(spell_freezing_circle);
|
||||
RegisterSpellScript(spell_gen_threshalisk_charge);
|
||||
RegisterSpellScript(spell_gen_shriveling_gaze);
|
||||
RegisterSpellScript(spell_gen_curse_of_pain);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user