aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2011-01-28 14:57:45 +0100
committerShauren <shauren.trinity@gmail.com>2011-01-28 14:57:45 +0100
commit3f16b58ddbdf83a0c97b7d0316c2423b991b55d0 (patch)
treec95cb460634fa21bcb7f92afc3e3c340130d9e63
parentcf882245883e2f1c5634345fee8403a3c891f7cc (diff)
Scripts/Icecrown Citadel: Pact of the Darkfallen will now only damage the caster and all other non-linked players
-rw-r--r--sql/scripts/world_scripts_full.sql1
-rw-r--r--sql/updates/2011_01_28_1_world_spell_script_names.sql3
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp41
3 files changed, 41 insertions, 4 deletions
diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql
index 0dacb2d7bf8..ca440ace250 100644
--- a/sql/scripts/world_scripts_full.sql
+++ b/sql/scripts/world_scripts_full.sql
@@ -1971,6 +1971,7 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
( 71902, 'spell_blood_queen_bloodbolt'),
( 71390, 'spell_blood_queen_pact_of_the_darkfallen'),
( 71340, 'spell_blood_queen_pact_of_the_darkfallen_dmg'),
+( 71341, 'spell_blood_queen_pact_of_the_darkfallen_dmg_target'),
-- Isle of Conquest
( 66630, 'spell_gen_gunship_portal'),
( 66637, 'spell_gen_gunship_portal'),
diff --git a/sql/updates/2011_01_28_1_world_spell_script_names.sql b/sql/updates/2011_01_28_1_world_spell_script_names.sql
new file mode 100644
index 00000000000..15d3c8da21f
--- /dev/null
+++ b/sql/updates/2011_01_28_1_world_spell_script_names.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=71341 AND `ScriptName`='spell_blood_queen_pact_of_the_darkfallen_dmg_target';
+INSERT INTO `spell_script_names`(`spell_id`,`ScriptName`) VALUES
+(71341,'spell_blood_queen_pact_of_the_darkfallen_dmg_target');
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<Unit*>& unitList)
{
- unitList.remove_if(PactOfTheDarkfallenChack());
+ unitList.remove_if(PactOfTheDarkfallenCheck(false));
bool remove = true;
std::list<Unit*>::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<Unit*>& 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();
}