aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2024_06_29_01_world.sql101
-rw-r--r--src/server/scripts/Zandalar/KingsRest/instance_kings_rest.cpp5
-rw-r--r--src/server/scripts/Zandalar/KingsRest/kings_rest.cpp345
-rw-r--r--src/server/scripts/Zandalar/KingsRest/kings_rest.h4
4 files changed, 443 insertions, 12 deletions
diff --git a/sql/updates/world/master/2024_06_29_01_world.sql b/sql/updates/world/master/2024_06_29_01_world.sql
new file mode 100644
index 00000000000..45354b7640b
--- /dev/null
+++ b/sql/updates/world/master/2024_06_29_01_world.sql
@@ -0,0 +1,101 @@
+SET @CGUID := 7001350;
+SET @SPAWNGROUPID := 1255;
+
+-- Creature
+DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+16;
+INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `PhaseId`, `PhaseGroup`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `VerifiedBuild`) VALUES
+(@CGUID+0, 134157, 1762, 9526, 9526, '23,8,2', 0, 0, 0, 0, -1084.296875, 2623.63623046875, 810.16400146484375, 5.601494789123535156, 7200, 0, 0, 100, 0, NULL, NULL, NULL, NULL, 54988), -- Shadow-Borne Warrior (Area: Kings' Rest - Difficulty: Mythic) CreateObject2 (Auras: )
+(@CGUID+1, 133943, 1762, 9526, 9526, '23,8,2', 0, 0, 0, 0, -1069.2552490234375, 2659.318603515625, 811.0338134765625, 0, 7200, 0, 0, 100, 0, NULL, NULL, NULL, NULL, 54988), -- Minion of Zul (Area: Kings' Rest - Difficulty: Mythic) CreateObject2 (Auras: 269935 - Bound by Shadow)
+(@CGUID+2, 134157, 1762, 9526, 9526, '23,8,2', 0, 0, 0, 0, -1077.2100830078125, 2627.87158203125, 810.1683349609375, 5.369873523712158203, 7200, 0, 0, 100, 0, NULL, NULL, NULL, NULL, 54988), -- Shadow-Borne Warrior (Area: Kings' Rest - Difficulty: Mythic) CreateObject2 (Auras: )
+(@CGUID+3, 134174, 1762, 9526, 9526, '23,8,2', 0, 0, 0, 0, -1082.3853759765625, 2656.47216796875, 810.1707763671875, 5.919741153717041015, 7200, 0, 0, 100, 0, NULL, NULL, NULL, NULL, 54988), -- Shadow-Borne Witch Doctor (Area: Kings' Rest - Difficulty: Mythic) CreateObject2 (Auras: )
+(@CGUID+4, 133943, 1762, 9526, 9526, '23,8,2', 0, 0, 0, 0, -1070.8541259765625, 2661.4306640625, 810.9376220703125, 0, 7200, 0, 0, 100, 0, NULL, NULL, NULL, NULL, 54988), -- Minion of Zul (Area: Kings' Rest - Difficulty: Mythic) CreateObject2 (Auras: 269935 - Bound by Shadow)
+(@CGUID+5, 133943, 1762, 9526, 9526, '23,8,2', 0, 0, 0, 0, -1070.96533203125, 2658.845458984375, 811.05706787109375, 0, 7200, 0, 0, 100, 0, NULL, NULL, NULL, NULL, 54988), -- Minion of Zul (Area: Kings' Rest - Difficulty: Mythic) CreateObject2 (Auras: 269935 - Bound by Shadow)
+(@CGUID+6, 133943, 1762, 9526, 9526, '23,8,2', 0, 0, 0, 0, -1073.2569580078125, 2661.0244140625, 810.9376220703125, 0, 7200, 0, 0, 100, 0, NULL, NULL, NULL, NULL, 54988), -- Minion of Zul (Area: Kings' Rest - Difficulty: Mythic) CreateObject2 (Auras: 269935 - Bound by Shadow)
+(@CGUID+7, 134158, 1762, 9526, 9526, '23,8,2', 0, 0, 0, 0, -1040.140625, 2637.28564453125, 810.1707763671875, 4.446186065673828125, 7200, 0, 0, 100, 0, NULL, NULL, NULL, NULL, 54988), -- Shadow-Borne Champion (Area: Kings' Rest - Difficulty: Mythic) CreateObject2 (Auras: )
+(@CGUID+8, 134157, 1762, 9526, 9526, '23,8,2', 0, 0, 0, 0, -1080.8350830078125, 2669.678955078125, 810.1707763671875, 5.609979629516601562, 7200, 0, 0, 100, 0, NULL, NULL, NULL, NULL, 54988), -- Shadow-Borne Warrior (Area: Kings' Rest - Difficulty: Mythic) CreateObject2 (Auras: )
+(@CGUID+9, 134174, 1762, 9526, 9526, '23,8,2', 0, 0, 0, 0, -1055.0989990234375, 2663.8134765625, 810.1707763671875, 4.17470407485961914, 7200, 0, 0, 100, 0, NULL, NULL, NULL, NULL, 54988), -- Shadow-Borne Witch Doctor (Area: Kings' Rest - Difficulty: Mythic) CreateObject2 (Auras: )
+(@CGUID+10, 134157, 1762, 9526, 9526, '23,8,2', 0, 0, 0, 0, -1060.3385009765625, 2666.329833984375, 810.1707763671875, 4.488315582275390625, 7200, 0, 0, 100, 0, NULL, NULL, NULL, NULL, 54988), -- Shadow-Borne Warrior (Area: Kings' Rest - Difficulty: Mythic) CreateObject2 (Auras: )
+(@CGUID+11, 133943, 1762, 9526, 9526, '23,8,2', 0, 0, 0, 0, -1072.842041015625, 2659.14404296875, 810.9376220703125, 0, 7200, 0, 0, 100, 0, NULL, NULL, NULL, NULL, 54988), -- Minion of Zul (Area: Kings' Rest - Difficulty: Mythic) CreateObject2 (Auras: 269935 - Bound by Shadow)
+(@CGUID+12, 134158, 1762, 9526, 9526, '23,8,2', 0, 0, 0, 0, -1082.53125, 2662.041748046875, 810.1707763671875, 6.203471660614013671, 7200, 0, 0, 100, 0, NULL, NULL, NULL, NULL, 54988), -- Shadow-Borne Champion (Area: Kings' Rest - Difficulty: Mythic) CreateObject2 (Auras: )
+(@CGUID+13, 134157, 1762, 9526, 9526, '23,8,2', 0, 0, 0, 0, -1086.7742919921875, 2650.109375, 810.1707763671875, 5.949019432067871093, 7200, 0, 0, 100, 0, NULL, NULL, NULL, NULL, 54988), -- Shadow-Borne Warrior (Area: Kings' Rest - Difficulty: Mythic) CreateObject2 (Auras: )
+(@CGUID+14, 134157, 1762, 9526, 9526, '23,8,2', 0, 0, 0, 0, -1049.03125, 2660.283935546875, 810.1707763671875, 3.988105535507202148, 7200, 0, 0, 100, 0, NULL, NULL, NULL, NULL, 54988), -- Shadow-Borne Warrior (Area: Kings' Rest - Difficulty: Mythic) CreateObject2 (Auras: )
+(@CGUID+15, 133943, 1762, 9526, 9526, '23,8,2', 0, 0, 0, 0, -1068.4930419921875, 2661.75341796875, 810.9376220703125, 0, 7200, 0, 0, 100, 0, NULL, NULL, NULL, NULL, 54988), -- Minion of Zul (Area: Kings' Rest - Difficulty: Mythic) CreateObject2 (Auras: 269935 - Bound by Shadow)
+(@CGUID+16, 134174, 1762, 9526, 9526, '23,8,2', 0, 0, 0, 0, -1046.3211669921875, 2635.2509765625, 810.1707763671875, 4.599164962768554687, 7200, 0, 0, 100, 0, NULL, NULL, NULL, NULL, 54988); -- Shadow-Borne Witch Doctor (Area: Kings' Rest - Difficulty: Mythic) CreateObject2 (Auras: )
+
+-- Update
+UPDATE `gameobject_template` SET `AIName` = '', `ScriptName` = 'go_kings_rest_serpentine_seal' WHERE `entry` = 288466;
+
+UPDATE `creature_template` SET `AIName` = '', `ScriptName` = 'npc_kings_rest_shadow_of_zul' WHERE `entry` = 137020;
+UPDATE `creature_template` SET `AIName` = '', `ScriptName` = 'npc_kings_rest_shadow_borne_warrior' WHERE `entry` = 134157;
+UPDATE `creature_template` SET `AIName` = '', `ScriptName` = 'npc_kings_rest_shadow_borne_witch_doctor' WHERE `entry` = 134174;
+UPDATE `creature_template` SET `AIName` = '', `ScriptName` = 'npc_kings_rest_shadow_borne_champion' WHERE `entry` = 134158;
+UPDATE `creature_template` SET `AIName` = '', `ScriptName` = 'npc_kings_rest_minion_of_zul' WHERE `entry` = 133943;
+
+UPDATE `creature` SET `StringId` = 'DontForceRespawn' WHERE `guid` IN (7000965, 7000970, 7000972, 7000976, 7000969, 7000967, 7000968, 7000981, 7000975, 7000966, 7000971, 7000982, 7000978, 7000979, 7000983, 7000973, 7000977, 7000980, 7000974, 7000993, 7001001, 7000997, 7000990, 7001002, 7000989, 7000998, 7000985);
+UPDATE `creature` SET `StringId` = 'TempleEvent' WHERE `guid` IN (@CGUID+1, @CGUID+4, @CGUID+5, @CGUID+6, @CGUID+11, @CGUID+15);
+
+-- Delete SAI Script (converted to C++)
+DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = 133943;
+
+-- Creature Text
+DELETE FROM `creature_text` WHERE `CreatureID` = 137020 AND `GroupID` = 0;
+INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
+(137020, 0, 0, 'Dis temple is under G\'huun\'s power!', 14, 0, 100, 0, 0, 106154, 151859, 0, 'Shadow of Zul to Player');
+
+-- AreaTrigger
+DELETE FROM `areatrigger_template` WHERE (`Id`=17933 AND `IsCustom`=0);
+INSERT INTO `areatrigger_template` (`Id`, `IsCustom`, `Flags`, `VerifiedBuild`) VALUES
+(17933, 0, 0, 55165);
+
+DELETE FROM `areatrigger_create_properties` WHERE (`Id`=13339 AND `IsCustom`=0);
+INSERT INTO `areatrigger_create_properties` (`Id`, `IsCustom`, `AreaTriggerId`, `IsAreatriggerCustom`, `Flags`, `MoveCurveId`, `ScaleCurveId`, `MorphCurveId`, `FacingCurveId`, `AnimId`, `AnimKitId`, `DecalPropertiesId`, `TimeToTarget`, `TimeToTargetScale`, `Shape`, `ShapeData0`, `ShapeData1`, `ShapeData2`, `ShapeData3`, `ShapeData4`, `ShapeData5`, `ShapeData6`, `ShapeData7`, `VerifiedBuild`) VALUES
+(13339, 0, 17933, 0, 1040, 0, 0, 0, 0, -1, 0, 0, 6283, 30000, 4, 1.5, 1.5, 5, 5, 1, 1, 0, 0, 55165); -- Spell: 269931 (Gust Slash)
+
+DELETE FROM `areatrigger_create_properties_orbit` WHERE (`AreaTriggerCreatePropertiesId`=13339 AND `IsCustom`=0);
+INSERT INTO `areatrigger_create_properties_orbit` (`AreaTriggerCreatePropertiesId`, `IsCustom`, `StartDelay`, `CircleRadius`, `BlendFromRadius`, `InitialAngle`, `ZOffset`, `CounterClockwise`, `CanLoop`, `VerifiedBuild`) VALUES
+(13339, 0, 0, 5, 0, 0, 0, 0, 1, 55165); -- Spell: 269931 (Gust Slash)
+
+UPDATE `areatrigger_create_properties` SET `ScriptName` = 'at_kings_rest_gust_slash' WHERE (`Id`=13339 AND `IsCustom`=0);
+
+-- Spawngroups
+DELETE FROM `spawn_group_template` WHERE `groupId` = @SPAWNGROUPID;
+INSERT INTO `spawn_group_template` (`groupId`, `groupName`, `groupFlags`) VALUES
+(@SPAWNGROUPID, 'Kings Rest - Zul activates temple spawns', 0x04);
+
+DELETE FROM `spawn_group` WHERE `groupId` = @SPAWNGROUPID AND `spawnType`= 0;
+INSERT INTO `spawn_group` (`groupId`, `spawnType`, `spawnId`) VALUES
+(@SPAWNGROUPID, 0, @CGUID+0),
+(@SPAWNGROUPID, 0, @CGUID+1),
+(@SPAWNGROUPID, 0, @CGUID+2),
+(@SPAWNGROUPID, 0, @CGUID+3),
+(@SPAWNGROUPID, 0, @CGUID+4),
+(@SPAWNGROUPID, 0, @CGUID+5),
+(@SPAWNGROUPID, 0, @CGUID+6),
+(@SPAWNGROUPID, 0, @CGUID+7),
+(@SPAWNGROUPID, 0, @CGUID+8),
+(@SPAWNGROUPID, 0, @CGUID+9),
+(@SPAWNGROUPID, 0, @CGUID+10),
+(@SPAWNGROUPID, 0, @CGUID+11),
+(@SPAWNGROUPID, 0, @CGUID+12),
+(@SPAWNGROUPID, 0, @CGUID+13),
+(@SPAWNGROUPID, 0, @CGUID+14),
+(@SPAWNGROUPID, 0, @CGUID+15),
+(@SPAWNGROUPID, 0, @CGUID+16);
+
+-- Condition (Targets)
+DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceEntry` IN (270692));
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `Comment`) VALUES
+(13, 1, 270692, 0, 0, 31, 0, 3, 137652, 0, '', 0, 'Potential target of the spell is creature, entry is Untainted Guard Spirit (137652)'),
+(13, 1, 270692, 0, 0, 58, 0, 0, 0, 0, 'DontForceRespawn', 1, 'Potential target of the spell is not DontForceRespawn'),
+(13, 1, 270692, 0, 1, 31, 0, 3, 137650, 0, '', 0, 'Potential target of the spell is creature, entry is Untainted Spirit (137650)'),
+(13, 1, 270692, 0, 1, 58, 0, 0, 0, 0, 'DontForceRespawn', 1, 'Potential target of the spell is not DontForceRespawn'),
+(13, 1, 270692, 0, 2, 31, 0, 3, 137651, 0, '', 0, 'Potential target of the spell is creature, entry is Untainted Priest Spirit (137651)'),
+(13, 1, 270692, 0, 2, 58, 0, 0, 0, 0, 'DontForceRespawn', 1, 'Potential target of the spell is not DontForceRespawn');
+
+-- SAI
+UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` IN (137652, 137650, 137651);
+DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` IN (137652, 137650, 137651);
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `Difficulties`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(137652, 0, 0, 0, '', 8, 0, 100, 0, 270692, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On spell 270692 hit - Self: Despawn in 3 s'),
+(137650, 0, 0, 0, '', 8, 0, 100, 0, 270692, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On spell 270692 hit - Self: Despawn in 3 s'),
+(137651, 0, 0, 0, '', 8, 0, 100, 0, 270692, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On spell 270692 hit - Self: Despawn in 3 s');
diff --git a/src/server/scripts/Zandalar/KingsRest/instance_kings_rest.cpp b/src/server/scripts/Zandalar/KingsRest/instance_kings_rest.cpp
index d770aee54d4..3b9e119505d 100644
--- a/src/server/scripts/Zandalar/KingsRest/instance_kings_rest.cpp
+++ b/src/server/scripts/Zandalar/KingsRest/instance_kings_rest.cpp
@@ -38,8 +38,9 @@ DoorData const doorData[] =
ObjectData const objectData[] =
{
- { GO_KINGS_REST_ENTRYWAY_DOOR, DATA_KINGS_REST_INTRO_DOOR },
- { 0, 0 } // END
+ { GO_KINGS_REST_ENTRYWAY_DOOR, DATA_KINGS_REST_INTRO_DOOR },
+ { GO_KINGS_REST_LIQUID_GOLD_POOL, DATA_KINGS_REST_LIQUID_POOL },
+ { 0, 0 } // END
};
DungeonEncounterData const encounters[] =
diff --git a/src/server/scripts/Zandalar/KingsRest/kings_rest.cpp b/src/server/scripts/Zandalar/KingsRest/kings_rest.cpp
index c4cda8e23e6..dcd18da9c40 100644
--- a/src/server/scripts/Zandalar/KingsRest/kings_rest.cpp
+++ b/src/server/scripts/Zandalar/KingsRest/kings_rest.cpp
@@ -19,7 +19,9 @@
#include "AreaTriggerAI.h"
#include "Conversation.h"
#include "GameObject.h"
+#include "GameObjectAI.h"
#include "InstanceScript.h"
+#include "Map.h"
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "SpellAuras.h"
@@ -31,25 +33,41 @@
enum KingsRestData
{
// Creature
- NPC_SHADOW_OF_ZUL = 137020,
+ NPC_SHADOW_OF_ZUL = 137020,
// Creature text
- SAY_ANIMATED_GUARDIAN_ENGAGE = 0,
+ SAY_ANIMATED_GUARDIAN_ENGAGE = 0,
+ SAY_ZUL_PRE_BOSS_EVENT_SPAWN = 0,
// DisplayIDs
- DISPLAY_INVISIBLE_ZUL = 11686,
+ DISPLAY_INVISIBLE_ZUL = 11686,
// Spell Visuals
- SPELL_VISUAL_ZUL_OPEN_GOB = 77330,
+ SPELL_VISUAL_ZUL_OPEN_GOB = 77330,
// Conversation
- CONV_ZUL_KINGS_REST_INTRO = 7690,
+ CONV_ZUL_KINGS_REST_INTRO = 7690,
+
+ // Spawngroups
+ SPAWN_GROUP_PRE_FIRST_BOSS = 1255,
// Spells
- SPELL_ZUL_SHADOWFORM = 269058,
- SPELL_SUPPRESSION_SLAM_SELECTOR = 270002,
- SPELL_SUPPRESSION_SLAM_DAMAGE = 270003,
- SPELL_RELEASED_INHIBITORS = 270016
+ SPELL_ZUL_SHADOWFORM = 269058,
+ SPELL_ZUL_TRASH_EVENT_STATE = 269905,
+ SPELL_ZUL_DESPAWN_COSMETIC_TRASH = 270692,
+ SPELL_ZUL_SUMMON_VISUAL = 269619,
+ SPELL_ZUL_SUMMON_VISUAL_CHANNEL = 269623,
+ SPELL_SUPPRESSION_SLAM_SELECTOR = 270002,
+ SPELL_SUPPRESSION_SLAM_DAMAGE = 270003,
+ SPELL_RELEASED_INHIBITORS = 270016,
+ SPELL_GUST_SLASH = 269931,
+ SPELL_GUST_SLASH_DAMAGE = 269932,
+ SPELL_DEATHLY_CHILL = 269973,
+ SPELL_SHADOW_BOLT_VOLLEY = 269972,
+ SPELL_ANCESTRAL_FURY = 269976,
+ SPELL_VIGILANT_DEFENSE = 269928,
+ SPELL_MINION_OF_ZUL_FIXATE = 269936,
+ SPELL_BOUND_BY_SHADOW = 269935
};
constexpr Position ShadowOfZulIntroSpawnPosition = { -944.9617f, 2646.5268f, 832.8684f, 4.716575f };
@@ -262,13 +280,322 @@ class spell_kings_rest_pit_of_despair : public AuraScript
}
};
+constexpr Position ShadowOfZulSerpentBossEventSpawnPosition = { -1066.0365f, 2643.302f, 819.37024f, 5.028946f };
+
+// 288466 - Serpentine Seal
+struct go_kings_rest_serpentine_seal : public GameObjectAI
+{
+ go_kings_rest_serpentine_seal(GameObject* go) : GameObjectAI(go) { }
+
+ bool OnGossipHello(Player* /*player*/) override
+ {
+ me->UseDoorOrButton();
+ _scheduler.Schedule(3s, [this](TaskContext)
+ {
+ if (TempSummon* zul = me->SummonCreature(NPC_SHADOW_OF_ZUL, ShadowOfZulSerpentBossEventSpawnPosition))
+ zul->SetScriptStringId("SerpentBossEvent");
+ });
+ return true;
+ }
+
+ void UpdateAI(uint32 diff) override
+ {
+ _scheduler.Update(diff);
+ }
+
+private:
+ TaskScheduler _scheduler;
+};
+
+// 137020 - Shadow of Zul
+struct npc_kings_rest_shadow_of_zul : public ScriptedAI
+{
+ npc_kings_rest_shadow_of_zul(Creature* creature) : ScriptedAI(creature) { }
+
+ void JustAppeared() override
+ {
+ if (me->HasStringId("SerpentBossEvent"))
+ TriggerSerpentBossEvent();
+ }
+
+ void TriggerSerpentBossEvent()
+ {
+ Seconds delay = 1s;
+
+ _scheduler.Schedule(delay, [this](TaskContext)
+ {
+ Talk(SAY_ZUL_PRE_BOSS_EVENT_SPAWN);
+ me->CastSpell(nullptr, SPELL_ZUL_TRASH_EVENT_STATE, false);
+ me->CastSpell(nullptr, SPELL_ZUL_DESPAWN_COSMETIC_TRASH, false);
+ if (InstanceScript* instance = me->GetInstanceScript())
+ {
+ if (GameObject* pool = instance->GetGameObject(DATA_KINGS_REST_LIQUID_POOL))
+ pool->SetGoState(GO_STATE_ACTIVE);
+ }
+ });
+
+ delay += 9s;
+
+ _scheduler.Schedule(delay, [this](TaskContext)
+ {
+ std::vector<WorldObject*> spawnedCreatures;
+ me->GetMap()->SpawnGroupSpawn(SPAWN_GROUP_PRE_FIRST_BOSS, false, false, &spawnedCreatures);
+ for (WorldObject* obj : spawnedCreatures)
+ {
+ Creature* creature = obj->ToCreature();
+ if (!creature)
+ continue;
+
+ me->CastSpell(creature, SPELL_ZUL_SUMMON_VISUAL_CHANNEL, false);
+ }
+ });
+
+ delay += 5s;
+
+ _scheduler.Schedule(delay, [this](TaskContext)
+ {
+ me->RemoveAurasDueToSpell(SPELL_ZUL_SHADOWFORM);
+ });
+
+ delay += 1s;
+
+ _scheduler.Schedule(delay, [this](TaskContext)
+ {
+ me->SetDisplayId(DISPLAY_INVISIBLE_ZUL);
+ me->DespawnOrUnsummon(1s);
+ });
+ }
+
+ void UpdateAI(uint32 diff) override
+ {
+ _scheduler.Update(diff);
+ }
+
+private:
+ TaskScheduler _scheduler;
+};
+
+struct npc_kings_rest_temple_basic : public ScriptedAI
+{
+ npc_kings_rest_temple_basic(Creature* creature) : ScriptedAI(creature) { }
+
+ void JustAppeared() override
+ {
+ me->CastSpell(me, SPELL_ZUL_SUMMON_VISUAL, false);
+ }
+};
+
+enum ShadowBorneWarriorEvent
+{
+ EVENT_GUST_SLASH = 1
+};
+
+// 134157 - Shadow-Borne Warrior
+struct npc_kings_rest_shadow_borne_warrior : public npc_kings_rest_temple_basic
+{
+ npc_kings_rest_shadow_borne_warrior(Creature* creature) : npc_kings_rest_temple_basic(creature) { }
+
+ void JustEngagedWith(Unit* /*who*/) override
+ {
+ _events.ScheduleEvent(EVENT_GUST_SLASH, 17s);
+ }
+
+ void Reset() override
+ {
+ _events.Reset();
+ }
+
+ void UpdateAI(uint32 diff) override
+ {
+ if (!UpdateVictim())
+ return;
+
+ _events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = _events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_GUST_SLASH:
+ DoCast(SPELL_GUST_SLASH);
+ _events.ScheduleEvent(EVENT_GUST_SLASH, 17s);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+private:
+ EventMap _events;
+};
+
+enum ShadowBorneWitchDoctorEvent
+{
+ EVENT_DEATHLY_CHILL = 1,
+ EVENT_SHADOW_BOLT_VOLLEY
+};
+
+// 134174 - Shadow-Borne Witch Doctor
+struct npc_kings_rest_shadow_borne_witch_doctor : public npc_kings_rest_temple_basic
+{
+ npc_kings_rest_shadow_borne_witch_doctor(Creature* creature) : npc_kings_rest_temple_basic(creature) { }
+
+ void JustEngagedWith(Unit* /*who*/) override
+ {
+ _events.ScheduleEvent(EVENT_DEATHLY_CHILL, 5s);
+ _events.ScheduleEvent(EVENT_SHADOW_BOLT_VOLLEY, 17s);
+ }
+
+ void Reset() override
+ {
+ _events.Reset();
+ }
+
+ void UpdateAI(uint32 diff) override
+ {
+ if (!UpdateVictim())
+ return;
+
+ _events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = _events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_DEATHLY_CHILL:
+ DoCastVictim(SPELL_DEATHLY_CHILL);
+ _events.ScheduleEvent(EVENT_DEATHLY_CHILL, 2s + 500ms);
+ break;
+ case EVENT_SHADOW_BOLT_VOLLEY:
+ DoCast(SPELL_SHADOW_BOLT_VOLLEY);
+ _events.ScheduleEvent(EVENT_SHADOW_BOLT_VOLLEY, 16s);
+ break;
+ default:
+ break;
+ }
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+ }
+ }
+
+private:
+ EventMap _events;
+};
+
+enum ShadowBorneChampionEvent
+{
+ EVENT_ANCESTRAL_FURY = 1,
+ EVENT_VIGILANT_DEFENSE
+};
+
+// 134158 - Shadow-Borne Champion
+struct npc_kings_rest_shadow_borne_champion : public npc_kings_rest_temple_basic
+{
+ npc_kings_rest_shadow_borne_champion(Creature* creature) : npc_kings_rest_temple_basic(creature) { }
+
+ void JustEngagedWith(Unit* /*who*/) override
+ {
+ _events.ScheduleEvent(EVENT_ANCESTRAL_FURY, 35s);
+ _events.ScheduleEvent(EVENT_VIGILANT_DEFENSE, 21s);
+ }
+
+ void Reset() override
+ {
+ _events.Reset();
+ }
+
+ void UpdateAI(uint32 diff) override
+ {
+ if (!UpdateVictim())
+ return;
+
+ _events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = _events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_ANCESTRAL_FURY:
+ DoCast(SPELL_ANCESTRAL_FURY);
+ _events.ScheduleEvent(EVENT_ANCESTRAL_FURY, 30s);
+ break;
+ case EVENT_VIGILANT_DEFENSE:
+ DoCast(SPELL_VIGILANT_DEFENSE);
+ _events.ScheduleEvent(EVENT_VIGILANT_DEFENSE, 21s);
+ break;
+ default:
+ break;
+ }
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+ }
+ }
+
+private:
+ EventMap _events;
+};
+
+// 133943 - Minion of Zul
+struct npc_kings_rest_minion_of_zul : public npc_kings_rest_temple_basic
+{
+ npc_kings_rest_minion_of_zul(Creature* creature) : npc_kings_rest_temple_basic(creature) { }
+
+ void JustAppeared() override
+ {
+ if (me->HasStringId("TempleEvent"))
+ npc_kings_rest_temple_basic::JustAppeared();
+
+ DoCast(SPELL_BOUND_BY_SHADOW);
+ }
+
+ void JustEngagedWith(Unit* /*who*/) override
+ {
+ DoCast(SPELL_MINION_OF_ZUL_FIXATE);
+ }
+};
+
+// 17933 - Gust Slash - Areatrigger
+struct at_kings_rest_gust_slash : AreaTriggerAI
+{
+ at_kings_rest_gust_slash(AreaTrigger* areatrigger) : AreaTriggerAI(areatrigger) { }
+
+ void OnUnitEnter(Unit* unit) override
+ {
+ if (!unit->IsPlayer())
+ return;
+
+ unit->CastSpell(nullptr, SPELL_GUST_SLASH_DAMAGE, true);
+ }
+};
+
void AddSC_kings_rest()
{
// Creature
RegisterKingsRestCreatureAI(npc_kings_rest_animated_guardian);
+ RegisterKingsRestCreatureAI(npc_kings_rest_shadow_of_zul);
+ RegisterKingsRestCreatureAI(npc_kings_rest_shadow_borne_warrior);
+ RegisterKingsRestCreatureAI(npc_kings_rest_shadow_borne_witch_doctor);
+ RegisterKingsRestCreatureAI(npc_kings_rest_shadow_borne_champion);
+ RegisterKingsRestCreatureAI(npc_kings_rest_minion_of_zul);
+
+ // GameObject
+ RegisterGameObjectAI(go_kings_rest_serpentine_seal);
// Areatrigger
RegisterAreaTriggerAI(at_kings_rest_trigger_intro_event_with_zul);
+ RegisterAreaTriggerAI(at_kings_rest_gust_slash);
// Conversation
new conversation_kings_rest_intro();
diff --git a/src/server/scripts/Zandalar/KingsRest/kings_rest.h b/src/server/scripts/Zandalar/KingsRest/kings_rest.h
index b959bdb02b7..6f6c69bd620 100644
--- a/src/server/scripts/Zandalar/KingsRest/kings_rest.h
+++ b/src/server/scripts/Zandalar/KingsRest/kings_rest.h
@@ -40,6 +40,7 @@ enum KingsRestDataTypes
// GameObjects
DATA_KINGS_REST_INTRO_DOOR,
+ DATA_KINGS_REST_LIQUID_POOL,
};
enum KingsRestCreatureIds
@@ -56,7 +57,8 @@ enum KingsRestCreatureIds
enum KingsRestGameObjectIds
{
GO_KINGS_REST_ENTRYWAY_DOOR = 282652,
- GO_KINGS_REST_SERPENT_POST_DOOR = 287392
+ GO_KINGS_REST_SERPENT_POST_DOOR = 287392,
+ GO_KINGS_REST_LIQUID_GOLD_POOL = 289347
};
template <class AI, class T>