Misc: Reorder more scripts in some script files and some cosmetic stuff
This commit is contained in:
1 parent
ecbcca8794
commit
95f8068a6f
5 files changed
+949
-944
No files matched your search
@@ -29,6 +29,10 @@
|
||||
enum MageSpells
|
||||
{
|
||||
SPELL_MAGE_COLD_SNAP = 11958,
|
||||
SPELL_MAGE_FROST_WARDING_R1 = 28332,
|
||||
SPELL_MAGE_FROST_WARDING_TRIGGERED = 57776,
|
||||
SPELL_MAGE_INCANTERS_ABSORBTION_R1 = 44394,
|
||||
SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED = 44413,
|
||||
SPELL_MAGE_SQUIRREL_FORM = 32813,
|
||||
SPELL_MAGE_GIRAFFE_FORM = 32816,
|
||||
SPELL_MAGE_SERPENT_FORM = 32817,
|
||||
@@ -41,6 +45,7 @@ enum MageSpells
|
||||
SPELL_MAGE_GLYPH_OF_BLAST_WAVE = 62126,
|
||||
};
|
||||
|
||||
// -11113 - Blast Wave
|
||||
class spell_mage_blast_wave : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -50,7 +55,7 @@ class spell_mage_blast_wave : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_mage_blast_wave_SpellScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_GLYPH_OF_BLAST_WAVE))
|
||||
return false;
|
||||
@@ -75,6 +80,7 @@ class spell_mage_blast_wave : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 11958 - Cold Snap
|
||||
class spell_mage_cold_snap : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -91,7 +97,6 @@ class spell_mage_cold_snap : public SpellScriptLoader
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
|
||||
Player* caster = GetCaster()->ToPlayer();
|
||||
// immediately finishes the cooldown on Frost spells
|
||||
const SpellCooldowns& cm = caster->GetSpellCooldownMap();
|
||||
@@ -112,7 +117,6 @@ class spell_mage_cold_snap : public SpellScriptLoader
|
||||
|
||||
void Register()
|
||||
{
|
||||
// add dummy effect spell handler to Cold Snap
|
||||
OnEffectHit += SpellEffectFn(spell_mage_cold_snap_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
@@ -123,102 +127,7 @@ class spell_mage_cold_snap : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
enum SilvermoonPolymorph
|
||||
{
|
||||
NPC_AUROSALIA = 18744,
|
||||
};
|
||||
|
||||
// TODO: move out of here and rename - not a mage spell
|
||||
class spell_mage_polymorph_cast_visual : public SpellScriptLoader
|
||||
{
|
||||
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);
|
||||
|
||||
static const uint32 PolymorhForms[6];
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
// check if spell ids exist in dbc
|
||||
for (uint32 i = 0; i < 6; i++)
|
||||
if (!sSpellMgr->GetSpellInfo(PolymorhForms[i]))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* target = GetCaster()->FindNearestCreature(NPC_AUROSALIA, 30.0f))
|
||||
if (target->GetTypeId() == TYPEID_UNIT)
|
||||
target->CastSpell(target, PolymorhForms[urand(0, 5)], true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
// add dummy effect spell handler to Polymorph visual
|
||||
OnEffectHitTarget += SpellEffectFn(spell_mage_polymorph_cast_visual_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_mage_polymorph_cast_visual_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
const uint32 spell_mage_polymorph_cast_visual::spell_mage_polymorph_cast_visual_SpellScript::PolymorhForms[6] =
|
||||
{
|
||||
SPELL_MAGE_SQUIRREL_FORM,
|
||||
SPELL_MAGE_GIRAFFE_FORM,
|
||||
SPELL_MAGE_SERPENT_FORM,
|
||||
SPELL_MAGE_DRAGONHAWK_FORM,
|
||||
SPELL_MAGE_WORGEN_FORM,
|
||||
SPELL_MAGE_SHEEP_FORM
|
||||
};
|
||||
|
||||
class spell_mage_summon_water_elemental : public SpellScriptLoader
|
||||
{
|
||||
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);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_GLYPH_OF_ETERNAL_WATER) || !sSpellMgr->GetSpellInfo(SPELL_MAGE_SUMMON_WATER_ELEMENTAL_TEMPORARY) || !sSpellMgr->GetSpellInfo(SPELL_MAGE_SUMMON_WATER_ELEMENTAL_PERMANENT))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
// Glyph of Eternal Water
|
||||
if (caster->HasAura(SPELL_MAGE_GLYPH_OF_ETERNAL_WATER))
|
||||
caster->CastSpell(caster, SPELL_MAGE_SUMMON_WATER_ELEMENTAL_PERMANENT, true);
|
||||
else
|
||||
caster->CastSpell(caster, SPELL_MAGE_SUMMON_WATER_ELEMENTAL_TEMPORARY, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
// add dummy effect spell handler to Summon Water Elemental
|
||||
OnEffectHit += SpellEffectFn(spell_mage_summon_water_elemental_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_mage_summon_water_elemental_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
// Frost Warding
|
||||
// -543, -6143 - Frost Warding
|
||||
class spell_mage_frost_warding_trigger : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -228,13 +137,7 @@ class spell_mage_frost_warding_trigger : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_mage_frost_warding_trigger_AuraScript);
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_MAGE_FROST_WARDING_TRIGGERED = 57776,
|
||||
SPELL_MAGE_FROST_WARDING_R1 = 28332,
|
||||
};
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_FROST_WARDING_TRIGGERED) || !sSpellMgr->GetSpellInfo(SPELL_MAGE_FROST_WARDING_R1))
|
||||
return false;
|
||||
@@ -274,13 +177,8 @@ class spell_mage_frost_warding_trigger : public SpellScriptLoader
|
||||
class spell_mage_incanters_absorbtion_base_AuraScript : public AuraScript
|
||||
{
|
||||
public:
|
||||
enum Spells
|
||||
{
|
||||
SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED = 44413,
|
||||
SPELL_MAGE_INCANTERS_ABSORBTION_R1 = 44394,
|
||||
};
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
{
|
||||
return sSpellMgr->GetSpellInfo(SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED)
|
||||
&& sSpellMgr->GetSpellInfo(SPELL_MAGE_INCANTERS_ABSORBTION_R1);
|
||||
@@ -298,50 +196,51 @@ class spell_mage_incanters_absorbtion_base_AuraScript : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// Incanter's Absorption
|
||||
// -543, -6143, -11426 - Incanter's Absorption
|
||||
class spell_mage_incanters_absorbtion_absorb : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_mage_incanters_absorbtion_absorb() : SpellScriptLoader("spell_mage_incanters_absorbtion_absorb") { }
|
||||
public:
|
||||
spell_mage_incanters_absorbtion_absorb() : SpellScriptLoader("spell_mage_incanters_absorbtion_absorb") { }
|
||||
|
||||
class spell_mage_incanters_absorbtion_absorb_AuraScript : public spell_mage_incanters_absorbtion_base_AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_incanters_absorbtion_absorb_AuraScript);
|
||||
|
||||
void Register()
|
||||
class spell_mage_incanters_absorbtion_absorb_AuraScript : public spell_mage_incanters_absorbtion_base_AuraScript
|
||||
{
|
||||
AfterEffectAbsorb += AuraEffectAbsorbFn(spell_mage_incanters_absorbtion_absorb_AuraScript::Trigger, EFFECT_0);
|
||||
}
|
||||
};
|
||||
PrepareAuraScript(spell_mage_incanters_absorbtion_absorb_AuraScript);
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_mage_incanters_absorbtion_absorb_AuraScript();
|
||||
}
|
||||
void Register()
|
||||
{
|
||||
AfterEffectAbsorb += AuraEffectAbsorbFn(spell_mage_incanters_absorbtion_absorb_AuraScript::Trigger, EFFECT_0);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_mage_incanters_absorbtion_absorb_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// Incanter's Absorption
|
||||
// -1463 - Incanter's Absorption
|
||||
class spell_mage_incanters_absorbtion_manashield : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_mage_incanters_absorbtion_manashield() : SpellScriptLoader("spell_mage_incanters_absorbtion_manashield") { }
|
||||
public:
|
||||
spell_mage_incanters_absorbtion_manashield() : SpellScriptLoader("spell_mage_incanters_absorbtion_manashield") { }
|
||||
|
||||
class spell_mage_incanters_absorbtion_manashield_AuraScript : public spell_mage_incanters_absorbtion_base_AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_incanters_absorbtion_manashield_AuraScript);
|
||||
|
||||
void Register()
|
||||
class spell_mage_incanters_absorbtion_manashield_AuraScript : public spell_mage_incanters_absorbtion_base_AuraScript
|
||||
{
|
||||
AfterEffectManaShield += AuraEffectManaShieldFn(spell_mage_incanters_absorbtion_manashield_AuraScript::Trigger, EFFECT_0);
|
||||
}
|
||||
};
|
||||
PrepareAuraScript(spell_mage_incanters_absorbtion_manashield_AuraScript);
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_mage_incanters_absorbtion_manashield_AuraScript();
|
||||
}
|
||||
void Register()
|
||||
{
|
||||
AfterEffectManaShield += AuraEffectManaShieldFn(spell_mage_incanters_absorbtion_manashield_AuraScript::Trigger, EFFECT_0);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_mage_incanters_absorbtion_manashield_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// -44457 - Living Bomb
|
||||
class spell_mage_living_bomb : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -380,6 +279,101 @@ class spell_mage_living_bomb : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
enum SilvermoonPolymorph
|
||||
{
|
||||
NPC_AUROSALIA = 18744,
|
||||
};
|
||||
|
||||
// TODO: move out of here and rename - not a mage spell
|
||||
// 32826 - Polymorph (Visual)
|
||||
class spell_mage_polymorph_cast_visual : public SpellScriptLoader
|
||||
{
|
||||
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);
|
||||
|
||||
static const uint32 PolymorhForms[6];
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
{
|
||||
// check if spell ids exist in dbc
|
||||
for (uint32 i = 0; i < 6; ++i)
|
||||
if (!sSpellMgr->GetSpellInfo(PolymorhForms[i]))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* target = GetCaster()->FindNearestCreature(NPC_AUROSALIA, 30.0f))
|
||||
if (target->GetTypeId() == TYPEID_UNIT)
|
||||
target->CastSpell(target, PolymorhForms[urand(0, 5)], true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_mage_polymorph_cast_visual_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_mage_polymorph_cast_visual_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
const uint32 spell_mage_polymorph_cast_visual::spell_mage_polymorph_cast_visual_SpellScript::PolymorhForms[6] =
|
||||
{
|
||||
SPELL_MAGE_SQUIRREL_FORM,
|
||||
SPELL_MAGE_GIRAFFE_FORM,
|
||||
SPELL_MAGE_SERPENT_FORM,
|
||||
SPELL_MAGE_DRAGONHAWK_FORM,
|
||||
SPELL_MAGE_WORGEN_FORM,
|
||||
SPELL_MAGE_SHEEP_FORM
|
||||
};
|
||||
|
||||
// 31687 - Summon Water Elemental
|
||||
class spell_mage_summon_water_elemental : public SpellScriptLoader
|
||||
{
|
||||
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);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_GLYPH_OF_ETERNAL_WATER) || !sSpellMgr->GetSpellInfo(SPELL_MAGE_SUMMON_WATER_ELEMENTAL_TEMPORARY) || !sSpellMgr->GetSpellInfo(SPELL_MAGE_SUMMON_WATER_ELEMENTAL_PERMANENT))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
// Glyph of Eternal Water
|
||||
if (caster->HasAura(SPELL_MAGE_GLYPH_OF_ETERNAL_WATER))
|
||||
caster->CastSpell(caster, SPELL_MAGE_SUMMON_WATER_ELEMENTAL_PERMANENT, true);
|
||||
else
|
||||
caster->CastSpell(caster, SPELL_MAGE_SUMMON_WATER_ELEMENTAL_TEMPORARY, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHit += SpellEffectFn(spell_mage_summon_water_elemental_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_mage_summon_water_elemental_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_mage_spell_scripts()
|
||||
{
|
||||
new spell_mage_blast_wave();
|
||||
@@ -387,7 +381,7 @@ void AddSC_mage_spell_scripts()
|
||||
new spell_mage_frost_warding_trigger();
|
||||
new spell_mage_incanters_absorbtion_absorb();
|
||||
new spell_mage_incanters_absorbtion_manashield();
|
||||
new spell_mage_living_bomb();
|
||||
new spell_mage_polymorph_cast_visual();
|
||||
new spell_mage_summon_water_elemental();
|
||||
new spell_mage_living_bomb();
|
||||
}
|
||||
Reference in new issue
Block a user