aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2022_03_20_29_world_2021_11_01_03_world.sql14
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.cpp53
-rw-r--r--src/server/scripts/Northrend/northrend_script_loader.cpp2
3 files changed, 69 insertions, 0 deletions
diff --git a/sql/updates/world/master/2022_03_20_29_world_2021_11_01_03_world.sql b/sql/updates/world/master/2022_03_20_29_world_2021_11_01_03_world.sql
new file mode 100644
index 00000000000..f503b2e5808
--- /dev/null
+++ b/sql/updates/world/master/2022_03_20_29_world_2021_11_01_03_world.sql
@@ -0,0 +1,14 @@
+--
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 27909 AND `source_type` = 0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` BETWEEN 2790900 AND 2790902 AND `source_type` = 9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(27909,0,0,0,37,0,100,0,0,0,0,0,0,116,10,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Darkweb Victim - On AI Initialize - Set Corpse Delay"),
+(27909,0,1,0,37,0,100,0,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Darkweb Victim - On AI Initialize - Set Reactstate Passive"),
+(27909,0,2,0,11,0,100,0,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Darkweb Victim - On Spawn - Set Event Phase 1"),
+(27909,0,3,0,38,0,100,0,1,1,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Darkweb Victim - On Data Set 1 1 - Set Event Phase 2"),
+(27909,0,4,0,6,1,100,0,0,0,0,0,0,11,49960,2,0,0,0,0,1,0,0,0,0,0,0,0,0,"Darkweb Victim - On Death - Cast 'Summon Random Drakkari' (Phase 1)"),
+(27909,0,5,0,6,2,100,0,0,0,0,0,0,11,49952,2,0,0,0,0,1,0,0,0,0,0,0,0,0,"Darkweb Victim - On Death - Cast 'Summon Kurzel' (Phase 2)");
+
+DELETE FROM `spell_script_names` WHERE `spell_id` = 49960 AND `ScriptName` = 'spell_summon_random_drakkari';
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(49960,'spell_summon_random_drakkari');
diff --git a/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.cpp b/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.cpp
new file mode 100644
index 00000000000..bd5d5ac69c8
--- /dev/null
+++ b/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.cpp
@@ -0,0 +1,53 @@
+/*
+ * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "CreatureAIImpl.h"
+#include "ScriptMgr.h"
+#include "SpellScript.h"
+#include "Unit.h"
+
+enum SummonRandomDrakkari
+{
+ SPELL_SUMMON_DRAKKARI_SHAMAN = 49958,
+ SPELL_SUMMON_DRAKKARI_GUARDIAN = 49959
+};
+
+// 49960 - Summon Random Drakkari
+class spell_summon_random_drakkari : public SpellScript
+{
+ PrepareSpellScript(spell_summon_random_drakkari);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_SUMMON_DRAKKARI_SHAMAN, SPELL_SUMMON_DRAKKARI_GUARDIAN });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->CastSpell(GetCaster(), RAND(SPELL_SUMMON_DRAKKARI_SHAMAN, SPELL_SUMMON_DRAKKARI_GUARDIAN), true);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_summon_random_drakkari::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+void AddSC_drak_tharon_keep()
+{
+ RegisterSpellScript(spell_summon_random_drakkari);
+}
diff --git a/src/server/scripts/Northrend/northrend_script_loader.cpp b/src/server/scripts/Northrend/northrend_script_loader.cpp
index 4f435411732..78d3b00c213 100644
--- a/src/server/scripts/Northrend/northrend_script_loader.cpp
+++ b/src/server/scripts/Northrend/northrend_script_loader.cpp
@@ -41,6 +41,7 @@ void AddSC_boss_novos();
void AddSC_boss_king_dred();
void AddSC_boss_tharon_ja();
void AddSC_instance_drak_tharon_keep();
+void AddSC_drak_tharon_keep();
// Trial of the Champion
void AddSC_boss_argent_challenge();
void AddSC_boss_black_knight();
@@ -237,6 +238,7 @@ void AddNorthrendScripts()
AddSC_boss_king_dred();
AddSC_boss_tharon_ja();
AddSC_instance_drak_tharon_keep();
+ AddSC_drak_tharon_keep();
// Trial of the Champion
AddSC_boss_argent_challenge();
AddSC_boss_black_knight();