File tree Expand file tree Collapse file tree
src/server/scripts/Northrend/IcecrownCitadel Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1308,6 +1308,29 @@ class spell_sindragosa_ice_tomb_trap : public AuraScript
13081308 }
13091309};
13101310
1311+ class SindragosaIcyGripTargetFilter
1312+ {
1313+ public:
1314+ explicit SindragosaIcyGripTargetFilter (Unit* caster) : _caster(caster) { }
1315+
1316+ bool operator ()(WorldObject* object) const
1317+ {
1318+ if (!object->ToUnit ())
1319+ return true ;
1320+ // No frost beaconed players
1321+ if (object->ToUnit ()->HasAura (SPELL_FROST_BEACON))
1322+ return true ;
1323+ // Not current Victim
1324+ if (object->ToUnit () == _caster->GetVictim ())
1325+ return true ;
1326+
1327+ return false ;
1328+ }
1329+
1330+ private:
1331+ Unit* _caster;
1332+ };
1333+
13111334// 70117 - Icy Grip
13121335class spell_sindragosa_icy_grip : public SpellScript
13131336{
@@ -1318,6 +1341,11 @@ class spell_sindragosa_icy_grip : public SpellScript
13181341 return ValidateSpellInfo ({ SPELL_ICY_GRIP_JUMP });
13191342 }
13201343
1344+ void FilterTargets (std::list<WorldObject*>& targets)
1345+ {
1346+ targets.remove_if (SindragosaIcyGripTargetFilter (GetCaster ()));
1347+ }
1348+
13211349 void HandleScript (SpellEffIndex effIndex)
13221350 {
13231351 PreventHitDefaultEffect (effIndex);
@@ -1326,6 +1354,7 @@ class spell_sindragosa_icy_grip : public SpellScript
13261354
13271355 void Register () override
13281356 {
1357+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn (spell_sindragosa_icy_grip_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
13291358 OnEffectHitTarget += SpellEffectFn (spell_sindragosa_icy_grip::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
13301359 }
13311360};
You can’t perform that action at this time.
0 commit comments