aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2011-02-16 19:10:08 +0100
committerShauren <shauren.trinity@gmail.com>2011-02-16 19:11:22 +0100
commita6ffb3d7be9bc2a01e4e3fa06e586ecc09982f25 (patch)
tree59a8691d6866d5147188d9c0b3e359d5fe223373 /src
parent21a9d90aa837baf07e33d5a59a133b6f4757e29c (diff)
Scripts/Icecrown Citadel: Corrected line of sight checks for Sindragosa's Ice Tombs
Closes #628
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp20
1 files changed, 12 insertions, 8 deletions
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));
}