diff options
5 files changed, 47 insertions, 15 deletions
diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql index 54b2a269ee8..38f26c0b3fd 100644 --- a/sql/scripts/world_scripts_full.sql +++ b/sql/scripts/world_scripts_full.sql @@ -2207,6 +2207,8 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES ( 62166, 'spell_ulduar_stone_grip_cast_target'), ( 63981, 'spell_ulduar_stone_grip_cast_target'), ( 64702, 'spell_ulduar_squeezed_lifeless'), + (63720, 'spell_kologarn_stone_shout'), + (64004, 'spell_kologarn_stone_shout'), ( 63027, 'spell_ulduar_proximity_mines'), ( 63276, 'spell_mark_of_the_faceless'), ( 63489, 'spell_shield_of_runes'), diff --git a/sql/updates/world/2011_06_21_00_world_spell_script_names.sql b/sql/updates/world/2011_06_21_00_world_spell_script_names.sql new file mode 100644 index 00000000000..76e2ea06d4b --- /dev/null +++ b/sql/updates/world/2011_06_21_00_world_spell_script_names.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_script_names` WHERE `spell_id` IN(63720,64004); +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(63720,'spell_kologarn_stone_shout'), +(64004,'spell_kologarn_stone_shout'); diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp index eccc497a748..7edec45ca5e 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp @@ -330,8 +330,6 @@ class boss_kologarn : public CreatureScript if (!arm->isAlive()) arm->Respawn(); - // HACK: We should send spell SPELL_ARM_ENTER_VEHICLE here, but this will not work, because - // the aura system will not allow it to stack from two different casters int32 seatId = arm->GetEntry() == NPC_LEFT_ARM ? 0 : 1; arm->CastCustomSpell(SPELL_ARM_ENTER_VEHICLE, SPELLVALUE_BASE_POINT0, seatId+1, me, true); arm->CastSpell(arm, SPELL_ARM_ENTER_VISUAL, true); @@ -625,13 +623,41 @@ class spell_ulduar_stone_grip : public SpellScriptLoader } }; +class spell_kologarn_stone_shout : public SpellScriptLoader +{ + public: + spell_kologarn_stone_shout() : SpellScriptLoader("spell_kologarn_stone_shout") { } + + class spell_kologarn_stone_shout_SpellScript : public SpellScript + { + PrepareSpellScript(spell_kologarn_stone_shout_SpellScript); + + void FilterTargets(std::list<Unit*>& unitList) + { + unitList.remove_if(PlayerOrPetCheck()); + } + + void Register() + { + OnUnitTargetSelect += SpellUnitTargetFn(spell_kologarn_stone_shout_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_AREA_ENEMY_SRC); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_kologarn_stone_shout_SpellScript(); + } +}; + void AddSC_boss_kologarn() { new boss_kologarn(); + new spell_ulduar_rubble_summon(); new spell_ulduar_squeezed_lifeless(); new spell_ulduar_cancel_stone_grip(); new spell_ulduar_stone_grip_cast_target(); new spell_ulduar_stone_grip_absorb(); new spell_ulduar_stone_grip(); + new spell_kologarn_stone_shout(); } diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp index 8b9fee2f72d..7a137b07465 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp @@ -935,19 +935,6 @@ 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: diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h b/src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h index b2c268b6b49..ed78d02f40d 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h +++ b/src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h @@ -186,4 +186,17 @@ CreatureAI* GetUlduarAI(Creature* creature) return NULL; } +class PlayerOrPetCheck +{ + public: + bool operator() (Unit* unit) + { + if (unit->GetTypeId() != TYPEID_PLAYER) + if (!unit->ToCreature()->isPet()) + return true; + + return false; + } +}; + #endif |