diff options
| author | QAston <none@none> | 2010-08-24 00:10:49 +0200 |
|---|---|---|
| committer | QAston <none@none> | 2010-08-24 00:10:49 +0200 |
| commit | 07a3a1254b78a42a7836efee99dc3d821c726d28 (patch) | |
| tree | a60eea1353da993ef27cef51e6a30cbabd92a47f /src/server/scripts | |
| parent | e581feb551cb54803da1478da04032e260b35937 (diff) | |
*Add AuraScript class for scripting aura objects - scripts are registered same way as SpellScripts, bound to SpellScriptNames table. For more details see example_spell.cpp and SpellScript.h
*Rename SpellHandlerScript to SpellScriptLoader, EffectHandlerFn to SpellEffectFn, HitHandlerFn to SpellHitFn, SpellScript::EffectHandlers to SpellScript::OnEffect, these changes were neccesary to prevent namespace collisions, happily you can solve these by simple find and replace
*Make spells 66244 and 5581 example scripts.
--HG--
branch : trunk
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Examples/example_spell.cpp | 267 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp | 18 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_dk.cpp | 18 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_druid.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 13 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 50 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_mage.cpp | 18 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_paladin.cpp | 24 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_priest.cpp | 12 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 12 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_rogue.cpp | 24 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 12 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_warlock.cpp | 18 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_warrior.cpp | 6 |
15 files changed, 335 insertions, 169 deletions
diff --git a/src/server/scripts/Examples/example_spell.cpp b/src/server/scripts/Examples/example_spell.cpp index 9d7fa31ca9a..0f4226b9a99 100644 --- a/src/server/scripts/Examples/example_spell.cpp +++ b/src/server/scripts/Examples/example_spell.cpp @@ -23,115 +23,258 @@ */ #include "ScriptPCH.h" +#include "SpellAuras.h" +#include "SpellAuraEffects.h" -class spell_ex_49375 : public SpellHandlerScript +class spell_ex_5581 : public SpellScriptLoader { public: - spell_ex_49375() : SpellHandlerScript("spell_ex_49375") { } + spell_ex_5581() : SpellScriptLoader("spell_ex_5581") { } - class spell_ex_49375SpellScript : public SpellScript + class spell_ex_5581SpellScript : public SpellScript { + enum Spells + { + SPELL_TRIGGERED = 18282 + }; + std::string localVariable; char * localVariable2; - // effect handler hook - effIndex - effIndex of handled effect of a spell - void HandleDummy(SpellEffIndex /*effIndex*/) + // function called on server startup + // checks if script has data required for it to work + bool Validate(SpellEntry const * spellEntry) + { + // check if spellid 70522 exists in dbc, we will trigger it later + if (!sSpellStore.LookupEntry(SPELL_TRIGGERED)) + return false; + return true; + } + + // function called just after script is added to spell + // we initialize local variables if needed + bool Load() + { + localVariable = "we're using local variable"; + localVariable2 = new char; + return true; + // return false - script will be immediately removed from the spell + // for example - we don't want this script to be executed on a creature + // if (GetCaster()->GetTypeID() != TYPEID_PLAYER) + // return false; + } + + // function called just before script delete + // we free allocated memory + void Unload() + { + delete localVariable2; + } + + void HandleDummy(SpellEffIndex effIndex) { // we're handling SPELL_EFFECT_DUMMY in effIndex 0 here - sLog.outError("WE ARE HANDLING DUMMY!"); + sLog.outString("SPELL_EFFECT_DUMMY is executed on target!"); + sLog.outString(localVariable.c_str()); // make caster cast a spell on a unit target of effect if (Unit * target = GetHitUnit()) - GetCaster()->CastSpell(target, 70522, true); - }; + GetCaster()->CastSpell(target, SPELL_TRIGGERED, true); + } void HandleBeforeHit() { - sLog.outError("Spell is about to hit target!"); + sLog.outString("Spell is about to hit target!"); } void HandleOnHit() { - sLog.outError("Spell just hit target!"); + sLog.outString("Spell just hit target!"); } void HandleAfterHit() { - sLog.outError("Spell just finished hitting target!"); + sLog.outString("Spell just finished hitting target!"); } + // register functions used in spell script - names of these functions do not matter void Register() { // we're registering our function here // function HandleDummy will be called when unit is hit by spell, just before default effect 0 handler - EffectHandlers += EffectHandlerFn(spell_ex_49375SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_ex_5581SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); // this will prompt an error on startup because effect 0 of spell 49375 is set to SPELL_EFFECT_DUMMY, not SPELL_EFFECT_APPLY_AURA - //EffectHandlers += EffectHandlerFn(spell_gen_49375SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_APPLY_AURA); + //OnEffect += SpellEffectFn(spell_gen_49375SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_APPLY_AURA); // this will make HandleDummy function to be called on first != 0 effect of spell 49375 - //EffectHandlers += EffectHandlerFn(spell_gen_49375SpellScript::HandleDummy, EFFECT_FIRST_FOUND, SPELL_EFFECT_ANY); + //OnEffect += SpellEffectFn(spell_gen_49375SpellScript::HandleDummy, EFFECT_FIRST_FOUND, SPELL_EFFECT_ANY); // this will make HandleDummy function to be called on all != 0 effect of spell 49375 - //EffectHandlers += EffectHandlerFn(spell_gen_49375SpellScript::HandleDummy, EFFECT_ALL, SPELL_EFFECT_ANY); + //OnEffect += SpellEffectFn(spell_gen_49375SpellScript::HandleDummy, EFFECT_ALL, SPELL_EFFECT_ANY); // bind handler to BeforeHit event of the spell - BeforeHit += HitHandlerFn(spell_ex_49375SpellScript::HandleBeforeHit); + BeforeHit += SpellHitFn(spell_ex_5581SpellScript::HandleBeforeHit); // bind handler to OnHit event of the spell - OnHit += HitHandlerFn(spell_ex_49375SpellScript::HandleOnHit); + OnHit += SpellHitFn(spell_ex_5581SpellScript::HandleOnHit); // bind handler to AfterHit event of the spell - AfterHit += HitHandlerFn(spell_ex_49375SpellScript::HandleAfterHit); - }; + AfterHit += SpellHitFn(spell_ex_5581SpellScript::HandleAfterHit); + } + }; + // function which creates SpellScript + SpellScript *GetSpellScript() const + { + return new spell_ex_5581SpellScript(); + } +}; + +class spell_ex_66244 : public SpellScriptLoader +{ + public: + spell_ex_66244() : SpellScriptLoader("spell_ex_66244") { } + + class spell_ex_66244AuraScript : public AuraScript + { + enum Spells + { + SPELL_TRIGGERED = 18282 + }; // function called on server startup // checks if script has data required for it to work bool Validate(SpellEntry const * /*spellEntry*/) { - // check if spellid 1 exists in dbc - if (!sSpellStore.LookupEntry(70522)) + // check if spellid 70522 exists in dbc, we will trigger it later + if (!sSpellStore.LookupEntry(SPELL_TRIGGERED)) return false; return true; - }; + } - // function called just after script is added to spell + // function called in aura constructor // we initialize local variables if needed bool Load() { - localVariable = "WE'RE USING LOCAL VARIABLE"; - localVariable2 = new char; - return true; - // script will be immediately removed from the spell - // for example - we don't want this script to be executed on a creature - // if (GetCaster()->GetTypeID() != TYPEID_PLAYER) - // return false; + // do not load script if aura is casted by player or caster not avalible + if (Unit * caster = GetCaster()) + if (caster->GetTypeId() == TYPEID_PLAYER) + return true; + return false; } - // function called just before script delete - // we free allocated memory - void Unload() + void HandleEffectApply(AuraEffect const * aurEff, AuraApplication const * aurApp, AuraEffectHandleModes mode) { - delete localVariable2; + sLog.outString("Aura Effect is about to be applied on target!"); + Unit * target = aurApp->GetTarget(); + // cast spell on target on aura apply + target->CastSpell(target, SPELL_TRIGGERED, true); + } + + void HandleEffectRemove(AuraEffect const * aurEff, AuraApplication const * aurApp, AuraEffectHandleModes mode) + { + sLog.outString("Aura Effect is just removed on target!"); + Unit * target = aurApp->GetTarget(); + Unit * caster = GetCaster(); + // caster may be not avalible (logged out for example) + if (!caster) + return; + // cast spell on caster on aura remove + target->CastSpell(caster, SPELL_TRIGGERED, true); + } + + void HandleEffectPeriodic(AuraEffect const * aurEff, AuraApplication const * aurApp) + { + sLog.outString("Perioidic Aura Effect is does a tick on target!"); + Unit * target = aurApp->GetTarget(); + // aura targets damage self on tick + target->DealDamage(target, 100); + } + + void HandleEffectPeriodicUpdate(AuraEffect * aurEff) + { + sLog.outString("Perioidic Aura Effect is now updated!"); + // we're doubling aura amount every tick + aurEff->ChangeAmount(aurEff->GetAmount() * 2); + } + + void HandleEffectCalcAmount(AuraEffect const * aurEff, int32 & amount, bool & canBeRecalculated) + { + sLog.outString("Amount of Aura Effect is being calculated now!"); + // we're setting amount to 0 + amount = 100; + // amount will be never recalculated due to applying passive aura + canBeRecalculated = false; + } + + void HandleEffectCalcPeriodic(AuraEffect const * aurEff, bool & isPeriodic, int32 & amplitude) + { + sLog.outString("Periodic data of Aura Effect is being calculated now!"); + // we're setting aura to be periodic and tick every 10 seconds + isPeriodic = true; + amplitude = 2 * IN_MILLISECONDS; + } + + void HandleEffectCalcSpellMod(AuraEffect * const aurEff, SpellModifier *& spellMod) + { + sLog.outString("SpellMod data of Aura Effect is being calculated now!"); + // we don't want spellmod for example + if(spellMod) + { + delete spellMod; + spellMod = NULL; + } + /* + // alternative: we want spellmod for spell which doesn't have it + if (!spellMod) + { + spellMod = new SpellModifier(GetAura()); + spellMod->op = SPELLMOD_DOT; + spellMod->type = SPELLMOD_PCT; + spellMod->spellId = GetId(); + spellMod->mask[1] = 0x00002000; + } + */ + } + + // function registering + void Register() + { + OnEffectApply += AuraEffectApplyFn(spell_ex_66244AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + OnEffectRemove += AuraEffectRemoveFn(spell_ex_66244AuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + OnEffectPeriodic += AuraEffectPeriodicFn(spell_ex_66244AuraScript::HandleEffectPeriodic,EFFECT_0, SPELL_AURA_DUMMY); + OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_ex_66244AuraScript::HandleEffectPeriodicUpdate, EFFECT_0, SPELL_AURA_DUMMY); + OnEffectCalcAmount += AuraEffectCalcAmountFn(spell_ex_66244AuraScript::HandleEffectCalcAmount, EFFECT_0, SPELL_AURA_DUMMY); + OnEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_ex_66244AuraScript::HandleEffectCalcPeriodic, EFFECT_0, SPELL_AURA_DUMMY); + OnEffectCalcSpellMod += AuraEffectCalcSpellModFn(spell_ex_66244AuraScript::HandleEffectCalcSpellMod, EFFECT_0, SPELL_AURA_DUMMY); } }; - // function which creates SpellScript - SpellScript *GetSpellScript() const + // function which creates AuraScript + AuraScript *GetAuraScript() const { - return new spell_ex_49375SpellScript(); + return new spell_ex_66244AuraScript(); } }; + + +// this function has to be added to function set in ScriptLoader.cpp +void AddSC_example_spell_scripts() +{ + new spell_ex_5581; + new spell_ex_66244; +} + /* empty script for copypasting -class spell_ex : public SpellHandlerScript +class spell_ex : public SpellScriptLoader { public: - spell_ex() : SpellHandlerScript("spell_ex") { } + spell_ex() : SpellScriptLoader("spell_ex") { } class spell_ex_SpellScript : public SpellScript { - void Function(SpellEffIndex effIndex){} + //bool Validate(SpellEntry const * spellEntry){return true;} + //bool Load(){return true;} + //void Unload(){} + + //void Function(SpellEffIndex effIndex) //OnEffect += SpellEffectFn(spell_ex_SpellScript::Function, EFFECT_ANY, SPELL_EFFECT_ANY); + //void Function() //OnHit += SpellEffectFn(spell_ex_SpellScript::Function); void Register() { - //EffectHandlers += EffectHandlerFn(spell_ex_SpellScript::Function, EFFECT_ANY, SPELL_EFFECT_ANY); } - - //bool Load(){return true;} - //void Unload(){} - //bool Validate(SpellEntry const * spellEntry){return true;} }; SpellScript *GetSpellScript() const @@ -139,13 +282,35 @@ class spell_ex : public SpellHandlerScript return new spell_ex_SpellScript(); } }; - */ -// this function has to be added to function set in ScriptLoader.cpp -void AddSC_example_spell_scripts() +/* empty script for copypasting +class spell_ex : public SpellScriptLoader { -/* Commented out to prevent loading errors - new spell_ex_49375; + public: + spell_ex() : SpellScriptLoader("spell_ex") { } + + class spell_ex_AuraScript : public AuraScript + { + //bool Validate(SpellEntry const * spellEntry){return true;} + //bool Load(){return true;} + //void Unload(){} + + //void spell_ex_SpellScript::Function(AuraEffect const * aurEff, AuraApplication const * aurApp, AuraEffectHandleModes mode) //OnEffectApply += AuraEffectApplyFn(spell_ex_SpellScript::Function, EFFECT_ANY, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL); + //void spell_ex_SpellScript::Function(AuraEffect const * aurEff, AuraApplication const * aurApp, AuraEffectHandleModes mode) //OnEffectRemove += AuraEffectRemoveFn(spell_ex_SpellScript::Function, EFFECT_ANY, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL); + //void spell_ex_SpellScript::Function(AuraEffect const * aurEff, AuraApplication const * aurApp) //OnEffectPeriodic += AuraEffectPeriodicFn(spell_ex_SpellScript::Function, EFFECT_ANY, SPELL_AURA_ANY); + //void spell_ex_SpellScript::Function(AuraEffect * aurEff) //OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_ex_SpellScript::Function, EFFECT_ANY, SPELL_AURA_ANY); + //void spell_ex_SpellScript::Function(AuraEffect const * aurEff, int32 & amount, bool & canBeRecalculated) //OnEffectCalcAmount += AuraEffectCalcAmountFn(spell_ex_SpellScript::Function, EFFECT_ANY, SPELL_AURA_ANY); + //void spell_ex_SpellScript::Function(AuraEffect const * aurEff, bool & isPeriodic, int32 & amplitude) //OnEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_ex_SpellScript::Function, EFFECT_ANY, SPELL_AURA_ANY); + //void spell_ex_SpellScript::Function(AuraEffect * const aurEff, SpellModifier *& spellMod) //OnEffectCalcSpellMod += AuraEffectCalcSpellModFn(spell_ex_SpellScript::Function, EFFECT_ANY, SPELL_AURA_ANY); + void Register() + { + } + }; + + AuraScript *GetAuraScript() const + { + return new spell_ex_AuraScript(); + } +}; */ -} diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp index c882763e945..8517af8a658 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp @@ -748,10 +748,10 @@ class npc_vengeful_shade : public CreatureScript } }; -class spell_cultist_dark_martyrdom : public SpellHandlerScript +class spell_cultist_dark_martyrdom : public SpellScriptLoader { public: - spell_cultist_dark_martyrdom() : SpellHandlerScript("spell_cultist_dark_martyrdom") { } + spell_cultist_dark_martyrdom() : SpellScriptLoader("spell_cultist_dark_martyrdom") { } class spell_cultist_dark_martyrdom_SpellScript : public SpellScript { @@ -778,7 +778,7 @@ class spell_cultist_dark_martyrdom : public SpellHandlerScript void Register() { - EffectHandlers += EffectHandlerFn(spell_cultist_dark_martyrdom_SpellScript::HandleEffect, EFFECT_2, SPELL_EFFECT_FORCE_DESELECT); + OnEffect += SpellEffectFn(spell_cultist_dark_martyrdom_SpellScript::HandleEffect, EFFECT_2, SPELL_EFFECT_FORCE_DESELECT); } }; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp index 50a8214a35e..daaed063994 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp @@ -398,10 +398,10 @@ class npc_bone_spike : public CreatureScript } }; -class spell_marrowgar_coldflame : public SpellHandlerScript +class spell_marrowgar_coldflame : public SpellScriptLoader { public: - spell_marrowgar_coldflame() : SpellHandlerScript("spell_marrowgar_coldflame") { } + spell_marrowgar_coldflame() : SpellScriptLoader("spell_marrowgar_coldflame") { } class spell_marrowgar_coldflame_SpellScript : public SpellScript { @@ -417,7 +417,7 @@ class spell_marrowgar_coldflame : public SpellHandlerScript void Register() { - EffectHandlers += EffectHandlerFn(spell_marrowgar_coldflame_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + OnEffect += SpellEffectFn(spell_marrowgar_coldflame_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } bool Load() @@ -434,10 +434,10 @@ class spell_marrowgar_coldflame : public SpellHandlerScript } }; -class spell_marrowgar_bone_spike_graveyard : public SpellHandlerScript +class spell_marrowgar_bone_spike_graveyard : public SpellScriptLoader { public: - spell_marrowgar_bone_spike_graveyard() : SpellHandlerScript("spell_marrowgar_bone_spike_graveyard") { } + spell_marrowgar_bone_spike_graveyard() : SpellScriptLoader("spell_marrowgar_bone_spike_graveyard") { } class spell_marrowgar_bone_spike_graveyard_SpellScript : public SpellScript { @@ -466,7 +466,7 @@ class spell_marrowgar_bone_spike_graveyard : public SpellHandlerScript void Register() { - EffectHandlers += EffectHandlerFn(spell_marrowgar_bone_spike_graveyard_SpellScript::HandleApplyAura, EFFECT_1, SPELL_EFFECT_APPLY_AURA); + OnEffect += SpellEffectFn(spell_marrowgar_bone_spike_graveyard_SpellScript::HandleApplyAura, EFFECT_1, SPELL_EFFECT_APPLY_AURA); } bool Load() @@ -483,10 +483,10 @@ class spell_marrowgar_bone_spike_graveyard : public SpellHandlerScript } }; -class spell_marrowgar_bone_storm : public SpellHandlerScript +class spell_marrowgar_bone_storm : public SpellScriptLoader { public: - spell_marrowgar_bone_storm() : SpellHandlerScript("spell_marrowgar_bone_storm") { } + spell_marrowgar_bone_storm() : SpellScriptLoader("spell_marrowgar_bone_storm") { } class spell_marrowgar_bone_storm_SpellScript : public SpellScript { @@ -504,7 +504,7 @@ class spell_marrowgar_bone_storm : public SpellHandlerScript void Register() { - EffectHandlers += EffectHandlerFn(spell_marrowgar_bone_storm_SpellScript::RecalculateDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE); + OnEffect += SpellEffectFn(spell_marrowgar_bone_storm_SpellScript::RecalculateDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE); } bool Load() diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 932d13fccd0..8d6f078355a 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -33,10 +33,10 @@ enum DeathKnightSpells }; // 49158 Corpse Explosion (51325, 51326, 51327, 51328) -class spell_dk_corpse_explosion : public SpellHandlerScript +class spell_dk_corpse_explosion : public SpellScriptLoader { public: - spell_dk_corpse_explosion() : SpellHandlerScript("spell_dk_corpse_explosion") { } + spell_dk_corpse_explosion() : SpellScriptLoader("spell_dk_corpse_explosion") { } class spell_dk_corpse_explosion_SpellScript : public SpellScript { @@ -68,7 +68,7 @@ public: void Register() { - EffectHandlers += EffectHandlerFn(spell_dk_corpse_explosion_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_dk_corpse_explosion_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; @@ -79,10 +79,10 @@ public: }; // 50524 Runic Power Feed (keeping Gargoyle alive) -class spell_dk_runic_power_feed : public SpellHandlerScript +class spell_dk_runic_power_feed : public SpellScriptLoader { public: - spell_dk_runic_power_feed() : SpellHandlerScript("spell_dk_runic_power_feed") { } + spell_dk_runic_power_feed() : SpellScriptLoader("spell_dk_runic_power_feed") { } class spell_dk_runic_power_feed_SpellScript : public SpellScript { @@ -107,7 +107,7 @@ public: void Register() { - EffectHandlers += EffectHandlerFn(spell_dk_runic_power_feed_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_dk_runic_power_feed_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; @@ -118,10 +118,10 @@ public: }; // 55090 Scourge Strike (55265, 55270, 55271) -class spell_dk_scourge_strike : public SpellHandlerScript +class spell_dk_scourge_strike : public SpellScriptLoader { public: - spell_dk_scourge_strike() : SpellHandlerScript("spell_dk_scourge_strike") { } + spell_dk_scourge_strike() : SpellScriptLoader("spell_dk_scourge_strike") { } class spell_dk_scourge_strike_SpellScript : public SpellScript { @@ -144,7 +144,7 @@ public: void Register() { - EffectHandlers += EffectHandlerFn(spell_dk_scourge_strike_SpellScript::HandleDummy, EFFECT_2, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_dk_scourge_strike_SpellScript::HandleDummy, EFFECT_2, SPELL_EFFECT_DUMMY); } }; diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 9adbc48d53e..6238e6c5871 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -31,10 +31,10 @@ enum DruidSpells }; // 54846 Glyph of Starfire -class spell_dru_glyph_of_starfire : public SpellHandlerScript +class spell_dru_glyph_of_starfire : public SpellScriptLoader { public: - spell_dru_glyph_of_starfire() : SpellHandlerScript("spell_dru_glyph_of_starfire") { } + spell_dru_glyph_of_starfire() : SpellScriptLoader("spell_dru_glyph_of_starfire") { } class spell_dru_glyph_of_starfire_SpellScript : public SpellScript { @@ -72,7 +72,7 @@ public: void Register() { - EffectHandlers += EffectHandlerFn(spell_dru_glyph_of_starfire_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + OnEffect += SpellEffectFn(spell_dru_glyph_of_starfire_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } }; diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index e0b04d9b09a..931914ea03e 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -24,6 +24,7 @@ #include "ScriptPCH.h" + enum NPCEntries { NPC_DOOMGUARD = 11859, @@ -31,10 +32,10 @@ enum NPCEntries NPC_IMP = 416, }; -class spell_gen_remove_flight_auras : public SpellHandlerScript +class spell_gen_remove_flight_auras : public SpellScriptLoader { public: - spell_gen_remove_flight_auras() : SpellHandlerScript("spell_gen_remove_flight_auras") {} + spell_gen_remove_flight_auras() : SpellScriptLoader("spell_gen_remove_flight_auras") {} class spell_gen_remove_flight_auras_SpellScript : public SpellScript { @@ -49,7 +50,7 @@ public: void Register() { - EffectHandlers += EffectHandlerFn(spell_gen_remove_flight_auras_SpellScript::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT); + OnEffect += SpellEffectFn(spell_gen_remove_flight_auras_SpellScript::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT); } }; @@ -59,10 +60,10 @@ public: } }; -class spell_gen_pet_summoned : public SpellHandlerScript +class spell_gen_pet_summoned : public SpellScriptLoader { public: - spell_gen_pet_summoned() : SpellHandlerScript("spell_gen_pet_summoned") { } + spell_gen_pet_summoned() : SpellScriptLoader("spell_gen_pet_summoned") { } class spell_gen_pet_summonedSpellScript : public SpellScript { @@ -105,7 +106,7 @@ public: void Register() { - EffectHandlers += EffectHandlerFn(spell_gen_pet_summonedSpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + OnEffect += SpellEffectFn(spell_gen_pet_summonedSpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } }; diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 9f98564d0ea..106384c6320 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -41,10 +41,10 @@ enum HunterSpells }; // 53209 Chimera Shot -class spell_hun_chimera_shot : public SpellHandlerScript +class spell_hun_chimera_shot : public SpellScriptLoader { public: - spell_hun_chimera_shot() : SpellHandlerScript("spell_hun_chimera_shot") { } + spell_hun_chimera_shot() : SpellScriptLoader("spell_hun_chimera_shot") { } class spell_hun_chimera_shot_SpellScript : public SpellScript { @@ -122,7 +122,7 @@ public: void Register() { - EffectHandlers += EffectHandlerFn(spell_hun_chimera_shot_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + OnEffect += SpellEffectFn(spell_hun_chimera_shot_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } }; @@ -133,10 +133,10 @@ public: }; // 53412 Invigoration -class spell_hun_invigoration : public SpellHandlerScript +class spell_hun_invigoration : public SpellScriptLoader { public: - spell_hun_invigoration() : SpellHandlerScript("spell_hun_invigoration") { } + spell_hun_invigoration() : SpellScriptLoader("spell_hun_invigoration") { } class spell_hun_invigoration_SpellScript : public SpellScript { @@ -157,7 +157,7 @@ public: void Register() { - EffectHandlers += EffectHandlerFn(spell_hun_invigoration_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + OnEffect += SpellEffectFn(spell_hun_invigoration_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } }; @@ -167,10 +167,10 @@ public: } }; -class spell_hun_last_stand_pet : public SpellHandlerScript +class spell_hun_last_stand_pet : public SpellScriptLoader { public: - spell_hun_last_stand_pet() : SpellHandlerScript("spell_hun_last_stand_pet") { } + spell_hun_last_stand_pet() : SpellScriptLoader("spell_hun_last_stand_pet") { } class spell_hun_last_stand_pet_SpellScript : public SpellScript { @@ -191,7 +191,7 @@ public: void Register() { // add dummy effect spell handler to pet's Last Stand - EffectHandlers += EffectHandlerFn(spell_hun_last_stand_pet_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_hun_last_stand_pet_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; @@ -201,10 +201,10 @@ public: } }; -class spell_hun_masters_call : public SpellHandlerScript +class spell_hun_masters_call : public SpellScriptLoader { public: - spell_hun_masters_call() : SpellHandlerScript("spell_hun_masters_call") { } + spell_hun_masters_call() : SpellScriptLoader("spell_hun_masters_call") { } class spell_hun_masters_call_SpellScript : public SpellScript { @@ -241,8 +241,8 @@ public: void Register() { - EffectHandlers += EffectHandlerFn(spell_hun_masters_call_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); - EffectHandlers += EffectHandlerFn(spell_hun_masters_call_SpellScript::HandleScriptEffect, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT); + OnEffect += SpellEffectFn(spell_hun_masters_call_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_hun_masters_call_SpellScript::HandleScriptEffect, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT); } }; @@ -252,10 +252,10 @@ public: } }; -class spell_hun_readiness : public SpellHandlerScript +class spell_hun_readiness : public SpellScriptLoader { public: - spell_hun_readiness() : SpellHandlerScript("spell_hun_readiness") { } + spell_hun_readiness() : SpellScriptLoader("spell_hun_readiness") { } class spell_hun_readiness_SpellScript : public SpellScript { @@ -284,7 +284,7 @@ public: void Register() { // add dummy effect spell handler to Readiness - EffectHandlers += EffectHandlerFn(spell_hun_readiness_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_hun_readiness_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; @@ -295,10 +295,10 @@ public: }; // 37506 Scatter Shot -class spell_hun_scatter_shot : public SpellHandlerScript +class spell_hun_scatter_shot : public SpellScriptLoader { public: - spell_hun_scatter_shot() : SpellHandlerScript("spell_hun_scatter_shot") { } + spell_hun_scatter_shot() : SpellScriptLoader("spell_hun_scatter_shot") { } class spell_hun_scatter_shot_SpellScript : public SpellScript { @@ -316,7 +316,7 @@ public: void Register() { - EffectHandlers += EffectHandlerFn(spell_hun_scatter_shot_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_hun_scatter_shot_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; @@ -326,10 +326,10 @@ public: } }; -class spell_hun_pet_heart_of_the_phoenix : public SpellHandlerScript +class spell_hun_pet_heart_of_the_phoenix : public SpellScriptLoader { public: - spell_hun_pet_heart_of_the_phoenix() : SpellHandlerScript("spell_hun_pet_heart_of_the_phoenix") { } + spell_hun_pet_heart_of_the_phoenix() : SpellScriptLoader("spell_hun_pet_heart_of_the_phoenix") { } class spell_hun_pet_heart_of_the_phoenix_SpellScript : public SpellScript { @@ -354,7 +354,7 @@ public: void Register() { // add dummy effect spell handler to pet's Last Stand - EffectHandlers += EffectHandlerFn(spell_hun_pet_heart_of_the_phoenix_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + OnEffect += SpellEffectFn(spell_hun_pet_heart_of_the_phoenix_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } bool Load() @@ -371,10 +371,10 @@ public: } }; -class spell_hun_pet_carrion_feeder : public SpellHandlerScript +class spell_hun_pet_carrion_feeder : public SpellScriptLoader { public: - spell_hun_pet_carrion_feeder() : SpellHandlerScript("spell_hun_pet_carrion_feeder") { } + spell_hun_pet_carrion_feeder() : SpellScriptLoader("spell_hun_pet_carrion_feeder") { } class spell_hun_pet_carrion_feeder_SpellScript : public SpellScript { @@ -396,7 +396,7 @@ public: void Register() { // add dummy effect spell handler to pet's Last Stand - EffectHandlers += EffectHandlerFn(spell_hun_pet_carrion_feeder_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_hun_pet_carrion_feeder_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } bool Load() diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index 4eb08919e4f..36504353bcb 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -37,10 +37,10 @@ enum MageSpells SPELL_MAGE_SUMMON_WATER_ELEMENTAL_TEMPORARY = 70907, }; -class spell_mage_cold_snap : public SpellHandlerScript +class spell_mage_cold_snap : public SpellScriptLoader { public: - spell_mage_cold_snap() : SpellHandlerScript("spell_mage_cold_snap") { } + spell_mage_cold_snap() : SpellScriptLoader("spell_mage_cold_snap") { } class spell_mage_cold_snap_SpellScript : public SpellScript { @@ -71,7 +71,7 @@ class spell_mage_cold_snap : public SpellHandlerScript void Register() { // add dummy effect spell handler to Cold Snap - EffectHandlers += EffectHandlerFn(spell_mage_cold_snap_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_mage_cold_snap_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; @@ -81,10 +81,10 @@ class spell_mage_cold_snap : public SpellHandlerScript } }; -class spell_mage_polymorph_cast_visual : public SpellHandlerScript +class spell_mage_polymorph_cast_visual : public SpellScriptLoader { public: - spell_mage_polymorph_cast_visual() : SpellHandlerScript("spell_mage_polymorph_visual") { } + spell_mage_polymorph_cast_visual() : SpellScriptLoader("spell_mage_polymorph_visual") { } class spell_mage_polymorph_cast_visual_SpellScript : public SpellScript { @@ -109,7 +109,7 @@ class spell_mage_polymorph_cast_visual : public SpellHandlerScript void Register() { // add dummy effect spell handler to Polymorph visual - EffectHandlers += EffectHandlerFn(spell_mage_polymorph_cast_visual_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_mage_polymorph_cast_visual_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; @@ -129,10 +129,10 @@ const uint32 spell_mage_polymorph_cast_visual::spell_mage_polymorph_cast_visual_ SPELL_MAGE_SHEEP_FORM }; -class spell_mage_summon_water_elemental : public SpellHandlerScript +class spell_mage_summon_water_elemental : public SpellScriptLoader { public: - spell_mage_summon_water_elemental() : SpellHandlerScript("spell_mage_summon_water_elemental") { } + spell_mage_summon_water_elemental() : SpellScriptLoader("spell_mage_summon_water_elemental") { } class spell_mage_summon_water_elemental_SpellScript : public SpellScript { @@ -162,7 +162,7 @@ class spell_mage_summon_water_elemental : public SpellHandlerScript void Register() { // add dummy effect spell handler to Summon Water Elemental - EffectHandlers += EffectHandlerFn(spell_mage_summon_water_elemental_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_mage_summon_water_elemental_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 46be23b4091..8e3295a6c48 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -38,10 +38,10 @@ enum PaladinSpells SPELL_BLESSING_OF_LOWER_CITY_SHAMAN = 37881, }; -class spell_pal_blessing_of_faith : public SpellHandlerScript +class spell_pal_blessing_of_faith : public SpellScriptLoader { public: - spell_pal_blessing_of_faith() : SpellHandlerScript("spell_pal_blessing_of_faith") { } + spell_pal_blessing_of_faith() : SpellScriptLoader("spell_pal_blessing_of_faith") { } class spell_pal_blessing_of_faith_SpellScript : public SpellScript { @@ -79,7 +79,7 @@ public: void Register() { // add dummy effect spell handler to Blessing of Faith - EffectHandlers += EffectHandlerFn(spell_pal_blessing_of_faith_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_pal_blessing_of_faith_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; @@ -90,10 +90,10 @@ public: }; // 63521 Guarded by The Light -class spell_pal_guarded_by_the_light : public SpellHandlerScript +class spell_pal_guarded_by_the_light : public SpellScriptLoader { public: - spell_pal_guarded_by_the_light() : SpellHandlerScript("spell_pal_guarded_by_the_light") { } + spell_pal_guarded_by_the_light() : SpellScriptLoader("spell_pal_guarded_by_the_light") { } class spell_pal_guarded_by_the_light_SpellScript : public SpellScript { @@ -113,7 +113,7 @@ public: void Register() { - EffectHandlers += EffectHandlerFn(spell_pal_guarded_by_the_light_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + OnEffect += SpellEffectFn(spell_pal_guarded_by_the_light_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } }; @@ -123,10 +123,10 @@ public: } }; -class spell_pal_holy_shock : public SpellHandlerScript +class spell_pal_holy_shock : public SpellScriptLoader { public: - spell_pal_holy_shock() : SpellHandlerScript("spell_pal_holy_shock") { } + spell_pal_holy_shock() : SpellScriptLoader("spell_pal_holy_shock") { } class spell_pal_holy_shock_SpellScript : public SpellScript { @@ -166,7 +166,7 @@ public: void Register() { // add dummy effect spell handler to Holy Shock - EffectHandlers += EffectHandlerFn(spell_pal_holy_shock_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_pal_holy_shock_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; @@ -176,10 +176,10 @@ public: } }; -class spell_pal_judgement_of_command : public SpellHandlerScript +class spell_pal_judgement_of_command : public SpellScriptLoader { public: - spell_pal_judgement_of_command() : SpellHandlerScript("spell_pal_judgement_of_command") { } + spell_pal_judgement_of_command() : SpellScriptLoader("spell_pal_judgement_of_command") { } class spell_pal_judgement_of_command_SpellScript : public SpellScript { @@ -193,7 +193,7 @@ public: void Register() { // add dummy effect spell handler to Judgement of Command - EffectHandlers += EffectHandlerFn(spell_pal_judgement_of_command_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_pal_judgement_of_command_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index acada207aac..f923274f1ef 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -31,10 +31,10 @@ enum PriestSpells PRIEST_SPELL_PENANCE_R1_HEAL = 47757, }; -class spell_pri_pain_and_suffering_proc : public SpellHandlerScript +class spell_pri_pain_and_suffering_proc : public SpellScriptLoader { public: - spell_pri_pain_and_suffering_proc() : SpellHandlerScript("spell_pri_pain_and_suffering_proc") { } + spell_pri_pain_and_suffering_proc() : SpellScriptLoader("spell_pri_pain_and_suffering_proc") { } // 47948 Pain and Suffering (proc) class spell_pri_pain_and_suffering_proc_SpellScript : public SpellScript @@ -49,7 +49,7 @@ class spell_pri_pain_and_suffering_proc : public SpellHandlerScript void Register() { - EffectHandlers += EffectHandlerFn(spell_pri_pain_and_suffering_proc_SpellScript::HandleEffectScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + OnEffect += SpellEffectFn(spell_pri_pain_and_suffering_proc_SpellScript::HandleEffectScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } }; @@ -59,10 +59,10 @@ class spell_pri_pain_and_suffering_proc : public SpellHandlerScript } }; -class spell_pri_penance : public SpellHandlerScript +class spell_pri_penance : public SpellScriptLoader { public: - spell_pri_penance() : SpellHandlerScript("spell_pri_penance") { } + spell_pri_penance() : SpellScriptLoader("spell_pri_penance") { } class spell_pri_penance_SpellScript : public SpellScript { @@ -102,7 +102,7 @@ class spell_pri_penance : public SpellHandlerScript void Register() { // add dummy effect spell handler to Penance - EffectHandlers += EffectHandlerFn(spell_pri_penance_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_pri_penance_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 7f4ef9b22f1..257ae73ba4f 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -32,10 +32,10 @@ enum Quest11587Spells // http://www.wowhead.com/quest=11587 Prison Break // 45449 Arcane Prisoner Rescue -class spell_q11587_arcane_prisoner_rescue : public SpellHandlerScript +class spell_q11587_arcane_prisoner_rescue : public SpellScriptLoader { public: - spell_q11587_arcane_prisoner_rescue() : SpellHandlerScript("spell_q11587_arcane_prisoner_rescue") { } + spell_q11587_arcane_prisoner_rescue() : SpellScriptLoader("spell_q11587_arcane_prisoner_rescue") { } class spell_q11587_arcane_prisoner_rescue_SpellScript : public SpellScript { @@ -65,7 +65,7 @@ public: void Register() { - EffectHandlers += EffectHandlerFn(spell_q11587_arcane_prisoner_rescue_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_q11587_arcane_prisoner_rescue_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; @@ -92,10 +92,10 @@ enum Quest11730Spells // http://www.wowhead.com/quest=11730 Master and Servant // 46023 The Ultrasonic Screwdriver -class spell_q11730_ultrasonic_screwdriver : public SpellHandlerScript +class spell_q11730_ultrasonic_screwdriver : public SpellScriptLoader { public: - spell_q11730_ultrasonic_screwdriver() : SpellHandlerScript("spell_q11730_ultrasonic_screwdriver") { } + spell_q11730_ultrasonic_screwdriver() : SpellScriptLoader("spell_q11730_ultrasonic_screwdriver") { } class spell_q11730_ultrasonic_screwdriver_SpellScript : public SpellScript { @@ -148,7 +148,7 @@ public: void Register() { - EffectHandlers += EffectHandlerFn(spell_q11730_ultrasonic_screwdriver_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_q11730_ultrasonic_screwdriver_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index a85713fd068..0ccd1dd586b 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -31,10 +31,10 @@ enum RogueSpells ROGUE_SPELL_GLYPH_OF_PREPARATION = 56819, }; -class spell_rog_cheat_death : public SpellHandlerScript +class spell_rog_cheat_death : public SpellScriptLoader { public: - spell_rog_cheat_death() : SpellHandlerScript("spell_rog_cheat_death") { } + spell_rog_cheat_death() : SpellScriptLoader("spell_rog_cheat_death") { } class spell_rog_cheat_death_SpellScript : public SpellScript { @@ -54,7 +54,7 @@ class spell_rog_cheat_death : public SpellHandlerScript void Register() { // add dummy effect spell handler to Cheat Death - EffectHandlers += EffectHandlerFn(spell_rog_cheat_death_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_rog_cheat_death_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; @@ -64,10 +64,10 @@ class spell_rog_cheat_death : public SpellHandlerScript } }; -class spell_rog_hunger_for_blood : public SpellHandlerScript +class spell_rog_hunger_for_blood : public SpellScriptLoader { public: - spell_rog_hunger_for_blood() : SpellHandlerScript("spell_rog_hunger_for_blood") { } + spell_rog_hunger_for_blood() : SpellScriptLoader("spell_rog_hunger_for_blood") { } class spell_rog_hunger_for_blood_SpellScript : public SpellScript { @@ -87,7 +87,7 @@ class spell_rog_hunger_for_blood : public SpellHandlerScript void Register() { // add dummy effect spell handler to Hunger for Blood - EffectHandlers += EffectHandlerFn(spell_rog_hunger_for_blood_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_rog_hunger_for_blood_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; @@ -97,10 +97,10 @@ class spell_rog_hunger_for_blood : public SpellHandlerScript } }; -class spell_rog_preparation : public SpellHandlerScript +class spell_rog_preparation : public SpellScriptLoader { public: - spell_rog_preparation() : SpellHandlerScript("spell_rog_preparation") { } + spell_rog_preparation() : SpellScriptLoader("spell_rog_preparation") { } class spell_rog_preparation_SpellScript : public SpellScript { @@ -149,7 +149,7 @@ class spell_rog_preparation : public SpellHandlerScript void Register() { // add dummy effect spell handler to Preparation - EffectHandlers += EffectHandlerFn(spell_rog_preparation_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_rog_preparation_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; @@ -159,10 +159,10 @@ class spell_rog_preparation : public SpellHandlerScript } }; -class spell_rog_shiv : public SpellHandlerScript +class spell_rog_shiv : public SpellScriptLoader { public: - spell_rog_shiv() : SpellHandlerScript("spell_rog_shiv") { } + spell_rog_shiv() : SpellScriptLoader("spell_rog_shiv") { } class spell_rog_shiv_SpellScript : public SpellScript { @@ -186,7 +186,7 @@ class spell_rog_shiv : public SpellHandlerScript void Register() { // add dummy effect spell handler to Shiv - EffectHandlers += EffectHandlerFn(spell_rog_shiv_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_rog_shiv_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 56dea16fbbf..3c69ae72fdc 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -33,10 +33,10 @@ enum ShamanSpells }; // 1535 Fire Nova -class spell_sha_fire_nova : public SpellHandlerScript +class spell_sha_fire_nova : public SpellScriptLoader { public: - spell_sha_fire_nova() : SpellHandlerScript("spell_sha_fire_nova") { } + spell_sha_fire_nova() : SpellScriptLoader("spell_sha_fire_nova") { } class spell_sha_fire_nova_SpellScript : public SpellScript { @@ -71,7 +71,7 @@ public: void Register() { - EffectHandlers += EffectHandlerFn(spell_sha_fire_nova_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_sha_fire_nova_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; @@ -82,10 +82,10 @@ public: }; // 39610 Mana Tide Totem -class spell_sha_mana_tide_totem : public SpellHandlerScript +class spell_sha_mana_tide_totem : public SpellScriptLoader { public: - spell_sha_mana_tide_totem() : SpellHandlerScript("spell_sha_mana_tide_totem") { } + spell_sha_mana_tide_totem() : SpellScriptLoader("spell_sha_mana_tide_totem") { } class spell_sha_mana_tide_totem_SpellScript : public SpellScript { @@ -119,7 +119,7 @@ public: void Register() { - EffectHandlers += EffectHandlerFn(spell_sha_mana_tide_totem_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_sha_mana_tide_totem_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index 4f638a6958e..448a468cdf2 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -37,10 +37,10 @@ enum WarlockSpells }; // 47193 Demonic Empowerment -class spell_warl_demonic_empowerment : public SpellHandlerScript +class spell_warl_demonic_empowerment : public SpellScriptLoader { public: - spell_warl_demonic_empowerment() : SpellHandlerScript("spell_warl_demonic_empowerment") { } + spell_warl_demonic_empowerment() : SpellScriptLoader("spell_warl_demonic_empowerment") { } class spell_warl_demonic_empowerment_SpellScript : public SpellScript { @@ -95,7 +95,7 @@ public: void Register() { - EffectHandlers += EffectHandlerFn(spell_warl_demonic_empowerment_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + OnEffect += SpellEffectFn(spell_warl_demonic_empowerment_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } }; @@ -106,10 +106,10 @@ public: }; // 47422 Everlasting Affliction -class spell_warl_everlasting_affliction : public SpellHandlerScript +class spell_warl_everlasting_affliction : public SpellScriptLoader { public: - spell_warl_everlasting_affliction() : SpellHandlerScript("spell_warl_everlasting_affliction") { } + spell_warl_everlasting_affliction() : SpellScriptLoader("spell_warl_everlasting_affliction") { } class spell_warl_everlasting_affliction_SpellScript : public SpellScript { @@ -123,7 +123,7 @@ public: void Register() { - EffectHandlers += EffectHandlerFn(spell_warl_everlasting_affliction_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + OnEffect += SpellEffectFn(spell_warl_everlasting_affliction_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } }; @@ -134,10 +134,10 @@ public: }; // 6201 Create Healthstone (and ranks) -class spell_warl_create_healthstone : public SpellHandlerScript +class spell_warl_create_healthstone : public SpellScriptLoader { public: - spell_warl_create_healthstone() : SpellHandlerScript("spell_warl_create_healthstone") { } + spell_warl_create_healthstone() : SpellScriptLoader("spell_warl_create_healthstone") { } class spell_warl_create_healthstone_SpellScript : public SpellScript { @@ -177,7 +177,7 @@ public: void Register() { - EffectHandlers += EffectHandlerFn(spell_warl_create_healthstone_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + OnEffect += SpellEffectFn(spell_warl_create_healthstone_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } }; diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index deab26bf716..48a37395b81 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -28,10 +28,10 @@ enum WarriorSpells WARRIOR_SPELL_LAST_STAND_TRIGGERED = 12976, }; -class spell_warr_last_stand : public SpellHandlerScript +class spell_warr_last_stand : public SpellScriptLoader { public: - spell_warr_last_stand() : SpellHandlerScript("spell_warr_last_stand") { } + spell_warr_last_stand() : SpellScriptLoader("spell_warr_last_stand") { } class spell_warr_last_stand_SpellScript : public SpellScript { @@ -51,7 +51,7 @@ class spell_warr_last_stand : public SpellHandlerScript void Register() { // add dummy effect spell handler to Last Stand - EffectHandlers += EffectHandlerFn(spell_warr_last_stand_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnEffect += SpellEffectFn(spell_warr_last_stand_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; |
