Scripts/Icecrown Citadel: Removed obsolete workaround for Ice Tomb LoS

This commit is contained in:
Shauren
2012-02-25 11:42:00 +01:00
parent 6ce46624d2
commit 1f373c0f37
3 changed files with 2 additions and 59 deletions
@@ -1198,63 +1198,6 @@ class spell_sindragosa_ice_tomb : public SpellScriptLoader
}
};
class FrostBombTargetSelector
{
public:
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<Creature*>::const_iterator itr = _collisionList.begin(); itr != _collisionList.end(); ++itr)
if ((*itr)->IsInBetween(_caster, unit))
return true;
return false;
}
private:
Unit* _caster;
std::list<Creature*> const& _collisionList;
};
class spell_sindragosa_collision_filter : public SpellScriptLoader
{
public:
spell_sindragosa_collision_filter() : SpellScriptLoader("spell_sindragosa_collision_filter") { }
class spell_sindragosa_collision_filter_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sindragosa_collision_filter_SpellScript);
bool Validate(SpellInfo const* /*spell*/)
{
if (!sSpellMgr->GetSpellInfo(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));
}
void Register()
{
OnUnitTargetSelect += SpellUnitTargetFn(spell_sindragosa_collision_filter_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const
{
return new spell_sindragosa_collision_filter_SpellScript();
}
};
class spell_sindragosa_icy_grip : public SpellScriptLoader
{
public:
@@ -1513,7 +1456,6 @@ void AddSC_boss_sindragosa()
new spell_sindragosa_instability();
new spell_sindragosa_frost_beacon();
new spell_sindragosa_ice_tomb();
new spell_sindragosa_collision_filter();
new spell_sindragosa_icy_grip();
new spell_rimefang_icy_blast();
new spell_frostwarden_handler_order_whelp();