Convert spell scripts to new system.

--HG--
branch : trunk
This commit is contained in:
silinoron
2010-08-06 11:35:39 -07:00
parent 5a345eeade
commit 14459bc467
10 changed files with 523 additions and 528 deletions
-7
View File
@@ -25,12 +25,5 @@
void AddSC_deathknight_spell_scripts() void AddSC_deathknight_spell_scripts()
{ {
//Script *newscript;
/*
newscript = new Script;
newscript->Name = "spell_dk_";
newscript->GetSpellScript = &GetSpellScript_spell_dk_;
newscript->RegisterSelf();
*/
} }
@@ -25,12 +25,5 @@
void AddSC_druid_spell_scripts() void AddSC_druid_spell_scripts()
{ {
//Script *newscript;
/*
newscript = new Script;
newscript->Name = "spell_dru_";
newscript->GetSpellScript = &GetSpellScript_spell_dru_;
newscript->RegisterSelf();
*/
} }
+5 -5
View File
@@ -252,9 +252,9 @@ class spell_hun_pet_carrion_feeder : public SpellHandlerScript
void AddSC_hunter_spell_scripts() void AddSC_hunter_spell_scripts()
{ {
new spell_hun_last_stand_pet(); new spell_hun_last_stand_pet;
new spell_hun_masters_call(); new spell_hun_masters_call;
new spell_hun_readiness(); new spell_hun_readiness;
new spell_hun_pet_heart_of_the_phoenix(); new spell_hun_pet_heart_of_the_phoenix;
new spell_hun_pet_carrion_feeder(); new spell_hun_pet_carrion_feeder;
} }
+24 -19
View File
@@ -37,6 +37,11 @@ enum MageSpells
SPELL_MAGE_SUMMON_WATER_ELEMENTAL_TEMPORARY = 70907, SPELL_MAGE_SUMMON_WATER_ELEMENTAL_TEMPORARY = 70907,
}; };
class spell_mage_cold_snap : public SpellHandlerScript
{
public:
spell_mage_cold_snap() : SpellHandlerScript("spell_mage_cold_snap") { }
class spell_mage_cold_snap_SpellScript : public SpellScript class spell_mage_cold_snap_SpellScript : public SpellScript
{ {
void HandleDummy(SpellEffIndex effIndex) void HandleDummy(SpellEffIndex effIndex)
@@ -70,10 +75,16 @@ class spell_mage_cold_snap_SpellScript : public SpellScript
} }
}; };
SpellScript * GetSpellScript_spell_mage_cold_snap() SpellScript* GetSpellScript() const
{ {
return new spell_mage_cold_snap_SpellScript(); return new spell_mage_cold_snap_SpellScript();
} }
};
class spell_mage_polymorph_cast_visual : public SpellHandlerScript
{
public:
spell_mage_polymorph_cast_visual() : SpellHandlerScript("spell_mage_polymorph_visual") { }
class spell_mage_polymorph_cast_visual_SpellScript : public SpellScript class spell_mage_polymorph_cast_visual_SpellScript : public SpellScript
{ {
@@ -112,10 +123,16 @@ const uint32 spell_mage_polymorph_cast_visual_SpellScript::spell_list[6] =
SPELL_MAGE_SHEEP_FORM SPELL_MAGE_SHEEP_FORM
}; };
SpellScript * GetSpellScript_spell_mage_polymorph_visual() SpellScript* GetSpellScript() const
{ {
return new spell_mage_polymorph_cast_visual_SpellScript(); return new spell_mage_polymorph_cast_visual_SpellScript();
} }
};
class spell_mage_summon_water_elemental : public SpellHandlerScript
{
public:
spell_mage_summon_water_elemental() : SpellHandlerScript("spell_mage_summon_water_elemental") { }
class spell_mage_summon_water_elemental_SpellScript : public SpellScript class spell_mage_summon_water_elemental_SpellScript : public SpellScript
{ {
@@ -149,27 +166,15 @@ class spell_mage_summon_water_elemental_SpellScript : public SpellScript
} }
}; };
SpellScript * GetSpellScript_spell_mage_summon_water_elemental() SpellScript * GetSpellScript() const
{ {
return new spell_mage_summon_water_elemental_SpellScript(); return new spell_mage_summon_water_elemental_SpellScript();
} }
};
void AddSC_mage_spell_scripts() void AddSC_mage_spell_scripts()
{ {
Script *newscript; new spell_mage_cold_snap;
new spell_mage_polymorph_cast_visual;
newscript = new Script; new spell_mage_summon_water_elemental;
newscript->Name = "spell_mage_cold_snap";
newscript->GetSpellScript = &GetSpellScript_spell_mage_cold_snap;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "spell_mage_polymorph_visual";
newscript->GetSpellScript = &GetSpellScript_spell_mage_polymorph_visual;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "spell_mage_summon_water_elemental";
newscript->GetSpellScript = &GetSpellScript_spell_mage_summon_water_elemental;
newscript->RegisterSelf();
} }
+24 -19
View File
@@ -35,6 +35,11 @@ enum PaladinSpells
SPELL_BLESSING_OF_LOWER_CITY_SHAMAN = 37881, SPELL_BLESSING_OF_LOWER_CITY_SHAMAN = 37881,
}; };
class spell_pal_blessing_of_faith : public SpellHandlerScript
{
public:
spell_pal_blessing_of_faith() : SpellHandlerScript("spell_pal_blessing_of_faith") { }
class spell_pal_blessing_of_faith_SpellScript : public SpellScript class spell_pal_blessing_of_faith_SpellScript : public SpellScript
{ {
bool Validate(SpellEntry const *spellEntry) bool Validate(SpellEntry const *spellEntry)
@@ -75,10 +80,16 @@ class spell_pal_blessing_of_faith_SpellScript : public SpellScript
} }
}; };
SpellScript * GetSpellScript_spell_pal_blessing_of_faith() SpellScript *GetSpellScript() const
{ {
return new spell_pal_blessing_of_faith_SpellScript(); return new spell_pal_blessing_of_faith_SpellScript();
} }
};
class spell_pal_holy_shock : public SpellHandlerScript
{
public:
spell_pal_holy_shock() : SpellHandlerScript("spell_pal_holy_shock") { }
class spell_pal_holy_shock_SpellScript : public SpellScript class spell_pal_holy_shock_SpellScript : public SpellScript
{ {
@@ -122,10 +133,16 @@ class spell_pal_holy_shock_SpellScript : public SpellScript
} }
}; };
SpellScript * GetSpellScript_spell_pal_holy_shock() SpellScript *GetSpellScript() const
{ {
return new spell_pal_holy_shock_SpellScript(); return new spell_pal_holy_shock_SpellScript();
} }
};
class spell_pal_judgement_of_command : public SpellHandlerScript
{
public:
spell_pal_judgement_of_command() : SpellHandlerScript("spell_pal_judgement_of_command") { }
class spell_pal_judgement_of_command_SpellScript : public SpellScript class spell_pal_judgement_of_command_SpellScript : public SpellScript
{ {
@@ -143,27 +160,15 @@ class spell_pal_judgement_of_command_SpellScript : public SpellScript
} }
}; };
SpellScript * GetSpellScript_spell_pal_judgement_of_command() SpellScript *GetSpellScript() const
{ {
return new spell_pal_judgement_of_command_SpellScript(); return new spell_pal_judgement_of_command_SpellScript();
} }
};
void AddSC_paladin_spell_scripts() void AddSC_paladin_spell_scripts()
{ {
Script *newscript; new spell_pal_blessing_of_faith;
new spell_pal_holy_shock;
newscript = new Script; new spell_pal_judgement_of_command;
newscript->Name = "spell_pal_blessing_of_faith";
newscript->GetSpellScript = &GetSpellScript_spell_pal_blessing_of_faith;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "spell_pal_holy_shock";
newscript->GetSpellScript = &GetSpellScript_spell_pal_holy_shock;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "spell_pal_judgement_of_command";
newscript->GetSpellScript = &GetSpellScript_spell_pal_judgement_of_command;
newscript->RegisterSelf();
} }
+18 -15
View File
@@ -31,6 +31,11 @@ enum PriestSpells
PRIEST_SPELL_PENANCE_R1_HEAL = 47757, PRIEST_SPELL_PENANCE_R1_HEAL = 47757,
}; };
class spell_pri_pain_and_suffering_proc : public SpellHandlerScript
{
public:
spell_pri_pain_and_suffering_proc() : SpellHandlerScript("spell_pri_pain_and_suffering_proc") { }
// 47948 Pain and Suffering (proc) // 47948 Pain and Suffering (proc)
class spell_pri_pain_and_suffering_proc_SpellScript : public SpellScript class spell_pri_pain_and_suffering_proc_SpellScript : public SpellScript
{ {
@@ -48,10 +53,16 @@ class spell_pri_pain_and_suffering_proc_SpellScript : public SpellScript
} }
}; };
SpellScript *GetSpellScript_spell_pri_pain_and_suffering_proc() SpellScript *GetSpellScript() const
{ {
return new spell_pri_pain_and_suffering_proc_SpellScript(); return new spell_pri_pain_and_suffering_proc_SpellScript;
} }
};
class spell_pri_penance : public SpellHandlerScript
{
public:
spell_pri_penance() : SpellHandlerScript("spell_pri_penance") { }
class spell_pri_penance_SpellScript : public SpellScript class spell_pri_penance_SpellScript : public SpellScript
{ {
@@ -95,22 +106,14 @@ class spell_pri_penance_SpellScript : public SpellScript
} }
}; };
SpellScript *GetSpellScript_spell_pri_penance() SpellScript *GetSpellScript() const
{ {
return new spell_pri_penance_SpellScript(); return new spell_pri_penance_SpellScript;
} }
};
void AddSC_priest_spell_scripts() void AddSC_priest_spell_scripts()
{ {
Script *newscript; new spell_pri_pain_and_suffering_proc;
new spell_pri_penance;
newscript = new Script;
newscript->Name = "spell_pri_pain_and_suffering_proc";
newscript->GetSpellScript = &GetSpellScript_spell_pri_pain_and_suffering_proc;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "spell_pri_penance";
newscript->GetSpellScript = &GetSpellScript_spell_pri_penance;
newscript->RegisterSelf();
} }
+33 -26
View File
@@ -31,6 +31,11 @@ enum RogueSpells
ROGUE_SPELL_GLYPH_OF_PREPARATION = 56819, ROGUE_SPELL_GLYPH_OF_PREPARATION = 56819,
}; };
class spell_rog_cheat_death : public SpellHandlerScript
{
public:
spell_rog_cheat_death() : SpellHandlerScript("spell_rog_cheat_death") { }
class spell_rog_cheat_death_SpellScript : public SpellScript class spell_rog_cheat_death_SpellScript : public SpellScript
{ {
bool Validate(SpellEntry const * spellEntry) bool Validate(SpellEntry const * spellEntry)
@@ -53,10 +58,16 @@ class spell_rog_cheat_death_SpellScript : public SpellScript
} }
}; };
SpellScript *GetSpellScript_spell_rog_cheat_death() SpellScript *GetSpellScript() const
{ {
return new spell_rog_cheat_death_SpellScript(); return new spell_rog_cheat_death_SpellScript;
} }
};
class spell_rog_hunger_for_blood : public SpellHandlerScript
{
public:
spell_rog_hunger_for_blood() : SpellHandlerScript("spell_rog_hunger_for_blood") { }
class spell_rog_hunger_for_blood_SpellScript : public SpellScript class spell_rog_hunger_for_blood_SpellScript : public SpellScript
{ {
@@ -80,10 +91,16 @@ class spell_rog_hunger_for_blood_SpellScript : public SpellScript
} }
}; };
SpellScript *GetSpellScript_spell_rog_hunger_for_blood() SpellScript *GetSpellScript() const
{ {
return new spell_rog_hunger_for_blood_SpellScript(); return new spell_rog_hunger_for_blood_SpellScript();
} }
};
class spell_rog_preparation : public SpellHandlerScript
{
public:
spell_rog_preparation() : SpellHandlerScript("spell_rog_preparation") { }
class spell_rog_preparation_SpellScript : public SpellScript class spell_rog_preparation_SpellScript : public SpellScript
{ {
@@ -136,10 +153,16 @@ class spell_rog_preparation_SpellScript : public SpellScript
} }
}; };
SpellScript *GetSpellScript_spell_rog_preparation() SpellScript *GetSpellScript() const
{ {
return new spell_rog_preparation_SpellScript(); return new spell_rog_preparation_SpellScript();
} }
};
class spell_rog_shiv : public SpellHandlerScript
{
public:
spell_rog_shiv() : SpellHandlerScript("spell_rog_shiv") { }
class spell_rog_shiv_SpellScript : public SpellScript class spell_rog_shiv_SpellScript : public SpellScript
{ {
@@ -167,32 +190,16 @@ class spell_rog_shiv_SpellScript : public SpellScript
} }
}; };
SpellScript *GetSpellScript_spell_rog_shiv() SpellScript *GetSpellScript() const
{ {
return new spell_rog_shiv_SpellScript(); return new spell_rog_shiv_SpellScript();
} }
};
void AddSC_rogue_spell_scripts() void AddSC_rogue_spell_scripts()
{ {
Script *newscript; new spell_rog_cheat_death;
new spell_rog_hunger_for_blood;
newscript = new Script; new spell_rog_preparation;
newscript->Name = "spell_rog_cheat_death"; new spell_rog_shiv;
newscript->GetSpellScript = &GetSpellScript_spell_rog_cheat_death;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "spell_rog_hunger_for_blood";
newscript->GetSpellScript = &GetSpellScript_spell_rog_hunger_for_blood;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "spell_rog_preparation";
newscript->GetSpellScript = &GetSpellScript_spell_rog_preparation;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "spell_rog_shiv";
newscript->GetSpellScript = &GetSpellScript_spell_rog_shiv;
newscript->RegisterSelf();
} }
@@ -25,12 +25,5 @@
void AddSC_shaman_spell_scripts() void AddSC_shaman_spell_scripts()
{ {
//Script *newscript;
/*
newscript = new Script;
newscript->Name = "spell_sha_";
newscript->GetSpellScript = &GetSpellScript_spell_sha_;
newscript->RegisterSelf();
*/
} }
@@ -25,12 +25,5 @@
void AddSC_warlock_spell_scripts() void AddSC_warlock_spell_scripts()
{ {
//Script *newscript;
/*
newscript = new Script;
newscript->Name = "spell_warl_";
newscript->GetSpellScript = &GetSpellScript_spell_warl_;
newscript->RegisterSelf();
*/
} }
+16 -13
View File
@@ -29,6 +29,11 @@ enum WarriorSpells
WARRIOR_SPELL_WARRIORS_WRATH_TRIGGERED = 21887, WARRIOR_SPELL_WARRIORS_WRATH_TRIGGERED = 21887,
}; };
class spell_warr_last_stand : public SpellHandlerScript
{
public:
spell_warr_last_stand() : SpellHandlerScript("spell_warr_last_stand") { }
class spell_warr_last_stand_SpellScript : public SpellScript class spell_warr_last_stand_SpellScript : public SpellScript
{ {
bool Validate(SpellEntry const *spellEntry) bool Validate(SpellEntry const *spellEntry)
@@ -51,10 +56,16 @@ class spell_warr_last_stand_SpellScript : public SpellScript
} }
}; };
SpellScript * GetSpellScript_spell_warr_last_stand() SpellScript *GetSpellScript() const
{ {
return new spell_warr_last_stand_SpellScript(); return new spell_warr_last_stand_SpellScript();
} }
};
class spell_warr_warriors_wrath : public SpellHandlerScript
{
public:
spell_warr_warriors_wrath() : SpellHandlerScript("spell_warr_warriors_wrath") { }
class spell_warr_warriors_wrath_SpellScript : public SpellScript class spell_warr_warriors_wrath_SpellScript : public SpellScript
{ {
@@ -78,22 +89,14 @@ class spell_warr_warriors_wrath_SpellScript : public SpellScript
} }
}; };
SpellScript * GetSpellScript_spell_warr_warriors_wrath() SpellScript *GetSpellScript() const
{ {
return new spell_warr_warriors_wrath_SpellScript(); return new spell_warr_warriors_wrath_SpellScript();
} }
};
void AddSC_warrior_spell_scripts() void AddSC_warrior_spell_scripts()
{ {
Script *newscript; new spell_warr_last_stand;
new spell_warr_warriors_wrath;
newscript = new Script;
newscript->Name = "spell_warr_last_stand";
newscript->GetSpellScript = &GetSpellScript_spell_warr_last_stand;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "spell_warr_warriors_wrath";
newscript->GetSpellScript = &GetSpellScript_spell_warr_warriors_wrath;
newscript->RegisterSelf();
} }