diff options
-rw-r--r-- | sql/scripts/world_scripts_full.sql | 1 | ||||
-rw-r--r-- | sql/updates/world/2011_06_08_00_world_spell_script_names.sql | 3 | ||||
-rwxr-xr-x | src/server/game/Spells/SpellMgr.cpp | 5 | ||||
-rw-r--r-- | src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp | 41 |
4 files changed, 45 insertions, 5 deletions
diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql index f881950b185..ef916b5e4ef 100644 --- a/sql/scripts/world_scripts_full.sql +++ b/sql/scripts/world_scripts_full.sql @@ -2213,6 +2213,7 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES ( 64234, 'spell_xt002_gravity_bomb_spawn_void_zone'), ( 63024, 'spell_xt002_gravity_bomb_spawn_void_zone'), ( 62791, 'spell_xt002_heart_overload_periodic'), +( 62775, 'spell_xt002_tympanic_tantrum'), -- Eye Of Eternity ( 56105, 'spell_malygos_vortex_dummy'), ( 55873, 'spell_malygos_vortex_visual'), diff --git a/sql/updates/world/2011_06_08_00_world_spell_script_names.sql b/sql/updates/world/2011_06_08_00_world_spell_script_names.sql new file mode 100644 index 00000000000..76ea8478109 --- /dev/null +++ b/sql/updates/world/2011_06_08_00_world_spell_script_names.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `spell_id`=62775; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(62775, 'spell_xt002_tympanic_tantrum'); diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index e7056243ff6..e5fd2526916 100755 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -4023,11 +4023,6 @@ void SpellMgr::LoadSpellCustomAttr() spellInfo->MaxAffectedTargets = 1; count++; break; - case 62775: // Tympanic Tantrum - spellInfo->EffectRadiusIndex[EFFECT_0] = 12; // 100yds instead of 500 - spellInfo->EffectRadiusIndex[EFFECT_1] = 12; - count++; - break; // ENDOF ULDUAR SPELLS // // ICECROWN CITADEL SPELLS diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp index 1bc5e048ffa..732a61dff05 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp @@ -818,6 +818,46 @@ class spell_xt002_heart_overload_periodic : public SpellScriptLoader } }; +class PlayerOrPetCheck +{ + public: + bool operator() (Unit* unit) + { + if (unit->GetTypeId() != TYPEID_PLAYER) + if (!unit->ToCreature()->isPet()) + return true; + + return false; + } +}; + +class spell_xt002_tympanic_tantrum : public SpellScriptLoader +{ + public: + spell_xt002_tympanic_tantrum() : SpellScriptLoader("spell_xt002_tympanic_tantrum") { } + + class spell_xt002_tympanic_tantrum_SpellScript : public SpellScript + { + PrepareSpellScript(spell_xt002_tympanic_tantrum_SpellScript); + + void FilterTargets(std::list<Unit*>& unitList) + { + unitList.remove_if(PlayerOrPetCheck()); + } + + void Register() + { + OnUnitTargetSelect += SpellUnitTargetFn(spell_xt002_tympanic_tantrum_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_AREA_ENEMY_SRC); + OnUnitTargetSelect += SpellUnitTargetFn(spell_xt002_tympanic_tantrum_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_AREA_ENEMY_SRC); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_xt002_tympanic_tantrum_SpellScript(); + } +}; + void AddSC_boss_xt002() { new mob_xt002_heart(); @@ -831,4 +871,5 @@ void AddSC_boss_xt002() new spell_xt002_searing_light_spawn_life_spark(); new spell_xt002_gravity_bomb_spawn_void_zone(); new spell_xt002_heart_overload_periodic(); + new spell_xt002_tympanic_tantrum(); } |