Core/Spells: Update/Convert mage "Glyph of Polymorph" for 4.3.4
This commit is contained in:
1 parent
b4e4c90007
commit
99d34bde1b
3 files changed
+52
-10
No files matched your search
@@ -89,6 +89,11 @@ enum MageIcons
|
||||
ICON_MAGE_IMPROVED_MANA_GEM = 1036
|
||||
};
|
||||
|
||||
enum MiscSpells
|
||||
{
|
||||
SPELL_PRIEST_SHADOW_WORD_DEATH = 32409
|
||||
};
|
||||
|
||||
// -31571 - Arcane Potency
|
||||
class spell_mage_arcane_potency : public SpellScriptLoader
|
||||
{
|
||||
@@ -689,6 +694,45 @@ class spell_mage_glyph_of_ice_block : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 56375 - Glyph of Polymorph
|
||||
class spell_mage_glyph_of_polymorph : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_mage_glyph_of_polymorph() : SpellScriptLoader("spell_mage_glyph_of_polymorph") { }
|
||||
|
||||
class spell_mage_glyph_of_polymorph_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_glyph_of_polymorph_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_SHADOW_WORD_DEATH))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit* target = eventInfo.GetProcTarget();
|
||||
|
||||
target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE, 0, target->GetAura(SPELL_PRIEST_SHADOW_WORD_DEATH)); // SW:D shall not be removed.
|
||||
target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT);
|
||||
target->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH);
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_mage_glyph_of_polymorph_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
{
|
||||
return new spell_mage_glyph_of_polymorph_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// -44457 - Living Bomb
|
||||
class spell_mage_living_bomb : public SpellScriptLoader
|
||||
{
|
||||
@@ -1333,6 +1377,7 @@ void AddSC_mage_spell_scripts()
|
||||
new spell_mage_ice_barrier();
|
||||
new spell_mage_ignite();
|
||||
new spell_mage_glyph_of_ice_block();
|
||||
new spell_mage_glyph_of_polymorph();
|
||||
new spell_mage_living_bomb();
|
||||
new spell_mage_mage_ward();
|
||||
new spell_mage_mana_shield();
|
||||
|
||||
Reference in new issue
Block a user