aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2011-01-28 14:33:12 +0100
committerShauren <shauren.trinity@gmail.com>2011-01-28 14:33:12 +0100
commitcf882245883e2f1c5634345fee8403a3c891f7cc (patch)
tree49b3e474fa75b2be81b9349658fab83be723cf3a
parentea00b2ac10e5464e20532544a48204cc5b286b4a (diff)
Scripts/Icecrown Citadel: Implemented Pact of the Darkfallen damage scaling (Blood-Queen Lana'thel)
SQL: Renamed and split 2011_01_26_world_scriptname to meet the standards
-rw-r--r--sql/base/world_database.sql1
-rw-r--r--sql/scripts/world_scripts_full.sql1
-rw-r--r--sql/updates/2011_01_24_0_world_scriptname.sql (renamed from sql/updates/2011_01_24_0_world_script_names.sql)2
-rw-r--r--sql/updates/2011_01_26_0_world_scriptname.sql1
-rw-r--r--sql/updates/2011_01_26_0_world_spell_script_names.sql3
-rw-r--r--sql/updates/2011_01_26_world_scriptname.sql4
-rw-r--r--sql/updates/2011_01_28_0_world_spell_linked_spell.sql1
-rw-r--r--sql/updates/2011_01_28_0_world_spell_script_names.sql3
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp40
9 files changed, 50 insertions, 6 deletions
diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql
index 6e8cc6c2621..04fc64555bc 100644
--- a/sql/base/world_database.sql
+++ b/sql/base/world_database.sql
@@ -18178,7 +18178,6 @@ INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment
( 71479, 71482, 1, 'Blood-Queen: Bloodbolt Splash'),
( 71480, 71483, 1, 'Blood-Queen: Bloodbolt Splash'),
( 71952, 70995, 1, 'Blood-Queen: Presence of the Darkfallen'),
-( 71390, 71341, 0, 'Blood-Queen: Pact of the Darkfallen'),
-- Isle of Conquest
( 66548, 66550, 0, 'Isle of Conquest (IN>OUT)'),
( 66549, 66551, 0, 'Isle of Conquest (OUT>IN)'),
diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql
index 8eb2e1e0ace..0dacb2d7bf8 100644
--- a/sql/scripts/world_scripts_full.sql
+++ b/sql/scripts/world_scripts_full.sql
@@ -1970,6 +1970,7 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
( 71901, 'spell_blood_queen_bloodbolt'),
( 71902, 'spell_blood_queen_bloodbolt'),
( 71390, 'spell_blood_queen_pact_of_the_darkfallen'),
+( 71340, 'spell_blood_queen_pact_of_the_darkfallen_dmg'),
-- Isle of Conquest
( 66630, 'spell_gen_gunship_portal'),
( 66637, 'spell_gen_gunship_portal'),
diff --git a/sql/updates/2011_01_24_0_world_script_names.sql b/sql/updates/2011_01_24_0_world_scriptname.sql
index 7716fb79039..6e4233c5431 100644
--- a/sql/updates/2011_01_24_0_world_script_names.sql
+++ b/sql/updates/2011_01_24_0_world_scriptname.sql
@@ -8,4 +8,4 @@ INSERT INTO `spell_script_names` (spell_id,ScriptName) VALUES
(54069,'spell_varos_energize_core_area_entry'),
(56251,'spell_varos_energize_core_area_entry'),
(50785,'spell_varos_energize_core_area_enemy'),
-(59372,'spell_varos_energize_core_area_enemy'); \ No newline at end of file
+(59372,'spell_varos_energize_core_area_enemy');
diff --git a/sql/updates/2011_01_26_0_world_scriptname.sql b/sql/updates/2011_01_26_0_world_scriptname.sql
new file mode 100644
index 00000000000..810fe263f76
--- /dev/null
+++ b/sql/updates/2011_01_26_0_world_scriptname.sql
@@ -0,0 +1 @@
+UPDATE `creature_template` SET `ScriptName`='boss_eregos' WHERE `entry`=27656;
diff --git a/sql/updates/2011_01_26_0_world_spell_script_names.sql b/sql/updates/2011_01_26_0_world_spell_script_names.sql
new file mode 100644
index 00000000000..1244adf63c8
--- /dev/null
+++ b/sql/updates/2011_01_26_0_world_spell_script_names.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=51162 AND `ScriptName`='spell_eregos_planar_shift';
+INSERT INTO `spell_script_names`(`spell_id`,`ScriptName`) VALUES
+(51162,'spell_eregos_planar_shift');
diff --git a/sql/updates/2011_01_26_world_scriptname.sql b/sql/updates/2011_01_26_world_scriptname.sql
deleted file mode 100644
index 98c74106866..00000000000
--- a/sql/updates/2011_01_26_world_scriptname.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-DELETE FROM `spell_script_names` WHERE `spell_id`=51162;
-INSERT INTO `spell_script_names`(spell_id, ScriptName) VALUES (51162,'spell_eregos_planar_shift');
-
-UPDATE `creature_template` SET `ScriptName`='boss_eregos' WHERE `entry`=27656; \ No newline at end of file
diff --git a/sql/updates/2011_01_28_0_world_spell_linked_spell.sql b/sql/updates/2011_01_28_0_world_spell_linked_spell.sql
new file mode 100644
index 00000000000..2357ff914d3
--- /dev/null
+++ b/sql/updates/2011_01_28_0_world_spell_linked_spell.sql
@@ -0,0 +1 @@
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=71390;
diff --git a/sql/updates/2011_01_28_0_world_spell_script_names.sql b/sql/updates/2011_01_28_0_world_spell_script_names.sql
new file mode 100644
index 00000000000..aa0a291f526
--- /dev/null
+++ b/sql/updates/2011_01_28_0_world_spell_script_names.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=71340 AND `ScriptName`='spell_blood_queen_pact_of_the_darkfallen_dmg';
+INSERT INTO `spell_script_names`(`spell_id`,`ScriptName`) VALUES
+(71340,'spell_blood_queen_pact_of_the_darkfallen_dmg');
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 ab3b19c14f8..ee8f837c168 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
@@ -54,6 +54,7 @@ enum Spells
SPELL_DELIRIOUS_SLASH = 71623,
SPELL_PACT_OF_THE_DARKFALLEN_TARGET = 71336,
SPELL_PACT_OF_THE_DARKFALLEN = 71340,
+ SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE = 71341,
SPELL_SWARMING_SHADOWS = 71264,
SPELL_TWILIGHT_BLOODBOLT_TARGET = 71445,
SPELL_TWILIGHT_BLOODBOLT = 71446,
@@ -617,6 +618,44 @@ class spell_blood_queen_pact_of_the_darkfallen : public SpellScriptLoader
}
};
+class spell_blood_queen_pact_of_the_darkfallen_dmg : public SpellScriptLoader
+{
+ public:
+ spell_blood_queen_pact_of_the_darkfallen_dmg() : SpellScriptLoader("spell_blood_queen_pact_of_the_darkfallen_dmg") { }
+
+ class spell_blood_queen_pact_of_the_darkfallen_dmg_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_blood_queen_pact_of_the_darkfallen_dmg_AuraScript);
+
+ bool Validate(SpellEntry const* /*spell*/)
+ {
+ if (!sSpellStore.LookupEntry(SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE))
+ return false;
+ return true;
+ }
+
+ // this is an additional effect to be executed
+ void PeriodicTick(AuraEffect const* aurEff)
+ {
+ SpellEntry const* damageSpell = sSpellStore.LookupEntry(SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE);
+ int32 damage = SpellMgr::CalculateSpellEffectAmount(damageSpell, EFFECT_0);
+ float multiplier = 0.3375f + 0.1f * uint32(aurEff->GetTickNumber()/10); // do not convert to 0.01f - we need tick number/10 as INT (damage increases every 10 ticks)
+ damage = uint32(damage * multiplier);
+ GetTarget()->CastCustomSpell(SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE, SPELLVALUE_BASE_POINT0, damage, GetTarget(), true);
+ }
+
+ void Register()
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_blood_queen_pact_of_the_darkfallen_dmg_AuraScript::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_blood_queen_pact_of_the_darkfallen_dmg_AuraScript();
+ }
+};
+
class achievement_once_bitten_twice_shy_n : public AchievementCriteriaScript
{
public:
@@ -656,6 +695,7 @@ void AddSC_boss_blood_queen_lana_thel()
new spell_blood_queen_frenzied_bloodthirst();
new spell_blood_queen_bloodbolt();
new spell_blood_queen_pact_of_the_darkfallen();
+ new spell_blood_queen_pact_of_the_darkfallen_dmg();
new achievement_once_bitten_twice_shy_n();
new achievement_once_bitten_twice_shy_v();
}