Scripts/Icecrown Citadel: Removed obsolete workaround for Ice Tomb LoS
This commit is contained in:
@@ -0,0 +1 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_sindragosa_collision_filter';
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user