diff options
| author | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-07-22 18:57:15 +0200 |
|---|---|---|
| committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-07-22 18:57:15 +0200 |
| commit | f95a6d6523f670431cd5a76b41b90283fe6deb14 (patch) | |
| tree | 324e7dfb9d387c3f46b09b64d219a2370def5d0b | |
| parent | 72c2ff0bf6b4d85e68a685f4c2cbd38f1f9356b7 (diff) | |
Core/Spells: Remove old mage "summon water elemental" script - is now permanent pet
"Patch 4.0.1 (12-Oct-2010): Water Elemental made into a permanent pet when specializing in the frost talent tree at level 10."
| -rw-r--r-- | sql/updates/world/2013_07_22_07_world_spell_spell_script_names_434.sql | 1 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_mage.cpp | 49 |
2 files changed, 1 insertions, 49 deletions
diff --git a/sql/updates/world/2013_07_22_07_world_spell_spell_script_names_434.sql b/sql/updates/world/2013_07_22_07_world_spell_spell_script_names_434.sql new file mode 100644 index 00000000000..edba00cd544 --- /dev/null +++ b/sql/updates/world/2013_07_22_07_world_spell_spell_script_names_434.sql @@ -0,0 +1 @@ +DELETE FROM `spell_script_names` WHERE `spell_id`=31687; diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index f209cb281d3..d0d3dd7a512 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -1287,54 +1287,6 @@ class spell_mage_ring_of_frost_freeze : public SpellScriptLoader } }; -// 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*/) OVERRIDE - { - 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(); - - if (Player* player = caster->ToPlayer()) - if (Guardian* elemental = player->GetGuardianPet()) - // Check if the pet we are going to unsummon is the mage's water elemental - if (elemental->GetEntry() == uint32(sSpellMgr->GetSpellInfo(SPELL_MAGE_SUMMON_WATER_ELEMENTAL_TEMPORARY)->Effects[EFFECT_0].MiscValue) || - elemental->GetEntry() == uint32(sSpellMgr->GetSpellInfo(SPELL_MAGE_SUMMON_WATER_ELEMENTAL_PERMANENT)->Effects[EFFECT_0].MiscValue)) - elemental->UnSummon(); - - // 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() OVERRIDE - { - // 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 OVERRIDE - { - return new spell_mage_summon_water_elemental_SpellScript(); - } -}; - // 33395 Water Elemental's Freeze /// Updated 4.3.4 class spell_mage_water_elemental_freeze : public SpellScriptLoader @@ -1417,6 +1369,5 @@ void AddSC_mage_spell_scripts() new spell_mage_replenish_mana(); new spell_mage_ring_of_frost(); new spell_mage_ring_of_frost_freeze(); - new spell_mage_summon_water_elemental(); new spell_mage_water_elemental_freeze(); } |
