From 3f16b58ddbdf83a0c97b7d0316c2423b991b55d0 Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 28 Jan 2011 14:57:45 +0100 Subject: Scripts/Icecrown Citadel: Pact of the Darkfallen will now only damage the caster and all other non-linked players --- .../IcecrownCitadel/boss_blood_queen_lana_thel.cpp | 41 +++++++++++++++++++--- 1 file changed, 37 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp index ee8f837c168..3f121e1d862 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp @@ -561,13 +561,18 @@ class spell_blood_queen_bloodbolt : public SpellScriptLoader } }; -class PactOfTheDarkfallenChack +class PactOfTheDarkfallenCheck { public: + PactOfTheDarkfallenCheck(bool hasPact) : _hasPact(hasPact) { } + bool operator() (Unit* unit) { - return !unit->HasAura(SPELL_PACT_OF_THE_DARKFALLEN); + return unit->HasAura(SPELL_PACT_OF_THE_DARKFALLEN) == _hasPact; } + + private: + bool _hasPact; }; class spell_blood_queen_pact_of_the_darkfallen : public SpellScriptLoader @@ -581,7 +586,7 @@ class spell_blood_queen_pact_of_the_darkfallen : public SpellScriptLoader void FilterTargets(std::list& unitList) { - unitList.remove_if(PactOfTheDarkfallenChack()); + unitList.remove_if(PactOfTheDarkfallenCheck(false)); bool remove = true; std::list::const_iterator itrEnd = unitList.end(), itr, itr2; @@ -646,7 +651,7 @@ class spell_blood_queen_pact_of_the_darkfallen_dmg : public SpellScriptLoader void Register() { - OnEffectPeriodic += AuraEffectPeriodicFn(spell_blood_queen_pact_of_the_darkfallen_dmg_AuraScript::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + OnEffectPeriodic += AuraEffectPeriodicFn(spell_blood_queen_pact_of_the_darkfallen_dmg_AuraScript::PeriodicTick, EFFECT_1, SPELL_AURA_PERIODIC_TRIGGER_SPELL); } }; @@ -656,6 +661,33 @@ class spell_blood_queen_pact_of_the_darkfallen_dmg : public SpellScriptLoader } }; +class spell_blood_queen_pact_of_the_darkfallen_dmg_target : public SpellScriptLoader +{ + public: + spell_blood_queen_pact_of_the_darkfallen_dmg_target() : SpellScriptLoader("spell_blood_queen_pact_of_the_darkfallen_dmg_target") { } + + class spell_blood_queen_pact_of_the_darkfallen_dmg_SpellScript : public SpellScript + { + PrepareSpellScript(spell_blood_queen_pact_of_the_darkfallen_dmg_SpellScript); + + void FilterTargets(std::list& unitList) + { + unitList.remove_if(PactOfTheDarkfallenCheck(true)); + unitList.push_back(GetCaster()); + } + + void Register() + { + OnUnitTargetSelect += SpellUnitTargetFn(spell_blood_queen_pact_of_the_darkfallen_dmg_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_AREA_ALLY_SRC); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_blood_queen_pact_of_the_darkfallen_dmg_SpellScript(); + } +}; + class achievement_once_bitten_twice_shy_n : public AchievementCriteriaScript { public: @@ -696,6 +728,7 @@ void AddSC_boss_blood_queen_lana_thel() new spell_blood_queen_bloodbolt(); new spell_blood_queen_pact_of_the_darkfallen(); new spell_blood_queen_pact_of_the_darkfallen_dmg(); + new spell_blood_queen_pact_of_the_darkfallen_dmg_target(); new achievement_once_bitten_twice_shy_n(); new achievement_once_bitten_twice_shy_v(); } -- cgit v1.2.3