fix(Core/Spells): Curse of Pain (#16844)
* fix(Core/Spells): Curse of Pain * ocd
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
--
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id` = 38048;
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES (38048, 'spell_gen_curse_of_pain');
|
||||||
@@ -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()
|
void AddSC_generic_spell_scripts()
|
||||||
{
|
{
|
||||||
RegisterSpellScript(spell_silithyst);
|
RegisterSpellScript(spell_silithyst);
|
||||||
@@ -5029,4 +5062,5 @@ void AddSC_generic_spell_scripts()
|
|||||||
RegisterSpellScript(spell_freezing_circle);
|
RegisterSpellScript(spell_freezing_circle);
|
||||||
RegisterSpellScript(spell_gen_threshalisk_charge);
|
RegisterSpellScript(spell_gen_threshalisk_charge);
|
||||||
RegisterSpellScript(spell_gen_shriveling_gaze);
|
RegisterSpellScript(spell_gen_shriveling_gaze);
|
||||||
|
RegisterSpellScript(spell_gen_curse_of_pain);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user