diff options
-rw-r--r-- | sql/scripts/world_scripts_full.sql | 1 | ||||
-rw-r--r-- | sql/updates/world/2011_02_16_0_world_spell_script_names.sql | 3 | ||||
-rw-r--r-- | src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp | 20 |
3 files changed, 16 insertions, 8 deletions
diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql index 068994db9db..70e87e635ce 100644 --- a/sql/scripts/world_scripts_full.sql +++ b/sql/scripts/world_scripts_full.sql @@ -2018,6 +2018,7 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES ( 72528, 'spell_sindragosa_collision_filter'), ( 72529, 'spell_sindragosa_collision_filter'), ( 72530, 'spell_sindragosa_collision_filter'), +( 70117, 'spell_sindragosa_collision_filter'), ( 70117, 'spell_sindragosa_icy_grip'), -- Isle of Conquest ( 66630, 'spell_gen_gunship_portal'), diff --git a/sql/updates/world/2011_02_16_0_world_spell_script_names.sql b/sql/updates/world/2011_02_16_0_world_spell_script_names.sql new file mode 100644 index 00000000000..e41542c3316 --- /dev/null +++ b/sql/updates/world/2011_02_16_0_world_spell_script_names.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `spell_id`=70117 AND `ScriptName`='spell_sindragosa_collision_filter'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(70117,'spell_sindragosa_collision_filter'); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index 8cbfbd895c5..66e5d9264b4 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -1166,14 +1166,14 @@ class spell_sindragosa_ice_tomb : public SpellScriptLoader class FrostBombTargetSelector { public: - FrostBombTargetSelector(Unit* _caster, std::list<Unit*> const& _collisionList) : caster(_caster), collisionList(_collisionList) { } + FrostBombTargetSelector(Unit* _caster, std::list<Creature*> const& _collisionList) : caster(_caster), collisionList(_collisionList) { } bool operator()(Unit* unit) { if (unit->HasAura(SPELL_ICE_TOMB_DAMAGE)) return true; - for (std::list<Unit*>::const_iterator itr = collisionList.begin(); itr != collisionList.end(); ++itr) + for (std::list<Creature*>::const_iterator itr = collisionList.begin(); itr != collisionList.end(); ++itr) if ((*itr)->IsInBetween(caster, unit)) return true; @@ -1181,7 +1181,7 @@ class FrostBombTargetSelector } Unit* caster; - std::list<Unit*> const& collisionList; + std::list<Creature*> const& collisionList; }; class spell_sindragosa_collision_filter : public SpellScriptLoader @@ -1193,13 +1193,17 @@ class spell_sindragosa_collision_filter : public SpellScriptLoader { PrepareSpellScript(spell_sindragosa_collision_filter_SpellScript); - void FilterTargets(std::list<Unit*>& unitList) + bool Validate(SpellEntry const* /*spell*/) { - std::list<Unit*> tombs; - for (std::list<Unit*>::const_iterator itr = unitList.begin(); itr != unitList.end(); ++itr) - if ((*itr)->HasAura(SPELL_ICE_TOMB_DAMAGE)) - tombs.push_back(*itr); + if (!sSpellStore.LookupEntry(SPELL_ICE_TOMB_DAMAGE)) + return false; + return true; + } + void FilterTargets(std::list<Unit*>& unitList) + { + std::list<Creature*> tombs; + GetCreatureListWithEntryInGrid(tombs, GetCaster(), NPC_ICE_TOMB, 200.0f); unitList.remove_if(FrostBombTargetSelector(GetCaster(), tombs)); } |