fix(Core/Spell): Paralytic Poison (#4128)

This commit is contained in:
Kitzunu
2021-01-23 16:59:43 +01:00
committed by GitHub
parent eb9819991e
commit 9cee5e1d61
2 changed files with 48 additions and 0 deletions

View File

@@ -4243,6 +4243,48 @@ public:
}
};
enum ParalyticPoison
{
SPELL_PARALYSIS = 35202
};
// 35201 - Paralytic Poison
class spell_gen_paralytic_poison : public SpellScriptLoader
{
public:
spell_gen_paralytic_poison() : SpellScriptLoader("spell_gen_paralytic_poison") { }
class spell_gen_paralytic_poison_AuraScript : public AuraScript
{
PrepareAuraScript(spell_gen_paralytic_poison_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return (sSpellMgr->GetSpellInfo(SPELL_PARALYSIS));
}
void HandleStun(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
{
return;
}
GetTarget()->CastSpell((Unit*)nullptr, SPELL_PARALYSIS, true, nullptr, aurEff);
}
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_gen_paralytic_poison_AuraScript::HandleStun, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_gen_paralytic_poison_AuraScript();
}
};
// Blade Warding - 64440
enum BladeWarding
{
@@ -5103,6 +5145,7 @@ void AddSC_generic_spell_scripts()
new spell_gen_count_pct_from_max_hp("spell_gen_100pct_count_pct_from_max_hp", 100);
new spell_gen_despawn_self();
new spell_gen_bandage();
new spell_gen_paralytic_poison();
new spell_gen_blade_warding();
new spell_gen_lifebloom("spell_hexlord_lifebloom", SPELL_HEXLORD_MALACRASS_LIFEBLOOM_FINAL_HEAL);
new spell_gen_lifebloom("spell_tur_ragepaw_lifebloom", SPELL_TUR_RAGEPAW_LIFEBLOOM_FINAL_HEAL);