mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Core/Scripts: implement Drain Mana breaking some auras on hit
Updates #20234
This commit is contained in:
@@ -858,6 +858,24 @@ class spell_gen_choking_vines : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 5138 - Drain Mana
|
||||
// 8129 - Mana Burn
|
||||
class spell_gen_clear_fear_poly : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_clear_fear_poly);
|
||||
|
||||
void HandleAfterHit()
|
||||
{
|
||||
if (Unit* unitTarget = GetHitUnit())
|
||||
unitTarget->RemoveAurasWithMechanic((1 << MECHANIC_FEAR) | (1 << MECHANIC_POLYMORPH));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterHit += SpellHitFn(spell_gen_clear_fear_poly::HandleAfterHit);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_gen_clone : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_clone);
|
||||
@@ -3942,6 +3960,7 @@ void AddSC_generic_spell_scripts()
|
||||
RegisterAuraScript(spell_gen_chains_of_ice);
|
||||
RegisterSpellScript(spell_gen_chaos_blast);
|
||||
RegisterAuraScript(spell_gen_choking_vines);
|
||||
RegisterSpellScript(spell_gen_clear_fear_poly);
|
||||
RegisterSpellScript(spell_gen_clone);
|
||||
RegisterSpellScript(spell_gen_clone_weapon);
|
||||
RegisterAuraScript(spell_gen_clone_weapon_aura);
|
||||
|
||||
@@ -738,34 +738,6 @@ class spell_pri_lightwell_renew : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 8129 - Mana Burn
|
||||
class spell_pri_mana_burn : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_pri_mana_burn() : SpellScriptLoader("spell_pri_mana_burn") { }
|
||||
|
||||
class spell_pri_mana_burn_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_pri_mana_burn_SpellScript);
|
||||
|
||||
void HandleAfterHit()
|
||||
{
|
||||
if (Unit* unitTarget = GetHitUnit())
|
||||
unitTarget->RemoveAurasWithMechanic((1 << MECHANIC_FEAR) | (1 << MECHANIC_POLYMORPH));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterHit += SpellHitFn(spell_pri_mana_burn_SpellScript::HandleAfterHit);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_pri_mana_burn_SpellScript;
|
||||
}
|
||||
};
|
||||
|
||||
// 28305 - Mana Leech (Passive) (Priest Pet Aura)
|
||||
class spell_pri_mana_leech : public SpellScriptLoader
|
||||
{
|
||||
@@ -1465,7 +1437,6 @@ void AddSC_priest_spell_scripts()
|
||||
new spell_pri_improved_spirit_tap();
|
||||
new spell_pri_item_t6_trinket();
|
||||
new spell_pri_lightwell_renew();
|
||||
new spell_pri_mana_burn();
|
||||
new spell_pri_mana_leech();
|
||||
new spell_pri_mind_sear();
|
||||
new spell_pri_pain_and_suffering_dummy();
|
||||
|
||||
Reference in New Issue
Block a user