Core/Spells: Convert/Update more spells for 4.3.4

This commit is contained in:
Vincent-Michael committed 2013-07-18 18:20:01 +02:00
1 parent 0b94293dba
commit de673fc4b0
5 files changed
+105 -49

No files matched your search

+53
View File
@@ -29,6 +29,10 @@
enum MageSpells
{
SPELL_ARCANCE_POTENCY_RANK_1 = 31571,
SPELL_ARCANCE_POTENCY_RANK_2 = 31572,
SPELL_ARCANCE_POTENCY_TRIGGER_RANK_1 = 57529,
SPELL_ARCANCE_POTENCY_TRIGGER_RANK_2 = 57531,
SPELL_MAGE_BLAZING_SPEED = 31643,
SPELL_MAGE_BURNOUT = 29077,
SPELL_MAGE_COLD_SNAP = 11958,
@@ -84,6 +88,54 @@ enum MageIcons
ICON_MAGE_IMPROVED_MANA_GEM = 1036
};
// -31571 - Arcane Potency
class spell_mage_arcane_potency : public SpellScriptLoader
{
public:
spell_mage_arcane_potency () : SpellScriptLoader("spell_mage_arcane_potency") { }
class spell_mage_arcane_potency_AuraScript : public AuraScript
{
PrepareAuraScript(spell_mage_arcane_potency_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_ARCANCE_POTENCY_RANK_1) ||
!sSpellMgr->GetSpellInfo(SPELL_ARCANCE_POTENCY_RANK_2) ||
!sSpellMgr->GetSpellInfo(SPELL_ARCANCE_POTENCY_TRIGGER_RANK_1) ||
!sSpellMgr->GetSpellInfo(SPELL_ARCANCE_POTENCY_TRIGGER_RANK_2))
return false;
return true;
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
uint32 spellId = 0;
if (GetSpellInfo()->Id == SPELL_ARCANCE_POTENCY_RANK_1)
spellId = SPELL_ARCANCE_POTENCY_TRIGGER_RANK_1;
else if (GetSpellInfo()->Id == SPELL_ARCANCE_POTENCY_RANK_2)
spellId = SPELL_ARCANCE_POTENCY_TRIGGER_RANK_2;
if (!spellId)
return;
GetTarget()->CastSpell(GetTarget(), spellId, true, NULL, aurEff);
}
void Register() OVERRIDE
{
OnEffectProc += AuraEffectProcFn(spell_mage_arcane_potency_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_mage_arcane_potency_AuraScript();
}
};
// Incanter's Absorbtion
class spell_mage_incanters_absorbtion_base_AuraScript : public AuraScript
{
@@ -1224,6 +1276,7 @@ class spell_mage_water_elemental_freeze : public SpellScriptLoader
void AddSC_mage_spell_scripts()
{
new spell_mage_arcane_potency();
new spell_mage_blast_wave();
new spell_mage_blazing_speed();
new spell_mage_blizzard();