diff options
author | Subv <s.v.h21@hotmail.com> | 2012-09-09 12:28:31 -0500 |
---|---|---|
committer | Subv <s.v.h21@hotmail.com> | 2012-09-09 12:28:31 -0500 |
commit | 6fc3d3a77c738411b12a06fd1e6b32b1562a56c7 (patch) | |
tree | 7cc7f6460aedfa4e56383c00a9c0ffce634d8017 | |
parent | da5f8f58e205bd2c896677daf6500af4ffe655f1 (diff) |
Core/Scripts: Some cleanup in warlock spellscripts
-rw-r--r-- | sql/updates/world/2012_09_09_02_world_spell_script_names.sql | 4 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_warlock.cpp | 38 |
2 files changed, 10 insertions, 32 deletions
diff --git a/sql/updates/world/2012_09_09_02_world_spell_script_names.sql b/sql/updates/world/2012_09_09_02_world_spell_script_names.sql new file mode 100644 index 00000000000..a4304663d9c --- /dev/null +++ b/sql/updates/world/2012_09_09_02_world_spell_script_names.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_warl_banish','spell_warl_create_healthstone','spell_warl_ritual_of_doom_effect'); +INSERT INTO `spell_script_names`(`spell_id`,`ScriptName`) VALUES +(710,'spell_warl_banish'), +(6201,'spell_warl_create_healthstone'); diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index 0def62b7d3a..a841db86e65 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -47,6 +47,7 @@ enum WarlockSpells WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2 = 60956, }; +/// Updated 4.3.4 class spell_warl_banish : public SpellScriptLoader { public: @@ -64,11 +65,13 @@ public: void HandleBanish() { + /// Casting Banish on a banished target will cancel the effect + /// Check if the target already has Banish, if so, do nothing. if (Unit* target = GetHitUnit()) { if (target->GetAuraEffect(SPELL_AURA_SCHOOL_IMMUNITY, SPELLFAMILY_WARLOCK, 0, 0x08000000, 0)) { - //No need to remove old aura since its removed due to not stack by current Banish aura + // No need to remove old aura since its removed due to not stack by current Banish aura PreventHitDefaultEffect(EFFECT_0); PreventHitDefaultEffect(EFFECT_1); PreventHitDefaultEffect(EFFECT_2); @@ -99,6 +102,7 @@ public: }; // 47193 Demonic Empowerment +/// Updated 4.3.4 class spell_warl_demonic_empowerment : public SpellScriptLoader { public: @@ -132,7 +136,6 @@ class spell_warl_demonic_empowerment : public SpellScriptLoader SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER); int32 hp = int32(targetCreature->CountPctFromMaxHealth(GetCaster()->CalculateSpellDamage(targetCreature, spellInfo, 0))); targetCreature->CastCustomSpell(targetCreature, WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER, &hp, NULL, NULL, true); - //unitTarget->CastSpell(unitTarget, 54441, true); break; } case CREATURE_FAMILY_FELGUARD: @@ -161,7 +164,7 @@ class spell_warl_demonic_empowerment : public SpellScriptLoader } }; -// 6201 Create Healthstone (and ranks) +// 6201 Create Healthstone class spell_warl_create_healthstone : public SpellScriptLoader { public: @@ -270,34 +273,6 @@ class spell_warl_everlasting_affliction : public SpellScriptLoader } }; -// 18541 Ritual of Doom Effect -class spell_warl_ritual_of_doom_effect : public SpellScriptLoader -{ -public: - spell_warl_ritual_of_doom_effect() : SpellScriptLoader("spell_warl_ritual_of_doom_effect") { } - - class spell_warl_ritual_of_doom_effect_SpellScript : public SpellScript - { - PrepareSpellScript(spell_warl_ritual_of_doom_effect_SpellScript); - - void HandleDummy(SpellEffIndex /*effIndex*/) - { - Unit* caster = GetCaster(); - caster->CastSpell(caster, GetEffectValue(), true); - } - - void Register() - { - OnEffectHit += SpellEffectFn(spell_warl_ritual_of_doom_effect_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); - } - }; - - SpellScript* GetSpellScript() const - { - return new spell_warl_ritual_of_doom_effect_SpellScript(); - } -}; - class spell_warl_seed_of_corruption : public SpellScriptLoader { public: @@ -723,7 +698,6 @@ void AddSC_warlock_spell_scripts() new spell_warl_demonic_empowerment(); new spell_warl_create_healthstone(); new spell_warl_everlasting_affliction(); - new spell_warl_ritual_of_doom_effect(); new spell_warl_seed_of_corruption(); new spell_warl_soulshatter(); new spell_warl_life_tap(); |