aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2012-04-08 15:15:16 +0200
committerShauren <shauren.trinity@gmail.com>2012-04-08 15:15:16 +0200
commit5e485cba769d3b640d56a00ea179a8ee0090febc (patch)
tree862d1ebea031eff75eaa58245168bf7221f0eee9 /src
parent2d0e5e2e0c16ce1a7683ecf9cdc83cdc644d1eb0 (diff)
Scripts/Icecrown Citadel: Fixed Mystic Buffet applying on targets hidden behind Ice Tombs
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
index 843966e5b1f..514bd112894 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
@@ -1280,6 +1280,46 @@ class spell_sindragosa_icy_grip : public SpellScriptLoader
}
};
+class MysticBuffetTargetFilter
+{
+ public:
+ explicit MysticBuffetTargetFilter(Unit* caster) : _caster(caster) { }
+
+ bool operator()(Unit* unit)
+ {
+ return !unit->IsWithinLOSInMap(_caster);
+ }
+
+ private:
+ Unit* _caster;
+};
+
+class spell_sindragosa_mystic_buffet : public SpellScriptLoader
+{
+ public:
+ spell_sindragosa_mystic_buffet() : SpellScriptLoader("spell_sindragosa_mystic_buffet") { }
+
+ class spell_sindragosa_mystic_buffet_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_sindragosa_mystic_buffet_SpellScript);
+
+ void FilterTargets(std::list<Unit*>& unitList)
+ {
+ unitList.remove_if(MysticBuffetTargetFilter(GetCaster()));
+ }
+
+ void Register()
+ {
+ OnUnitTargetSelect += SpellUnitTargetFn(spell_sindragosa_mystic_buffet_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_sindragosa_mystic_buffet_SpellScript();
+ }
+};
+
class spell_rimefang_icy_blast : public SpellScriptLoader
{
public:
@@ -1505,6 +1545,7 @@ void AddSC_boss_sindragosa()
new spell_sindragosa_frost_beacon();
new spell_sindragosa_ice_tomb();
new spell_sindragosa_icy_grip();
+ new spell_sindragosa_mystic_buffet();
new spell_rimefang_icy_blast();
new spell_frostwarden_handler_order_whelp();
new spell_frostwarden_handler_focus_fire();