refactor(Scripts/Spells): convert spell_mage into new system (#9058)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1636371600934152600');
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_mage_polymorph_visual';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(32826,'spell_mage_polymorph_cast_visual');
|
||||
@@ -57,15 +57,9 @@ enum MageSpells
|
||||
SPELL_MAGE_GLYPH_OF_BLAST_WAVE = 62126,
|
||||
};
|
||||
|
||||
// Ours
|
||||
class spell_mage_arcane_blast : public SpellScriptLoader
|
||||
class spell_mage_arcane_blast : public SpellScript
|
||||
{
|
||||
public:
|
||||
spell_mage_arcane_blast() : SpellScriptLoader("spell_mage_arcane_blast") { }
|
||||
|
||||
class spell_mage_arcane_blast_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_mage_arcane_blast_SpellScript);
|
||||
PrepareSpellScript(spell_mage_arcane_blast);
|
||||
|
||||
bool Load() override { _triggerSpellId = 0; return true; }
|
||||
|
||||
@@ -82,29 +76,18 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectLaunch += SpellEffectFn(spell_mage_arcane_blast_SpellScript::HandleTriggerSpell, EFFECT_1, SPELL_EFFECT_TRIGGER_SPELL);
|
||||
OnEffectLaunchTarget += SpellEffectFn(spell_mage_arcane_blast_SpellScript::HandleTriggerSpell, EFFECT_1, SPELL_EFFECT_TRIGGER_SPELL);
|
||||
AfterCast += SpellCastFn(spell_mage_arcane_blast_SpellScript::HandleAfterCast);
|
||||
OnEffectLaunch += SpellEffectFn(spell_mage_arcane_blast::HandleTriggerSpell, EFFECT_1, SPELL_EFFECT_TRIGGER_SPELL);
|
||||
OnEffectLaunchTarget += SpellEffectFn(spell_mage_arcane_blast::HandleTriggerSpell, EFFECT_1, SPELL_EFFECT_TRIGGER_SPELL);
|
||||
AfterCast += SpellCastFn(spell_mage_arcane_blast::HandleAfterCast);
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 _triggerSpellId;
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
class spell_mage_deep_freeze : public SpellScript
|
||||
{
|
||||
return new spell_mage_arcane_blast_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_mage_deep_freeze : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_mage_deep_freeze() : SpellScriptLoader("spell_mage_deep_freeze") { }
|
||||
|
||||
class spell_mage_deep_freeze_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_mage_deep_freeze_SpellScript)
|
||||
PrepareSpellScript(spell_mage_deep_freeze)
|
||||
|
||||
void HandleOnHit()
|
||||
{
|
||||
@@ -117,24 +100,13 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnHit += SpellHitFn(spell_mage_deep_freeze_SpellScript::HandleOnHit);
|
||||
OnHit += SpellHitFn(spell_mage_deep_freeze::HandleOnHit);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
class spell_mage_burning_determination : public AuraScript
|
||||
{
|
||||
return new spell_mage_deep_freeze_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_mage_burning_determination : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_mage_burning_determination() : SpellScriptLoader("spell_mage_burning_determination") { }
|
||||
|
||||
class spell_mage_burning_determination_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_burning_determination_AuraScript);
|
||||
PrepareAuraScript(spell_mage_burning_determination);
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
@@ -169,25 +141,14 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_mage_burning_determination_AuraScript::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_mage_burning_determination_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
DoCheckProc += AuraCheckProcFn(spell_mage_burning_determination::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_mage_burning_determination::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
class spell_mage_molten_armor : public AuraScript
|
||||
{
|
||||
return new spell_mage_burning_determination_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_mage_molten_armor : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_mage_molten_armor() : SpellScriptLoader("spell_mage_molten_armor") { }
|
||||
|
||||
class spell_mage_molten_armor_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_molten_armor_AuraScript);
|
||||
PrepareAuraScript(spell_mage_molten_armor);
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
@@ -204,24 +165,13 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_mage_molten_armor_AuraScript::CheckProc);
|
||||
DoCheckProc += AuraCheckProcFn(spell_mage_molten_armor::CheckProc);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
class spell_mage_mirror_image : public AuraScript
|
||||
{
|
||||
return new spell_mage_molten_armor_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_mage_mirror_image : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_mage_mirror_image() : SpellScriptLoader("spell_mage_mirror_image") { }
|
||||
|
||||
class spell_mage_mirror_image_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_mirror_image_AuraScript)
|
||||
PrepareAuraScript(spell_mage_mirror_image)
|
||||
|
||||
void HandleEffectApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
@@ -235,25 +185,14 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_mage_mirror_image_AuraScript::HandleEffectApply, EFFECT_2, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_mage_mirror_image_AuraScript::CalcPeriodic, EFFECT_2, SPELL_AURA_PERIODIC_DUMMY);
|
||||
OnEffectApply += AuraEffectApplyFn(spell_mage_mirror_image::HandleEffectApply, EFFECT_2, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_mage_mirror_image::CalcPeriodic, EFFECT_2, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
class spell_mage_burnout : public AuraScript
|
||||
{
|
||||
return new spell_mage_mirror_image_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_mage_burnout : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_mage_burnout() : SpellScriptLoader("spell_mage_burnout") { }
|
||||
|
||||
class spell_mage_burnout_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_burnout_AuraScript);
|
||||
PrepareAuraScript(spell_mage_burnout);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
@@ -277,25 +216,14 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_mage_burnout_AuraScript::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_mage_burnout_AuraScript::HandleProc, EFFECT_1, SPELL_AURA_DUMMY);
|
||||
DoCheckProc += AuraCheckProcFn(spell_mage_burnout::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_mage_burnout::HandleProc, EFFECT_1, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
class spell_mage_burnout_trigger : public SpellScript
|
||||
{
|
||||
return new spell_mage_burnout_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_mage_burnout_trigger : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_mage_burnout_trigger() : SpellScriptLoader("spell_mage_burnout_trigger") { }
|
||||
|
||||
class spell_mage_burnout_trigger_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_mage_burnout_trigger_SpellScript);
|
||||
PrepareSpellScript(spell_mage_burnout_trigger);
|
||||
|
||||
void HandleDummy(SpellEffIndex effIndex)
|
||||
{
|
||||
@@ -309,24 +237,13 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_mage_burnout_trigger_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_POWER_BURN);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_mage_burnout_trigger::HandleDummy, EFFECT_0, SPELL_EFFECT_POWER_BURN);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
class spell_mage_pet_scaling : public AuraScript
|
||||
{
|
||||
return new spell_mage_burnout_trigger_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_mage_pet_scaling : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_mage_pet_scaling() : SpellScriptLoader("spell_mage_pet_scaling") { }
|
||||
|
||||
class spell_mage_pet_scaling_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_pet_scaling_AuraScript);
|
||||
PrepareAuraScript(spell_mage_pet_scaling);
|
||||
|
||||
void CalculateResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
@@ -419,37 +336,26 @@ public:
|
||||
void Register() override
|
||||
{
|
||||
if (m_scriptSpellId != 35657)
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_pet_scaling_AuraScript::CalculateResistanceAmount, EFFECT_ALL, SPELL_AURA_MOD_RESISTANCE);
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_pet_scaling::CalculateResistanceAmount, EFFECT_ALL, SPELL_AURA_MOD_RESISTANCE);
|
||||
|
||||
if (m_scriptSpellId == 35657 || m_scriptSpellId == 35658)
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_pet_scaling_AuraScript::CalculateStatAmount, EFFECT_ALL, SPELL_AURA_MOD_STAT);
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_pet_scaling::CalculateStatAmount, EFFECT_ALL, SPELL_AURA_MOD_STAT);
|
||||
|
||||
if (m_scriptSpellId == 35657)
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_pet_scaling_AuraScript::CalculateAPAmount, EFFECT_ALL, SPELL_AURA_MOD_ATTACK_POWER);
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_pet_scaling_AuraScript::CalculateSPAmount, EFFECT_ALL, SPELL_AURA_MOD_DAMAGE_DONE);
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_pet_scaling::CalculateAPAmount, EFFECT_ALL, SPELL_AURA_MOD_ATTACK_POWER);
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_pet_scaling::CalculateSPAmount, EFFECT_ALL, SPELL_AURA_MOD_DAMAGE_DONE);
|
||||
}
|
||||
|
||||
OnEffectApply += AuraEffectApplyFn(spell_mage_pet_scaling_AuraScript::HandleEffectApply, EFFECT_ALL, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL);
|
||||
DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_mage_pet_scaling_AuraScript::CalcPeriodic, EFFECT_ALL, SPELL_AURA_ANY);
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_mage_pet_scaling_AuraScript::HandlePeriodic, EFFECT_ALL, SPELL_AURA_ANY);
|
||||
OnEffectApply += AuraEffectApplyFn(spell_mage_pet_scaling::HandleEffectApply, EFFECT_ALL, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL);
|
||||
DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_mage_pet_scaling::CalcPeriodic, EFFECT_ALL, SPELL_AURA_ANY);
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_mage_pet_scaling::HandlePeriodic, EFFECT_ALL, SPELL_AURA_ANY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
class spell_mage_brain_freeze : public AuraScript
|
||||
{
|
||||
return new spell_mage_pet_scaling_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_mage_brain_freeze : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_mage_brain_freeze() : SpellScriptLoader("spell_mage_brain_freeze") { }
|
||||
|
||||
class spell_mage_brain_freeze_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_brain_freeze_AuraScript);
|
||||
PrepareAuraScript(spell_mage_brain_freeze);
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
@@ -466,24 +372,13 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_mage_brain_freeze_AuraScript::CheckProc);
|
||||
DoCheckProc += AuraCheckProcFn(spell_mage_brain_freeze::CheckProc);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
class spell_mage_glyph_of_eternal_water : public AuraScript
|
||||
{
|
||||
return new spell_mage_brain_freeze_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_mage_glyph_of_eternal_water : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_mage_glyph_of_eternal_water() : SpellScriptLoader("spell_mage_glyph_of_eternal_water") { }
|
||||
|
||||
class spell_mage_glyph_of_eternal_water_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_glyph_of_eternal_water_AuraScript);
|
||||
PrepareAuraScript(spell_mage_glyph_of_eternal_water);
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
@@ -496,24 +391,13 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_mage_glyph_of_eternal_water_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_mage_glyph_of_eternal_water::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
class spell_mage_combustion_proc : public AuraScript
|
||||
{
|
||||
return new spell_mage_glyph_of_eternal_water_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_mage_combustion_proc : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_mage_combustion_proc() : SpellScriptLoader("spell_mage_combustion_proc") {}
|
||||
|
||||
class spell_mage_combustion_proc_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_combustion_proc_AuraScript);
|
||||
PrepareAuraScript(spell_mage_combustion_proc);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
@@ -527,17 +411,10 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_mage_combustion_proc_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_ADD_FLAT_MODIFIER, AURA_EFFECT_HANDLE_REAL);
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_mage_combustion_proc::OnRemove, EFFECT_0, SPELL_AURA_ADD_FLAT_MODIFIER, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_mage_combustion_proc_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// Theirs
|
||||
// Incanter's Absorbtion
|
||||
class spell_mage_incanters_absorbtion_base_AuraScript : public AuraScript
|
||||
{
|
||||
@@ -567,14 +444,9 @@ public:
|
||||
};
|
||||
|
||||
// -11113 - Blast Wave
|
||||
class spell_mage_blast_wave : public SpellScriptLoader
|
||||
class spell_mage_blast_wave : public SpellScript
|
||||
{
|
||||
public:
|
||||
spell_mage_blast_wave() : SpellScriptLoader("spell_mage_blast_wave") { }
|
||||
|
||||
class spell_mage_blast_wave_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_mage_blast_wave_SpellScript);
|
||||
PrepareSpellScript(spell_mage_blast_wave);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
@@ -589,25 +461,14 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_mage_blast_wave_SpellScript::HandleKnockBack, EFFECT_2, SPELL_EFFECT_KNOCK_BACK);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_mage_blast_wave_SpellScript();
|
||||
OnEffectHitTarget += SpellEffectFn(spell_mage_blast_wave::HandleKnockBack, EFFECT_2, SPELL_EFFECT_KNOCK_BACK);
|
||||
}
|
||||
};
|
||||
|
||||
// 11958 - Cold Snap
|
||||
class spell_mage_cold_snap : public SpellScriptLoader
|
||||
class spell_mage_cold_snap : public SpellScript
|
||||
{
|
||||
public:
|
||||
spell_mage_cold_snap() : SpellScriptLoader("spell_mage_cold_snap") { }
|
||||
|
||||
class spell_mage_cold_snap_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_mage_cold_snap_SpellScript);
|
||||
PrepareSpellScript(spell_mage_cold_snap);
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
@@ -636,26 +497,15 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHit += SpellEffectFn(spell_mage_cold_snap_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_mage_cold_snap_SpellScript();
|
||||
OnEffectHit += SpellEffectFn(spell_mage_cold_snap::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
// -543 - Fire Ward
|
||||
// -6143 - Frost Ward
|
||||
class spell_mage_fire_frost_ward : public SpellScriptLoader
|
||||
class spell_mage_fire_frost_ward : public spell_mage_incanters_absorbtion_base_AuraScript
|
||||
{
|
||||
public:
|
||||
spell_mage_fire_frost_ward() : SpellScriptLoader("spell_mage_fire_frost_ward") { }
|
||||
|
||||
class spell_mage_fire_frost_ward_AuraScript : public spell_mage_incanters_absorbtion_base_AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_fire_frost_ward_AuraScript);
|
||||
PrepareAuraScript(spell_mage_fire_frost_ward);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
@@ -705,27 +555,16 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_fire_frost_ward_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
|
||||
OnEffectAbsorb += AuraEffectAbsorbFn(spell_mage_fire_frost_ward_AuraScript::Absorb, EFFECT_0);
|
||||
AfterEffectAbsorb += AuraEffectAbsorbFn(spell_mage_fire_frost_ward_AuraScript::Trigger, EFFECT_0);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_mage_fire_frost_ward_AuraScript();
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_fire_frost_ward::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
|
||||
OnEffectAbsorb += AuraEffectAbsorbFn(spell_mage_fire_frost_ward::Absorb, EFFECT_0);
|
||||
AfterEffectAbsorb += AuraEffectAbsorbFn(spell_mage_fire_frost_ward::Trigger, EFFECT_0);
|
||||
}
|
||||
};
|
||||
|
||||
// 54646 - Focus Magic
|
||||
class spell_mage_focus_magic : public SpellScriptLoader
|
||||
class spell_mage_focus_magic : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_mage_focus_magic() : SpellScriptLoader("spell_mage_focus_magic") { }
|
||||
|
||||
class spell_mage_focus_magic_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_focus_magic_AuraScript);
|
||||
PrepareAuraScript(spell_mage_focus_magic);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
@@ -752,26 +591,20 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_mage_focus_magic_AuraScript::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_mage_focus_magic_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_MOD_SPELL_CRIT_CHANCE);
|
||||
DoCheckProc += AuraCheckProcFn(spell_mage_focus_magic::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_mage_focus_magic::HandleProc, EFFECT_0, SPELL_AURA_MOD_SPELL_CRIT_CHANCE);
|
||||
}
|
||||
|
||||
private:
|
||||
Unit* _procTarget;
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_mage_focus_magic_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// -11426 - Ice Barrier
|
||||
class spell_mage_ice_barrier : public SpellScriptLoader
|
||||
class spell_mage_ice_barrier_aura : public spell_mage_incanters_absorbtion_base_AuraScript
|
||||
{
|
||||
public:
|
||||
spell_mage_ice_barrier() : SpellScriptLoader("spell_mage_ice_barrier") { }
|
||||
PrepareAuraScript(spell_mage_ice_barrier_aura);
|
||||
|
||||
// TODO: Rework
|
||||
static int32 CalculateSpellAmount(Unit* caster, int32 amount, const SpellInfo* spellInfo, const AuraEffect* aurEff)
|
||||
{
|
||||
// +80.68% from sp bonus
|
||||
@@ -789,10 +622,6 @@ public:
|
||||
return amount;
|
||||
}
|
||||
|
||||
class spell_mage_ice_barrier_AuraScript : public spell_mage_incanters_absorbtion_base_AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_ice_barrier_AuraScript);
|
||||
|
||||
void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& canBeRecalculated)
|
||||
{
|
||||
canBeRecalculated = false;
|
||||
@@ -802,19 +631,32 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_ice_barrier_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
|
||||
AfterEffectAbsorb += AuraEffectAbsorbFn(spell_mage_ice_barrier_AuraScript::Trigger, EFFECT_0);
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_ice_barrier_aura::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
|
||||
AfterEffectAbsorb += AuraEffectAbsorbFn(spell_mage_ice_barrier_aura::Trigger, EFFECT_0);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
class spell_mage_ice_barrier : public SpellScript
|
||||
{
|
||||
return new spell_mage_ice_barrier_AuraScript();
|
||||
}
|
||||
PrepareSpellScript(spell_mage_ice_barrier);
|
||||
|
||||
class spell_mage_ice_barrier_SpellScript : public SpellScript
|
||||
// TODO: Rework
|
||||
static int32 CalculateSpellAmount(Unit* caster, int32 amount, const SpellInfo* spellInfo, const AuraEffect* aurEff)
|
||||
{
|
||||
PrepareSpellScript(spell_mage_ice_barrier_SpellScript);
|
||||
// +80.68% from sp bonus
|
||||
float bonus = 0.8068f;
|
||||
|
||||
bonus *= caster->SpellBaseDamageBonusDone(spellInfo->GetSchoolMask());
|
||||
|
||||
// Glyph of Ice Barrier: its weird having a SPELLMOD_ALL_EFFECTS here but its blizzards doing :)
|
||||
// Glyph of Ice Barrier is only applied at the spell damage bonus because it was already applied to the base value in CalculateSpellDamage
|
||||
bonus = caster->ApplyEffectModifiers(spellInfo, aurEff->GetEffIndex(), bonus);
|
||||
|
||||
bonus *= caster->CalculateLevelPenalty(spellInfo);
|
||||
|
||||
amount += int32(bonus);
|
||||
return amount;
|
||||
}
|
||||
|
||||
SpellCastResult CheckCast()
|
||||
{
|
||||
@@ -834,25 +676,14 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnCheckCast += SpellCheckCastFn(spell_mage_ice_barrier_SpellScript::CheckCast);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_mage_ice_barrier_SpellScript;
|
||||
OnCheckCast += SpellCheckCastFn(spell_mage_ice_barrier::CheckCast);
|
||||
}
|
||||
};
|
||||
|
||||
// -11119 - Ignite
|
||||
class spell_mage_ignite : public SpellScriptLoader
|
||||
class spell_mage_ignite : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_mage_ignite() : SpellScriptLoader("spell_mage_ignite") { }
|
||||
|
||||
class spell_mage_ignite_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_ignite_AuraScript);
|
||||
PrepareAuraScript(spell_mage_ignite);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
@@ -899,26 +730,15 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_mage_ignite_AuraScript::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_mage_ignite_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_mage_ignite_AuraScript();
|
||||
DoCheckProc += AuraCheckProcFn(spell_mage_ignite::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_mage_ignite::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
// -44457 - Living Bomb
|
||||
class spell_mage_living_bomb : public SpellScriptLoader
|
||||
class spell_mage_living_bomb : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_mage_living_bomb() : SpellScriptLoader("spell_mage_living_bomb") { }
|
||||
|
||||
class spell_mage_living_bomb_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_living_bomb_AuraScript);
|
||||
PrepareAuraScript(spell_mage_living_bomb);
|
||||
|
||||
bool Validate(SpellInfo const* spell) override
|
||||
{
|
||||
@@ -939,25 +759,14 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_mage_living_bomb_AuraScript::AfterRemove, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_mage_living_bomb_AuraScript();
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_mage_living_bomb::AfterRemove, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
// -1463 - Mana Shield
|
||||
class spell_mage_mana_shield : public SpellScriptLoader
|
||||
class spell_mage_mana_shield : public spell_mage_incanters_absorbtion_base_AuraScript
|
||||
{
|
||||
public:
|
||||
spell_mage_mana_shield() : SpellScriptLoader("spell_mage_mana_shield") { }
|
||||
|
||||
class spell_mage_mana_shield_AuraScript : public spell_mage_incanters_absorbtion_base_AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_mana_shield_AuraScript);
|
||||
PrepareAuraScript(spell_mage_mana_shield);
|
||||
|
||||
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
|
||||
{
|
||||
@@ -976,26 +785,15 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_mana_shield_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_MANA_SHIELD);
|
||||
AfterEffectManaShield += AuraEffectManaShieldFn(spell_mage_mana_shield_AuraScript::Trigger, EFFECT_0);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_mage_mana_shield_AuraScript();
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_mana_shield::CalculateAmount, EFFECT_0, SPELL_AURA_MANA_SHIELD);
|
||||
AfterEffectManaShield += AuraEffectManaShieldFn(spell_mage_mana_shield::Trigger, EFFECT_0);
|
||||
}
|
||||
};
|
||||
|
||||
// -29074 - Master of Elements
|
||||
class spell_mage_master_of_elements : public SpellScriptLoader
|
||||
class spell_mage_master_of_elements : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_mage_master_of_elements() : SpellScriptLoader("spell_mage_master_of_elements") { }
|
||||
|
||||
class spell_mage_master_of_elements_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_master_of_elements_AuraScript);
|
||||
PrepareAuraScript(spell_mage_master_of_elements);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
@@ -1049,8 +847,8 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_mage_master_of_elements_AuraScript::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_mage_master_of_elements_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
DoCheckProc += AuraCheckProcFn(spell_mage_master_of_elements::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_mage_master_of_elements::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -1058,12 +856,6 @@ public:
|
||||
uint8 ticksModifier = 1;
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_mage_master_of_elements_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
enum SilvermoonPolymorph
|
||||
{
|
||||
NPC_AUROSALIA = 18744,
|
||||
@@ -1071,14 +863,9 @@ enum SilvermoonPolymorph
|
||||
|
||||
/// @todo move out of here and rename - not a mage spell
|
||||
// 32826 - Polymorph (Visual)
|
||||
class spell_mage_polymorph_cast_visual : public SpellScriptLoader
|
||||
class spell_mage_polymorph_cast_visual : public SpellScript
|
||||
{
|
||||
public:
|
||||
spell_mage_polymorph_cast_visual() : SpellScriptLoader("spell_mage_polymorph_visual") { }
|
||||
|
||||
class spell_mage_polymorph_cast_visual_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_mage_polymorph_cast_visual_SpellScript);
|
||||
PrepareSpellScript(spell_mage_polymorph_cast_visual);
|
||||
|
||||
static const uint32 PolymorhForms[6];
|
||||
|
||||
@@ -1100,17 +887,11 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_mage_polymorph_cast_visual_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_mage_polymorph_cast_visual::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_mage_polymorph_cast_visual_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
const uint32 spell_mage_polymorph_cast_visual::spell_mage_polymorph_cast_visual_SpellScript::PolymorhForms[6] =
|
||||
const uint32 spell_mage_polymorph_cast_visual::spell_mage_polymorph_cast_visual::PolymorhForms[6] =
|
||||
{
|
||||
SPELL_MAGE_SQUIRREL_FORM,
|
||||
SPELL_MAGE_GIRAFFE_FORM,
|
||||
@@ -1121,14 +902,9 @@ const uint32 spell_mage_polymorph_cast_visual::spell_mage_polymorph_cast_visual_
|
||||
};
|
||||
|
||||
// 31687 - Summon Water Elemental
|
||||
class spell_mage_summon_water_elemental : public SpellScriptLoader
|
||||
class spell_mage_summon_water_elemental : public SpellScript
|
||||
{
|
||||
public:
|
||||
spell_mage_summon_water_elemental() : SpellScriptLoader("spell_mage_summon_water_elemental") { }
|
||||
|
||||
class spell_mage_summon_water_elemental_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_mage_summon_water_elemental_SpellScript)
|
||||
PrepareSpellScript(spell_mage_summon_water_elemental)
|
||||
bool Validate(SpellInfo const* /*spellEntry*/) override
|
||||
{
|
||||
return ValidateSpellInfo(
|
||||
@@ -1166,41 +942,32 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHit += SpellEffectFn(spell_mage_summon_water_elemental_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_mage_summon_water_elemental_SpellScript();
|
||||
OnEffectHit += SpellEffectFn(spell_mage_summon_water_elemental::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_mage_spell_scripts()
|
||||
{
|
||||
// Ours
|
||||
new spell_mage_arcane_blast();
|
||||
new spell_mage_deep_freeze();
|
||||
new spell_mage_burning_determination();
|
||||
new spell_mage_molten_armor();
|
||||
new spell_mage_mirror_image();
|
||||
new spell_mage_burnout();
|
||||
new spell_mage_burnout_trigger();
|
||||
new spell_mage_pet_scaling();
|
||||
new spell_mage_brain_freeze();
|
||||
new spell_mage_glyph_of_eternal_water();
|
||||
new spell_mage_combustion_proc();
|
||||
|
||||
// Theirs
|
||||
new spell_mage_blast_wave();
|
||||
new spell_mage_cold_snap();
|
||||
new spell_mage_fire_frost_ward();
|
||||
new spell_mage_focus_magic();
|
||||
new spell_mage_ice_barrier();
|
||||
new spell_mage_ignite();
|
||||
new spell_mage_living_bomb();
|
||||
new spell_mage_mana_shield();
|
||||
new spell_mage_master_of_elements();
|
||||
new spell_mage_polymorph_cast_visual();
|
||||
new spell_mage_summon_water_elemental();
|
||||
RegisterSpellScript(spell_mage_arcane_blast);
|
||||
RegisterSpellScript(spell_mage_deep_freeze);
|
||||
RegisterSpellScript(spell_mage_burning_determination);
|
||||
RegisterSpellScript(spell_mage_molten_armor);
|
||||
RegisterSpellScript(spell_mage_mirror_image);
|
||||
RegisterSpellScript(spell_mage_burnout);
|
||||
RegisterSpellScript(spell_mage_burnout_trigger);
|
||||
RegisterSpellScript(spell_mage_pet_scaling);
|
||||
RegisterSpellScript(spell_mage_brain_freeze);
|
||||
RegisterSpellScript(spell_mage_glyph_of_eternal_water);
|
||||
RegisterSpellScript(spell_mage_combustion_proc);
|
||||
RegisterSpellScript(spell_mage_blast_wave);
|
||||
RegisterSpellScript(spell_mage_cold_snap);
|
||||
RegisterSpellScript(spell_mage_fire_frost_ward);
|
||||
RegisterSpellScript(spell_mage_focus_magic);
|
||||
RegisterSpellScript(spell_mage_ice_barrier);
|
||||
RegisterSpellScript(spell_mage_ignite);
|
||||
RegisterSpellScript(spell_mage_living_bomb);
|
||||
RegisterSpellScript(spell_mage_mana_shield);
|
||||
RegisterSpellScript(spell_mage_master_of_elements);
|
||||
RegisterSpellScript(spell_mage_polymorph_cast_visual);
|
||||
RegisterSpellScript(spell_mage_summon_water_elemental);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user