aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2025_10_18_00_world.sql248
-rw-r--r--sql/updates/world/master/2025_10_18_01_world.sql116
-rw-r--r--sql/updates/world/master/2025_10_18_02_world.sql91
-rw-r--r--src/server/game/Scripting/ScriptMgr.cpp13
-rw-r--r--src/server/game/Spells/Spell.cpp5
-rw-r--r--src/server/scripts/Battlegrounds/EnigmaCrucible/arena_enigma_crucible.cpp363
-rw-r--r--src/server/scripts/Battlegrounds/NokhudonProvingGrounds/arena_nokhudon_proving_grounds.cpp303
-rw-r--r--src/server/scripts/Battlegrounds/battlegrounds_script_loader.cpp6
-rw-r--r--src/server/scripts/BrokenIsles/zone_mardum.cpp285
9 files changed, 1421 insertions, 9 deletions
diff --git a/sql/updates/world/master/2025_10_18_00_world.sql b/sql/updates/world/master/2025_10_18_00_world.sql
new file mode 100644
index 00000000000..47389fad80e
--- /dev/null
+++ b/sql/updates/world/master/2025_10_18_00_world.sql
@@ -0,0 +1,248 @@
+SET @CGUID := 9004529;
+SET @OGUID := 9003985;
+SET @WORLD_SAFE_LOC_ID := 100103;
+SET @SPAWN_GROUP := 1274;
+
+DELETE FROM `world_safe_locs` WHERE `ID` BETWEEN @WORLD_SAFE_LOC_ID+0 AND @WORLD_SAFE_LOC_ID+1;
+INSERT INTO `world_safe_locs` (`ID`, `MapID`, `LocX`, `LocY`, `LocZ`, `Facing`, `Comment`) VALUES
+(@WORLD_SAFE_LOC_ID+0, 2563, -591.04865, 4226.06, 382.116, DEGREES(5.6160145), 'Nokhudon Proving Grounds - Purple Team'),
+(@WORLD_SAFE_LOC_ID+1, 2563, -475.53995, 4131.1865, 381.69434, DEGREES(2.3969803), 'Nokhudon Proving Grounds - Gold Team');
+
+DELETE FROM `battleground_scripts` WHERE `MapId` = 2563 AND `BattlemasterListId` = 0;
+INSERT INTO `battleground_scripts` (`MapId`, `BattlemasterListId`, `ScriptName`) VALUES
+(2563, 0, 'arena_nokhudon_proving_grounds');
+
+DELETE FROM `battleground_template` WHERE `ID` = 1088;
+INSERT INTO `battleground_template` (`ID`, `AllianceStartLoc`, `HordeStartLoc`, `StartMaxDist`, `Weight`, `Comment`) VALUES
+(1088, @WORLD_SAFE_LOC_ID+0, @WORLD_SAFE_LOC_ID+1, 0, 1, 'Nokhudon Proving Grounds');
+
+DELETE FROM `conversation_actors` WHERE (`Idx`=0 AND `ConversationId` IN (20101,20102));
+INSERT INTO `conversation_actors` (`ConversationId`, `ConversationActorId`, `ConversationActorGuid`, `Idx`, `CreatureId`, `CreatureDisplayInfoId`, `NoActorObject`, `ActivePlayerObject`, `VerifiedBuild`) VALUES
+(20101, 88583, @CGUID+25, 0, 0, 0, 0, 0, 63305), -- Full: 0x2042394060C00F80002F720000582878 Creature/0 R4238/S12146 Map: 2563 (Nokhudon Proving Grounds) Entry: 196670 (Malicia) Low: 5777528
+(20102, 88583, @CGUID+25, 0, 0, 0, 0, 0, 63305); -- Full: 0x2042394060C00F80002F720000582878 Creature/0 R4238/S12146 Map: 2563 (Nokhudon Proving Grounds) Entry: 196670 (Malicia) Low: 5777528
+
+DELETE FROM `conversation_line_template` WHERE `Id` IN (51743, 51744, 21375, 21374, 21373);
+INSERT INTO `conversation_line_template` (`Id`, `UiCameraID`, `ActorIdx`, `Flags`, `ChatType`, `VerifiedBuild`) VALUES
+(51743, 0, 0, 0, 0, 63305),
+(51744, 0, 0, 0, 0, 63305),
+(21375, 0, 0, 0, 0, 63305),
+(21374, 0, 0, 0, 0, 63305),
+(21373, 0, 0, 0, 0, 63305);
+
+DELETE FROM `conversation_template` WHERE `Id` IN (20101, 20102);
+INSERT INTO `conversation_template` (`Id`, `FirstLineID`, `TextureKitId`, `VerifiedBuild`) VALUES
+(20101, 51743, 0, 63305),
+(20102, 51744, 0, 63305);
+
+DELETE FROM `gameobject_template_addon` WHERE `entry`=379282;
+INSERT INTO `gameobject_template_addon` (`entry`, `faction`, `flags`, `WorldEffectID`, `AIAnimKitID`) VALUES
+(379282, 1375, 0x20, 0, 0); -- Arena Door
+
+DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+25;
+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`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `VerifiedBuild`) VALUES
+(@CGUID+0, 197021, 2563, 14436, 14436, '0', '0', 0, 0, 0, -516.84552001953125, 4217.75244140625, 411.653839111328125, 4.585444927215576171, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Combatant Observers (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+1, 197021, 2563, 14436, 14436, '0', '0', 0, 0, 0, -544.99652099609375, 4233.54345703125, 412.907470703125, 4.454012870788574218, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Combatant Observers (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+2, 197021, 2563, 14436, 14436, '0', '0', 0, 0, 0, -540.23089599609375, 4234.35400390625, 413.33526611328125, 4.739606380462646484, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Combatant Observers (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+3, 197021, 2563, 14436, 14436, '0', '0', 0, 0, 0, -515.3992919921875, 4222.30712890625, 413.114410400390625, 3.938925981521606445, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Combatant Observers (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+4, 197021, 2563, 14436, 14436, '0', '0', 0, 0, 0, -521.4288330078125, 4223.7880859375, 412.141632080078125, 4.116581916809082031, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Combatant Observers (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+5, 197021, 2563, 14436, 14436, '0', '0', 0, 0, 0, -549.81597900390625, 4232.26220703125, 412.218017578125, 4.739606380462646484, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Combatant Observers (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+6, 197021, 2563, 14436, 14436, '0', '0', 0, 0, 0, -524.24481201171875, 4228.33349609375, 412.783782958984375, 3.996626138687133789, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Combatant Observers (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+7, 197021, 2563, 14436, 14436, '0', '0', 0, 0, 0, -500.208343505859375, 4225.02099609375, 413.283935546875, 4.996204376220703125, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Combatant Observers (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+8, 197245, 2563, 14436, 14436, '0', '0', 0, 0, 0, -521.15625, 4216.90478515625, 410.611083984375, 4.535685539245605468, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Meenor (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+9, 197021, 2563, 14436, 14436, '0', '0', 0, 0, 0, -509.401031494140625, 4219.05126953125, 411.67694091796875, 4.383775711059570312, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Combatant Observers (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+10, 197021, 2563, 14436, 14436, '0', '0', 0, 0, 0, -502.118072509765625, 4220.85498046875, 412.223388671875, 5.136957645416259765, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Combatant Observers (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+11, 197021, 2563, 14436, 14436, '0', '0', 0, 0, 0, -536.66668701171875, 4234.837890625, 413.575714111328125, 4.348513126373291015, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Combatant Observers (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+12, 196986, 2563, 14436, 14436, '0', '0', 0, 0, 0, -464.77105712890625, 4196.78857421875, 443.492919921875, 0.190508812665939331, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Nokhud Vulture (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+13, 196986, 2563, 14436, 14436, '0', '0', 0, 0, 0, -533.030029296875, 4255.65869140625, 459.373077392578125, 1.438202381134033203, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Nokhud Vulture (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+14, 196986, 2563, 14436, 14436, '0', '0', 0, 0, 0, -553.37652587890625, 4198.7861328125, 443.492919921875, 1.128515005111694335, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Nokhud Vulture (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+15, 196470, 2563, 14436, 14436, '0', '0', 0, 0, 0, -555.94793701171875, 4126.5087890625, 381.65057373046875, 0.837407588958740234, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Nokhud Combatant (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+16, 196470, 2563, 14436, 14436, '0', '0', 0, 0, 0, -547.1319580078125, 4117.54248046875, 381.678131103515625, 0.837407588958740234, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Nokhud Combatant (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+17, 196470, 2563, 14436, 14436, '0', '0', 0, 0, 0, -554.140625, 4105.923828125, 383.053131103515625, 0.837407588958740234, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Nokhud Combatant (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+18, 196986, 2563, 14436, 14436, '0', '0', 0, 0, 0, -534.19000244140625, 4150.16943359375, 443.492919921875, 1.166725397109985351, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Nokhud Vulture (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+19, 196470, 2563, 14436, 14436, '0', '0', 0, 0, 0, -542.22918701171875, 4113.1474609375, 382.2135009765625, 0.837407588958740234, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Nokhud Combatant (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+20, 197290, 2563, 14436, 14436, '0', '0', 0, 0, 0, -555.3038330078125, 4228.72412109375, 411.27679443359375, 5.241607666015625, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Arudien Sandalwood (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+21, 196470, 2563, 14436, 14436, '0', '0', 0, 0, 0, -553.14239501953125, 4098.9833984375, 383.6409912109375, 0.837407588958740234, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Nokhud Combatant (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+22, 196470, 2563, 14436, 14436, '0', '0', 0, 0, 0, -547.59722900390625, 4102.5224609375, 385.33984375, 0.837407588958740234, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Nokhud Combatant (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+23, 196470, 2563, 14436, 14436, '0', '0', 0, 0, 0, -573.5538330078125, 4120.93505859375, 381.678131103515625, 0.837407588958740234, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Nokhud Combatant (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+24, 196470, 2563, 14436, 14436, '0', '0', 0, 0, 0, -563.2586669921875, 4128.56103515625, 381.65057373046875, 0.837407588958740234, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305), -- Nokhud Combatant (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@CGUID+25, 196670, 2563, 14436, 14436, '0', '0', 0, 0, 0, -601.13714599609375, 4145.87744140625, 394.360321044921875, 0.411279410123825073, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305); -- Malicia (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1 (Auras: )
+
+DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+6;
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `PhaseId`, `PhaseGroup`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`) VALUES
+(@OGUID+0, 379282, 2563, 14436, 14436, '0', '0', 0, -483.23089599609375, 4134.76220703125, 381.383941650390625, 2.442239999771118164, 0, 0, 0.939483642578125, 0.342593759298324584, 7200, 255, 1, 63305), -- Arena Door (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@OGUID+1, 381620, 2563, 14436, 14436, '0', '0', 0, -651.515625, 4105.353515625, 386.51214599609375, 2.652894020080566406, 0, 0, 0.970294952392578125, 0.241925001144409179, 7200, 255, 1, 63305), -- 10CT_Centaur_FoodRack02_meat.M2 (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@OGUID+2, 381619, 2563, 14436, 14436, '0', '0', 0, -677.72222900390625, 4285.220703125, 401.207672119140625, 3.769911527633666992, 0, 0, -0.95105648040771484, 0.309017121791839599, 7200, 255, 1, 63305), -- Campfire (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@OGUID+3, 381618, 2563, 14436, 14436, '0', '0', 0, -419.352447509765625, 4194.9150390625, 387.279205322265625, 0.261798173189163208, 0, 0, 0.130525588989257812, 0.991444945335388183, 7200, 255, 1, 63305), -- Campfire (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@OGUID+4, 379282, 2563, 14436, 14436, '0', '0', 0, -585.78643798828125, 4220.5224609375, 381.53326416015625, 5.580377578735351562, 0, 0, -0.34421634674072265, 0.938890337944030761, 7200, 255, 1, 63305), -- Arena Door (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject1
+(@OGUID+5, 184663, 2563, 14436, 14436, '0', '0', 0, -583.763916015625, 4170.548828125, 380.34564208984375, 0, 0, 0, 0, 1, 360, 255, 1, 63305), -- Shadow Sight (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject2
+(@OGUID+6, 184664, 2563, 14436, 14436, '0', '0', 0, -487.916656494140625, 4191.6103515625, 380.926422119140625, 3.471065282821655273, 0, 0, -0.98646163940429687, 0.163992181420326232, 360, 255, 1, 63305); -- Shadow Sight (Area: Nokhudon Proving Grounds - Difficulty: 0) CreateObject2
+DELETE FROM `gameobject_addon` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+6;
+
+DELETE FROM `creature_template_addon` WHERE `entry` IN (196470 /*196470 (Nokhud Combatant)*/, 196986 /*196986 (Nokhud Vulture)*/);
+INSERT INTO `creature_template_addon` (`entry`, `PathId`, `mount`, `StandState`, `AnimTier`, `VisFlags`, `SheathState`, `PvpFlags`, `emote`, `aiAnimKit`, `movementAnimKit`, `meleeAnimKit`, `visibilityDistanceType`, `auras`) VALUES
+(196470, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, ''), -- 196470 (Nokhud Combatant)
+(196986, 0, 0, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, ''); -- 196986 (Nokhud Vulture)
+
+UPDATE `creature_template_difficulty` SET `ContentTuningID`=2437, `VerifiedBuild`=63305 WHERE (`Entry`=196670 AND `DifficultyID`=0); -- 196670 (Malicia) -
+UPDATE `creature_template_difficulty` SET `ContentTuningID`=969, `VerifiedBuild`=63305 WHERE (`Entry`=197290 AND `DifficultyID`=0); -- 197290 (Arudien Sandalwood) -
+UPDATE `creature_template_difficulty` SET `ContentTuningID`=969, `StaticFlags1`=0x10000000, `VerifiedBuild`=63305 WHERE (`Entry`=196470 AND `DifficultyID`=0); -- 196470 (Nokhud Combatant) - CanSwim
+UPDATE `creature_template_difficulty` SET `ContentTuningID`=969, `StaticFlags1`=0x30000000, `VerifiedBuild`=63305 WHERE (`Entry`=196986 AND `DifficultyID`=0); -- 196986 (Nokhud Vulture) - CanSwim, Floating
+UPDATE `creature_template_difficulty` SET `ContentTuningID`=969, `VerifiedBuild`=63305 WHERE (`Entry`=197245 AND `DifficultyID`=0); -- 197245 (Meenor) -
+UPDATE `creature_template_difficulty` SET `ContentTuningID`=969, `StaticFlags1`=0x10000000, `VerifiedBuild`=63305 WHERE (`Entry`=197021 AND `DifficultyID`=0); -- 197021 (Combatant Observers) - CanSwim
+
+UPDATE `creature_template` SET `faction`=35, `BaseAttackTime`=2000, `unit_flags`=0x2000000, `unit_flags2`=0x4000800 WHERE `entry`=196670; -- Malicia
+UPDATE `creature_template` SET `faction`=35, `BaseAttackTime`=2000, `unit_flags`=0x300, `unit_flags2`=0x4000800 WHERE `entry`=197290; -- Arudien Sandalwood
+UPDATE `creature_template` SET `faction`=35, `BaseAttackTime`=2000, `unit_flags`=0x2000040, `unit_flags2`=0x800 WHERE `entry`=196470; -- Nokhud Combatant
+UPDATE `creature_template` SET `faction`=35, `BaseAttackTime`=2000, `unit_flags`=0x2000000, `unit_flags2`=0x800 WHERE `entry`=196986; -- Nokhud Vulture
+UPDATE `creature_template` SET `faction`=35, `BaseAttackTime`=2000, `unit_flags`=0x300, `unit_flags2`=0x4000800 WHERE `entry`=197245; -- Meenor
+UPDATE `creature_template` SET `faction`=35, `BaseAttackTime`=2000, `unit_flags`=0x2000000, `unit_flags2`=0x800 WHERE `entry`=197021; -- Combatant Observers
+
+UPDATE `creature_template` SET `ScriptName`= 'npc_nokhudon_proving_grounds_nokhud_combatant' WHERE `entry`=196470; -- Nokhud Combatant
+
+DELETE FROM `spawn_group_template` WHERE `groupId` = @SPAWN_GROUP;
+INSERT INTO `spawn_group_template` (`groupId`, `groupName`, `groupFlags`) VALUES
+(@SPAWN_GROUP, 'Nokhudon Proving Grounds - Shadow sight', 0x20);
+
+DELETE FROM `spawn_group` WHERE `groupId` = @SPAWN_GROUP;
+INSERT INTO `spawn_group` (`groupId`, `spawnType`, `spawnId`) VALUES
+(@SPAWN_GROUP, 1, @OGUID+5),
+(@SPAWN_GROUP, 1, @OGUID+6);
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 33 AND `SourceEntry` = @SPAWN_GROUP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceEntry`, `SourceGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ScriptName`) VALUES
+(33, @SPAWN_GROUP, 0, 0, 0, 'condition_is_shadow_sight_enabled');
+
+DELETE FROM `creature_text` WHERE `CreatureID` IN (196670);
+INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
+(196670, 0, 0, 'Let the best team win! Oh, who am I kidding--give me a good show.', 12, 0, 100, 0, 0, 200426, 223427, 3, 'Malicia'),
+(196670, 1, 0, 'It\'s time for the show! Don\'t disappoint me.', 12, 0, 100, 0, 0, 200422, 223429, 3, 'Malicia'),
+(196670, 2, 0, 'So close! This just means more entertainment for me.', 12, 0, 100, 0, 0, 200427, 223428, 3, 'Malicia to Player');
+
+DELETE FROM `spell_proc` WHERE `SpellId` IN (388970);
+INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES
+(388970,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0,0,0,0); -- Nokhudon Proving Grounds Reaction Trigger
+
+DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_nokhudon_proving_grounds_reaction_trigger', 'spell_nokhudon_proving_grounds_trigger_low_health');
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(388969, 'spell_nokhudon_proving_grounds_trigger_low_health'),
+(388970, 'spell_nokhudon_proving_grounds_reaction_trigger');
+
+SET @MOVERGUID := @CGUID+13;
+SET @ENTRY := 196986;
+SET @PATHOFFSET := 0;
+SET @PATH := @ENTRY * 100 + @PATHOFFSET;
+DELETE FROM `waypoint_path` WHERE `PathId`= @PATH;
+INSERT INTO `waypoint_path` (`PathId`, `MoveType`, `Flags`, `Velocity`, `Comment`) VALUES
+(@PATH, 0, 0x2, 2.8687, 'Nokhud Vulture - Idle');
+
+DELETE FROM `waypoint_path_node` WHERE `PathId`= @PATH;
+INSERT INTO `waypoint_path_node` (`PathId`, `NodeId`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `Delay`) VALUES
+(@PATH, 0, -533.00854, 4255.81, 459.37305, NULL, 0),
+(@PATH, 1, -525.09393, 4268.9126, 459.37305, NULL, 0),
+(@PATH, 2, -510.2326, 4272.5806, 459.37305, NULL, 0),
+(@PATH, 3, -497.13022, 4264.666, 459.37305, NULL, 0),
+(@PATH, 4, -493.4619, 4249.8047, 459.37305, NULL, 0),
+(@PATH, 5, -501.3766, 4236.702, 459.37305, NULL, 0),
+(@PATH, 6, -516.23785, 4233.034, 459.37305, NULL, 0),
+(@PATH, 7, -529.3403, 4240.9487, 459.37305, NULL, 0);
+
+UPDATE `creature` SET `position_x`=-533.00854, `position_y`=4255.81, `position_z`=459.37305, `orientation`=0, `wander_distance`=0, `MovementType`=2 WHERE `guid`=@MOVERGUID;
+DELETE FROM `creature_addon` WHERE `guid`=@MOVERGUID;
+INSERT INTO `creature_addon` (`guid`, `PathId`, `SheathState`) VALUES
+(@MOVERGUID, @PATH, 1);
+
+SET @MOVERGUID := @CGUID+12;
+SET @ENTRY := 196986;
+SET @PATHOFFSET := 0;
+SET @PATH := @ENTRY * 100 + @PATHOFFSET;
+DELETE FROM `waypoint_path` WHERE `PathId`= @PATH;
+INSERT INTO `waypoint_path` (`PathId`, `MoveType`, `Flags`, `Velocity`, `Comment`) VALUES
+(@PATH, 0, 0x2, 2.6715, 'Nokhud Vulture - Idle');
+
+DELETE FROM `waypoint_path_node` WHERE `PathId`= @PATH;
+INSERT INTO `waypoint_path_node` (`PathId`, `NodeId`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `Delay`) VALUES
+(@PATH, 0, -466.12238, 4196.493, 443.49292, NULL, 0),
+(@PATH, 1, -454.4281, 4197.0044, 443.49292, NULL, 0),
+(@PATH, 2, -443.42847, 4193.001, 443.49292, NULL, 0),
+(@PATH, 3, -434.79803, 4185.0933, 443.49292, NULL, 0),
+(@PATH, 4, -429.85074, 4174.485, 443.49292, NULL, 0),
+(@PATH, 5, -429.33975, 4162.7905, 443.49292, NULL, 0),
+(@PATH, 6, -433.34283, 4151.791, 443.49292, NULL, 0),
+(@PATH, 7, -441.2506, 4143.1606, 443.49292, NULL, 0),
+(@PATH, 8, -451.85916, 4138.2134, 443.49292, NULL, 0),
+(@PATH, 9, -463.5534, 4137.702, 443.49292, NULL, 0),
+(@PATH, 10, -474.55307, 4141.705, 443.49292, NULL, 0),
+(@PATH, 11, -483.18347, 4149.6133, 443.49292, NULL, 0),
+(@PATH, 12, -488.13077, 4160.2217, 443.49292, NULL, 0),
+(@PATH, 13, -488.64175, 4171.916, 443.49292, NULL, 0),
+(@PATH, 14, -484.63867, 4182.9155, 443.49292, NULL, 0),
+(@PATH, 15, -476.7309, 4191.546, 443.49292, NULL, 0);
+
+UPDATE `creature` SET `position_x`=-466.12238, `position_y`=4196.493, `position_z`=443.49292, `orientation`=0, `wander_distance`=0, `MovementType`=2 WHERE `guid`=@MOVERGUID;
+DELETE FROM `creature_addon` WHERE `guid`=@MOVERGUID;
+INSERT INTO `creature_addon` (`guid`, `PathId`, `SheathState`) VALUES
+(@MOVERGUID, @PATH, 1);
+
+SET @MOVERGUID := @CGUID+14;
+SET @ENTRY := 196986;
+SET @PATHOFFSET := 0;
+SET @PATH := @ENTRY * 100 + @PATHOFFSET;
+DELETE FROM `waypoint_path` WHERE `PathId`= @PATH;
+INSERT INTO `waypoint_path` (`PathId`, `MoveType`, `Flags`, `Velocity`, `Comment`) VALUES
+(@PATH, 0, 0x2, 2.6714, 'Nokhud Vulture - Idle');
+
+DELETE FROM `waypoint_path_node` WHERE `PathId`= @PATH;
+INSERT INTO `waypoint_path_node` (`PathId`, `NodeId`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `Delay`) VALUES
+(@PATH, 0, -553.9386, 4197.5195, 443.49292, NULL, 0),
+(@PATH, 1, -547.4354, 4207.2524, 443.49292, NULL, 0),
+(@PATH, 2, -537.70276, 4213.7554, 443.49292, NULL, 0),
+(@PATH, 3, -526.2222, 4216.039, 443.49292, NULL, 0),
+(@PATH, 4, -514.7417, 4213.7554, 443.49292, NULL, 0),
+(@PATH, 5, -505.00903, 4207.2524, 443.49292, NULL, 0),
+(@PATH, 6, -498.50586, 4197.5195, 443.49292, NULL, 0),
+(@PATH, 7, -496.22223, 4186.039, 443.49292, NULL, 0),
+(@PATH, 8, -498.50586, 4174.5586, 443.49292, NULL, 0),
+(@PATH, 9, -505.00903, 4164.8257, 443.49292, NULL, 0),
+(@PATH, 10, -514.7417, 4158.3228, 443.49292, NULL, 0),
+(@PATH, 11, -526.2222, 4156.039, 443.49292, NULL, 0),
+(@PATH, 12, -537.70276, 4158.3228, 443.49292, NULL, 0),
+(@PATH, 13, -547.4354, 4164.8257, 443.49292, NULL, 0),
+(@PATH, 14, -553.9386, 4174.5586, 443.49292, NULL, 0),
+(@PATH, 15, -556.2222, 4186.039, 443.49292, NULL, 0);
+
+UPDATE `creature` SET `position_x`=-553.9386, `position_y`=4197.5195, `position_z`=443.49292, `orientation`=0, `wander_distance`=0, `MovementType`=2 WHERE `guid`=@MOVERGUID;
+DELETE FROM `creature_addon` WHERE `guid`=@MOVERGUID;
+INSERT INTO `creature_addon` (`guid`, `PathId`, `SheathState`) VALUES
+(@MOVERGUID, @PATH, 1);
+
+SET @MOVERGUID := @CGUID+18;
+SET @ENTRY := 196986;
+SET @PATHOFFSET := 0;
+SET @PATH := @ENTRY * 100 + @PATHOFFSET;
+DELETE FROM `waypoint_path` WHERE `PathId`= @PATH;
+INSERT INTO `waypoint_path` (`PathId`, `MoveType`, `Flags`, `Velocity`, `Comment`) VALUES
+(@PATH, 0, 0x2, 2.6714, 'Nokhud Vulture - Idle');
+
+DELETE FROM `waypoint_path_node` WHERE `PathId`= @PATH;
+INSERT INTO `waypoint_path_node` (`PathId`, `NodeId`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `Delay`) VALUES
+(@PATH, 0, -534.3119, 4149.88, 443.49292, NULL, 0),
+(@PATH, 1, -527.8087, 4159.613, 443.49292, NULL, 0),
+(@PATH, 2, -518.07605, 4166.1157, 443.49292, NULL, 0),
+(@PATH, 3, -506.59552, 4168.3994, 443.49292, NULL, 0),
+(@PATH, 4, -495.11502, 4166.1157, 443.49292, NULL, 0),
+(@PATH, 5, -485.38232, 4159.613, 443.49292, NULL, 0),
+(@PATH, 6, -478.87915, 4149.88, 443.49292, NULL, 0),
+(@PATH, 7, -476.59552, 4138.3994, 443.49292, NULL, 0),
+(@PATH, 8, -478.87915, 4126.919, 443.49292, NULL, 0),
+(@PATH, 9, -485.38232, 4117.186, 443.49292, NULL, 0),
+(@PATH, 10, -495.11502, 4110.683, 443.49292, NULL, 0),
+(@PATH, 11, -506.59552, 4108.3994, 443.49292, NULL, 0),
+(@PATH, 12, -518.07605, 4110.683, 443.49292, NULL, 0),
+(@PATH, 13, -527.8087, 4117.186, 443.49292, NULL, 0),
+(@PATH, 14, -534.3119, 4126.919, 443.49292, NULL, 0),
+(@PATH, 15, -536.5955, 4138.3994, 443.49292, NULL, 0);
+
+UPDATE `creature` SET `position_x`=-534.3119, `position_y`=4149.88, `position_z`=443.49292, `orientation`=0, `wander_distance`=0, `MovementType`=2 WHERE `guid`=@MOVERGUID;
+DELETE FROM `creature_addon` WHERE `guid`=@MOVERGUID;
+INSERT INTO `creature_addon` (`guid`, `PathId`, `SheathState`) VALUES
+(@MOVERGUID, @PATH, 1);
diff --git a/sql/updates/world/master/2025_10_18_01_world.sql b/sql/updates/world/master/2025_10_18_01_world.sql
new file mode 100644
index 00000000000..f733152ec18
--- /dev/null
+++ b/sql/updates/world/master/2025_10_18_01_world.sql
@@ -0,0 +1,116 @@
+SET @CGUID := 8000869;
+SET @OGUID := 8000133;
+SET @WORLD_SAFE_LOC_ID := 100105;
+SET @SPAWN_GROUP := 1275;
+
+SET @AT_WIDTH := 25;
+SET @AT_LENGTH := 30;
+SET @AT_HEIGHT := 15;
+SET @AT_ID := 175;
+SET @AT_PROP_ID := 168;
+SET @AT_SPAWN_ID = 272;
+
+DELETE FROM `areatrigger_template` WHERE `Id` = @AT_ID AND `IsCustom` = 1;
+INSERT INTO `areatrigger_template` (`Id`, `IsCustom`) VALUES
+(@AT_ID, 1);
+
+DELETE FROM `areatrigger_create_properties` WHERE `Id` = @AT_PROP_ID AND `IsCustom` = 1;
+INSERT INTO `areatrigger_create_properties` (`Id`, `IsCustom`, `AreaTriggerId`, `IsAreatriggerCustom`, `Shape`, `ShapeData0`, `ShapeData1`, `ShapeData2`, `ShapeData3`, `ShapeData4`, `ShapeData5`, `ShapeData6`, `ShapeData7`) VALUES
+(@AT_PROP_ID, 1, @AT_ID, 1, 1, @AT_LENGTH, @AT_WIDTH, @AT_HEIGHT, @AT_LENGTH, @AT_WIDTH, @AT_HEIGHT, 0, 0);
+
+DELETE FROM `areatrigger_template_actions` WHERE `AreaTriggerId` = @AT_ID AND `IsCustom` = 1;
+INSERT INTO `areatrigger_template_actions` (`AreaTriggerId`, `IsCustom`, `ActionType`, `ActionParam`, `TargetType`) VALUES
+(@AT_ID, 1, 0, 228212, 0); -- Arena Starting Area Marker
+
+DELETE FROM `areatrigger` WHERE `SpawnId` BETWEEN @AT_SPAWN_ID+0 AND @AT_SPAWN_ID+1;
+INSERT INTO `areatrigger` (`SpawnId`, `AreaTriggerCreatePropertiesId`, `IsCustom`, `MapId`, `PosX`, `PosY`, `PosZ`, `Orientation`, `Comment`) VALUES
+(@AT_SPAWN_ID+0, @AT_PROP_ID, 1, 2547, 367, 265.875, 97.10447, 3.1415927, 'Enigma Crucible - Entrance Purple'), -- 370 265 95
+(@AT_SPAWN_ID+1, @AT_PROP_ID, 1, 2547, 160, 268.20486, 100.78489, 0, 'Enigma Crucible - Entrance Gold'); -- 155 268 97 +1
+
+DELETE FROM `world_safe_locs` WHERE `ID` BETWEEN @WORLD_SAFE_LOC_ID + 0 AND @WORLD_SAFE_LOC_ID + 1;
+INSERT INTO `world_safe_locs` (`ID`, `MapID`, `LocX`, `LocY`, `LocZ`, `Facing`, `Comment`) VALUES
+(@WORLD_SAFE_LOC_ID+0, 2547, 358.15277, 265.875, 95.10447, DEGREES(3.1415927), 'Enigma Crucible - Purple Team'),
+(@WORLD_SAFE_LOC_ID+1, 2547, 167.88716, 268.20486, 97.78489, DEGREES(0), 'Enigma Crucible - Gold Team');
+
+DELETE FROM `battleground_scripts` WHERE `MapId` = 2547 AND `BattlemasterListId` = 0;
+INSERT INTO `battleground_scripts` (`MapId`, `BattlemasterListId`, `ScriptName`) VALUES
+(2547, 0, 'arena_enigma_crucible');
+
+DELETE FROM `battleground_template` WHERE `ID` = 1076;
+INSERT INTO `battleground_template` (`ID`, `AllianceStartLoc`, `HordeStartLoc`, `StartMaxDist`, `Weight`, `Comment`) VALUES
+(1076, @WORLD_SAFE_LOC_ID+0, @WORLD_SAFE_LOC_ID+1, 0, 1, 'Enigma Crucible');
+
+DELETE FROM `gameobject_template_addon` WHERE `entry` IN (376125 /*Enigma Arena - Door*/, 376877 /*ProgenitorArena_Button01*/, 376876 /*Enigma Arena Door 01*/, 376866 /*ProgenitorArena_Button_Trim*/, 376861 /*Enigma Arena Door 02*/);
+INSERT INTO `gameobject_template_addon` (`entry`, `faction`, `flags`, `WorldEffectID`, `AIAnimKitID`) VALUES
+(376125, 114, 0x0, 0, 0), -- Enigma Arena - Door
+(376877, 0, 0x10000000, 0, 0), -- ProgenitorArena_Button01
+(376876, 0, 0x20, 0, 0), -- Enigma Arena Door 01
+(376866, 0, 0x10000000, 0, 0), -- ProgenitorArena_Button_Trim
+(376861, 0, 0x20, 0, 0); -- Enigma Arena Door 02
+
+DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+0;
+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`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `VerifiedBuild`) VALUES
+(@CGUID+0, 188479, 2547, 14083, 14083, '0', '0', 0, 0, 0, 218.295135498046875, 373.328125, 115.2203521728515625, 5.345910549163818359, 7200, 0, 0, 0, NULL, NULL, NULL, NULL, 63305); -- Zo'sorg (Area: Enigma Crucible - Difficulty: 0) CreateObject1 (Auras: )
+
+DELETE FROM `creature_addon` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+0;
+
+DELETE FROM `creature_template_addon` WHERE `entry` IN (188479 /*188479 (Zo'sorg)*/);
+INSERT INTO `creature_template_addon` (`entry`, `PathId`, `mount`, `StandState`, `AnimTier`, `VisFlags`, `SheathState`, `PvpFlags`, `emote`, `aiAnimKit`, `movementAnimKit`, `meleeAnimKit`, `visibilityDistanceType`, `auras`) VALUES
+(188479, 0, 0, 0, 3, 0, 1, 0, 0, 12224, 0, 0, 0, ''); -- 188479 (Zo'sorg)
+
+DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+7;
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `PhaseId`, `PhaseGroup`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`) VALUES
+(@OGUID+0, 376861, 2547, 14083, 14083, '0', '0', 0, 336.84027099609375, 266.173614501953125, 90.4921875, 0, 0, 0, 0, 1, 7200, 255, 1, 63305), -- Enigma Arena Door 02 (Area: Enigma Crucible - Difficulty: 0) CreateObject1
+(@OGUID+1, 376866, 2547, 14083, 14083, '0', '0', 0, 266.302093505859375, 266.734375, 89.8592529296875, 0, 0, 0, 0, 1, 7200, 255, 1, 63305), -- ProgenitorArena_Button_Trim (Area: Enigma Crucible - Difficulty: 0) CreateObject1
+(@OGUID+2, 376876, 2547, 14083, 14083, '0', '0', 0, 188.095489501953125, 266.3663330078125, 92.7468109130859375, 0, 0, 0, 0, 1, 7200, 255, 1, 63305), -- Enigma Arena Door 01 (Area: Enigma Crucible - Difficulty: 0) CreateObject1
+(@OGUID+3, 376877, 2547, 14083, 14083, '0', '0', 0, 266.302093505859375, 266.734375, 89.80551910400390625, 0, 0, 0, 0, 1, 7200, 255, 0, 63305), -- ProgenitorArena_Button01 (Area: Enigma Crucible - Difficulty: 0) CreateObject1
+(@OGUID+4, 376125, 2547, 14083, 14083, '0', '0', 0, 336.744781494140625, 265.102447509765625, 90.0426025390625, 0, 0, 0, 0, 1, 7200, 255, 1, 63305), -- Enigma Arena - Door (Area: Enigma Crucible - Difficulty: 0) CreateObject2
+(@OGUID+5, 376125, 2547, 14083, 14083, '0', '0', 0, 185.748260498046875, 268.041656494140625, 93.93752288818359375, 0, 0, 0, 0, 1, 7200, 255, 1, 63305), -- Enigma Arena - Door (Area: Enigma Crucible - Difficulty: 0) CreateObject1
+(@OGUID+6, 184663, 2547, 14083, 14083, '0', '0', 0, 265.744781494140625, 199.90625, 89.2678985595703125, 0, 0, 0, 0, 1, 360, 255, 1, 63305), -- Shadow Sight (Area: Enigma Crucible - Difficulty: 0) CreateObject2
+(@OGUID+7, 184663, 2547, 14083, 14083, '0', '0', 0, 265.467010498046875, 334.057281494140625, 89.2678985595703125, 0, 0, 0, 0, 1, 360, 255, 1, 63305); -- Shadow Sight (Area: Enigma Crucible - Difficulty: 0) CreateObject2
+
+DELETE FROM `gameobject_addon` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+7;
+
+DELETE FROM `creature_template_addon` WHERE `entry` IN (185800 /*185800 (Past Self)*/, 188479 /*188479 (Zo'sorg)*/);
+INSERT INTO `creature_template_addon` (`entry`, `PathId`, `mount`, `StandState`, `AnimTier`, `VisFlags`, `SheathState`, `PvpFlags`, `emote`, `aiAnimKit`, `movementAnimKit`, `meleeAnimKit`, `visibilityDistanceType`, `auras`) VALUES
+(185800, 0, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, ''), -- 185800 (Past Self)
+(188479, 0, 0, 0, 3, 0, 1, 0, 0, 12224, 0, 0, 0, ''); -- 188479 (Zo'sorg)
+
+UPDATE `creature_template_difficulty` SET `ContentTuningID`=807, `StaticFlags1`=0x20000000, `VerifiedBuild`=63305 WHERE (`Entry`=188479 AND `DifficultyID`=0); -- 188479 (Zo'sorg) - Floating
+UPDATE `creature_template` SET `faction`=35, `BaseAttackTime`=2000, `unit_flags`=0x2000000, `unit_flags2`=0x800 WHERE `entry`=188479; -- Zo'sorg
+
+DELETE FROM `creature_text` WHERE `CreatureID` IN (188479);
+INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
+(188479, 0, 0, 'Mortals, I present a lucrative opportunity for those who prove themselves worthy of the task.', 12, 0, 100, 1, 0, 188957, 214980, 3, 'Zo\'sorg'),
+(188479, 1, 0, 'Many in the cartel are wagering on who are the greater combatants. Care to influence the outcome?', 12, 0, 100, 0, 0, 188958, 214991, 3, 'Zo\'sorg'),
+(188479, 2, 0, 'Do not let the cartel down, we expect a return on our investment.', 12, 0, 100, 0, 0, 188954, 214995, 3, 'Zo\'sorg'),
+(188479, 3, 0, 'Victory is clear, our bargain is upheld.', 12, 0, 100, 0, 0, 188955, 214998, 3, 'Zo\'sorg to Player'),
+(188479, 3, 1, 'No matter who wins, we profit.', 12, 0, 100, 0, 0, 188956, 215067, 3, 'Zo\'sorg to Player');
+
+DELETE FROM `spawn_group_template` WHERE `groupId` BETWEEN @SPAWN_GROUP+0 AND @SPAWN_GROUP+1;
+INSERT INTO `spawn_group_template` (`groupId`, `groupName`, `groupFlags`) VALUES
+(@SPAWN_GROUP+0, 'Enigma Crucible - Shadow sight', 0x20),
+(@SPAWN_GROUP+1, 'Enigma Crucible - Collision Walls', 0x20);
+
+DELETE FROM `spawn_group` WHERE `groupId` BETWEEN @SPAWN_GROUP+0 AND @SPAWN_GROUP+1;
+INSERT INTO `spawn_group` (`groupId`, `spawnType`, `spawnId`) VALUES
+(@SPAWN_GROUP, 1, @OGUID+6),
+(@SPAWN_GROUP, 1, @OGUID+7),
+(@SPAWN_GROUP+1, 1, @OGUID+4),
+(@SPAWN_GROUP+1, 1, @OGUID+5);
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 33 AND `SourceEntry` BETWEEN @SPAWN_GROUP+0 AND @SPAWN_GROUP+1;;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceEntry`, `SourceGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ScriptName`) VALUES
+(33, @SPAWN_GROUP, 0, 0, 0, 'condition_is_shadow_sight_enabled'),
+(33, @SPAWN_GROUP+1, 0, 0, 0, 'condition_enigma_arena_collision_doors');
+
+DELETE FROM `spell_proc` WHERE `SpellId` IN (371601);
+INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES
+(371601,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0,0,0,0); -- Enigma Arena Reaction Trigger
+
+DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_enigma_arena_reaction_trigger', 'spell_enigma_arena_reaction_trigger_low_health', 'spell_enigma_arena_warning_countdown', 'spell_enigma_arena_warning_teleport');
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(371602, 'spell_enigma_arena_reaction_trigger_low_health'),
+(371601, 'spell_enigma_arena_reaction_trigger'),
+(370437, 'spell_enigma_arena_warning_countdown'),
+(371319, 'spell_enigma_arena_warning_teleport');
diff --git a/sql/updates/world/master/2025_10_18_02_world.sql b/sql/updates/world/master/2025_10_18_02_world.sql
new file mode 100644
index 00000000000..19f859433f9
--- /dev/null
+++ b/sql/updates/world/master/2025_10_18_02_world.sql
@@ -0,0 +1,91 @@
+SET @ATSPAWN := 274;
+SET @ATPROP := 169;
+SET @ATID := 176;
+
+-- Template
+UPDATE `creature_template` SET `ScriptName` = 'npc_fel_lord_caza_cryptic_hollow' WHERE `entry` = 96441;
+UPDATE `creature_template` SET `faction`=14, `BaseAttackTime`=2000, `unit_flags`=0x2000000, `unit_flags2`=0x4000800, `unit_flags3`=0x41080001, `AIName`='SmartAI' WHERE `entry`=100062; -- Fel Axe
+
+-- Template Addon
+DELETE FROM `creature_template_addon` WHERE `entry` IN (100062, 96441);
+INSERT INTO `creature_template_addon` (`entry`, `PathId`, `mount`, `StandState`, `AnimTier`, `VisFlags`, `SheathState`, `PvpFlags`, `emote`, `aiAnimKit`, `movementAnimKit`, `meleeAnimKit`, `visibilityDistanceType`, `auras`) VALUES
+(100062, 0, 0, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, ''), -- 100062 (Fel Axe)
+(96441, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 3, '196769'); -- 96441 (Fel Lord Caza) - Armed
+
+-- AreaTrigger
+DELETE FROM `areatrigger_template` WHERE (`Id`=10037 AND `IsCustom`=0);
+INSERT INTO `areatrigger_template` (`Id`, `IsCustom`, `Flags`, `VerifiedBuild`) VALUES
+(10037, 0, 0, 57212);
+
+DELETE FROM `areatrigger_template` WHERE `Id` BETWEEN @ATID+0 AND @ATID+2 AND `IsCustom`=1;
+INSERT INTO `areatrigger_template` (`Id`, `IsCustom`, `Flags`, `VerifiedBuild`) VALUES
+(@ATID+0, 1, 1, 0),
+(@ATID+1, 1, 1, 0),
+(@ATID+2, 1, 1, 0);
+
+DELETE FROM `areatrigger_create_properties` WHERE (`IsCustom`=0 AND `Id` IN (5315, 5298, 5295));
+DELETE FROM `areatrigger_create_properties` WHERE (`IsCustom`=1 AND `Id`=@ATPROP);
+INSERT INTO `areatrigger_create_properties` (`Id`, `IsCustom`, `AreaTriggerId`, `IsAreatriggerCustom`, `Flags`, `MoveCurveId`, `ScaleCurveId`, `MorphCurveId`, `FacingCurveId`, `AnimId`, `AnimKitId`, `DecalPropertiesId`, `SpellForVisuals`, `TimeToTargetScale`, `Speed`, `Shape`, `ShapeData0`, `ShapeData1`, `ShapeData2`, `ShapeData3`, `ShapeData4`, `ShapeData5`, `ShapeData6`, `ShapeData7`, `ScriptName`, `VerifiedBuild`) VALUES
+(5315, 0, 10037, 0, 4, 0, 0, 0, 0, -1, 0, 0, 197180, 6000, 1, 0, 15, 15, 0, 0, 0, 0, 0, 0, 'at_fel_lord_caza_fel_infusion', 57212), -- Spell: 197180 (Fel Infusion)
+(5298, 0, @ATID+0, 1, 4, 0, 0, 0, 0, -1, 0, 0, 197180, 10000, 1, 0, 5, 5, 0, 0, 0, 0, 0, 0, 'at_fel_lord_caza_fel_infusion', 57212), -- Spell: 196988 (Violent Fel Energy)
+(5295, 0, @ATID+1, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 40, 0, 5, 5, 0, 0, 0, 0, 0, 0, 'at_fel_lord_caza_throw_axe_knockback', 57212),
+(@ATPROP, 1, @ATID+2, 1, 0, 0, 0, 0, 0, -1, 0, 0, NULL, 0, 0, 1, 8, 20, 1, 8, 20, 1, 0, 0, 'at_fel_lord_caza_intro', 0);
+
+-- Serverside Areatrigger
+DELETE FROM `areatrigger` WHERE `SpawnId`=@ATSPAWN;
+INSERT INTO `areatrigger` (`SpawnId`, `AreaTriggerCreatePropertiesId`, `IsCustom`, `MapId`, `SpawnDifficulties`, `PosX`, `PosY`, `PosZ`, `Orientation`, `PhaseUseFlags`, `PhaseId`, `PhaseGroup`, `ScriptName`, `Comment`, `VerifiedBuild`) VALUES
+(@ATSPAWN, @ATPROP, 1, 1481, 0, 1091.278809, 1637.828247, 115.609467, 5.082482, 0, 5077, 0, '', 'Cryptic Hollow - Fel Lord Caza', 0);
+
+-- ScriptName
+DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_fel_lord_caza_throwing_axe_selector', 'spell_fel_lord_caza_dies_02', 'spell_fel_lord_caza_disarmed');
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(196889, 'spell_fel_lord_caza_throwing_axe_selector'),
+(210103, 'spell_fel_lord_caza_dies_02'),
+(196892, 'spell_fel_lord_caza_disarmed');
+
+-- Creature Text
+DELETE FROM `creature_text` WHERE `CreatureID` = 96441;
+INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
+(96441, 0, 0, 'Damn your spectral sight!', 14, 0, 100, 0, 0, 55172, 98023, 0, 'Fel Lord Caza to Player'),
+(96441, 1, 0, 'My axe never misses its mark.', 14, 0, 100, 0, 0, 55174, 103483, 0, 'Fel Lord Caza to Axe Throw Stalker'),
+(96441, 2, 0, 'I would have sundered your forces...', 12, 0, 100, 0, 0, 55173, 98274, 0, 'Fel Lord Caza to Player');
+
+-- Difficulty
+UPDATE `creature_template_difficulty` SET `ContentTuningID`=773, `StaticFlags1`=0x20000100, `StaticFlags3`=0x2000000, `VerifiedBuild`=57212 WHERE (`Entry`=100062 AND `DifficultyID`=0); -- 100062 (Fel Axe) - Sessile, Floating - CannotTurn
+UPDATE `creature_template_difficulty` SET `VerifiedBuild`=57212 WHERE (`DifficultyID`=0 AND `Entry` IN (97597,94655,101790,97601,96441,100061,97598));
+
+-- SAI
+DELETE FROM `smart_scripts` WHERE `entryorguid`= 100062 AND `source_type`=0;
+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`, `event_param5`, `event_param_string`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `action_param_string`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_param_string`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(100062, 0, 0, 1, '', 63, 0, 100, 0, 0, 0, 0, 0, 0, '', 8, 0, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Fel Axe - On Just Summoned - Set Passive'),
+(100062, 0, 1, 2, '', 61, 0, 100, 0, 0, 0, 0, 0, 0, '', 85, 196988, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Fel Axe - On Just Summoned - Cast \'Violent Fel Energy\''),
+(100062, 0, 2, 0, '', 61, 0, 100, 0, 0, 0, 0, 0, 0, '', 85, 196984, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Fel Axe - On Just Summoned - Cast \'Fel Axe\'');
+
+-- Spells
+DELETE FROM `spell_target_position` WHERE `ID` = 196875;
+INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `OrderIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `VerifiedBuild`) VALUES
+(196875, 0, 0, 1481, 1087.2742919921875, 1626.1614990234375, 116.7649612426757812, 60822), -- Spell: 196875 (Throw Axe) Effect 0: 42 (SPELL_EFFECT_JUMP_DEST)
+(196875, 0, 1, 1481, 1119.779541015625, 1612.4444580078125, 116.5227890014648437, 60822), -- Spell: 196875 (Throw Axe) Effect 0: 42 (SPELL_EFFECT_JUMP_DEST)
+(196875, 0, 2, 1481, 1097.99658203125, 1598.2569580078125, 116.8708877563476562, 60822), -- Spell: 196875 (Throw Axe) Effect 0: 42 (SPELL_EFFECT_JUMP_DEST)
+(196875, 0, 3, 1481, 1089.2239990234375, 1609.329833984375, 116.8122177124023437, 60822); -- Spell: 196875 (Throw Axe) Effect 0: 42 (SPELL_EFFECT_JUMP_DEST)
+
+-- Conditions
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (196889, 210107);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 196889, 0, 0, 51, 0, 5, 100061, 0, '', 0, 0, 0, '', 'Spell \'Throw Axe\' can only hit \'Axe Throw Stalker\''),
+(13, 1, 210107, 0, 0, 51, 0, 5, 96441, 0, '', 0, 0, 0, '', 'Spell \'Hidden No More: Taking Power 02\' can only hit \'Fel Lord Caza\'');
+
+-- Serverside spells
+DELETE FROM `serverside_spell` WHERE `Id` IN (197471, 210103, 210104, 210109) AND `DifficultyID`=0;
+INSERT INTO `serverside_spell` (`Id`, `DifficultyID`, `CategoryId`, `Dispel`, `Mechanic`, `Attributes`, `AttributesEx`, `AttributesEx2`, `AttributesEx3`, `AttributesEx4`, `AttributesEx5`, `AttributesEx6`, `AttributesEx7`, `AttributesEx8`, `AttributesEx9`, `AttributesEx10`, `AttributesEx11`, `AttributesEx12`, `AttributesEx13`, `AttributesEx14`, `AttributesEx15`, `Stances`, `StancesNot`, `Targets`, `TargetCreatureType`, `RequiresSpellFocus`, `FacingCasterFlags`, `CasterAuraState`, `TargetAuraState`, `ExcludeCasterAuraState`, `ExcludeTargetAuraState`, `CasterAuraSpell`, `TargetAuraSpell`, `ExcludeCasterAuraSpell`, `ExcludeTargetAuraSpell`, `CasterAuraType`, `TargetAuraType`, `ExcludeCasterAuraType`, `ExcludeTargetAuraType`, `CastingTimeIndex`, `RecoveryTime`, `CategoryRecoveryTime`, `StartRecoveryCategory`, `StartRecoveryTime`, `InterruptFlags`, `AuraInterruptFlags1`, `AuraInterruptFlags2`, `ChannelInterruptFlags1`, `ChannelInterruptFlags2`, `ProcFlags`, `ProcFlags2`, `ProcChance`, `ProcCharges`, `ProcCooldown`, `ProcBasePPM`, `MaxLevel`, `BaseLevel`, `SpellLevel`, `DurationIndex`, `RangeIndex`, `Speed`, `LaunchDelay`, `StackAmount`, `EquippedItemClass`, `EquippedItemSubClassMask`, `EquippedItemInventoryTypeMask`, `ContentTuningId`, `SpellName`, `ConeAngle`, `ConeWidth`, `MaxTargetLevel`, `MaxAffectedTargets`, `SpellFamilyName`, `SpellFamilyFlags1`, `SpellFamilyFlags2`, `SpellFamilyFlags3`, `SpellFamilyFlags4`, `DmgClass`, `PreventionType`, `AreaGroupId`, `SchoolMask`, `ChargeCategoryId`) VALUES
+(197471, 0, 0, 0, 0, 0x29800180, 0x00000420, 0x10484005, 0x10130200, 0x00800080, 0x000E0008, 0x00001200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, -1, 0, 0, 0, 'Hidden No More: Area Trigger Dummy to Fel Lord Caza', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
+(210103, 0, 0, 0, 0, 0x29800180, 0x00000420, 0x10484005, 0x10130200, 0x00800080, 0x00060008, 0x00001200, 0, 0, 0x00100000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0, 'Hidden No More: Fel Lord Caza Dies 02', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
+(210104, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000080, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0, 'Hidden No More: Kill Credit', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
+(210109, 0, 0, 0, 0, 0x29800180, 0x00000420, 0x10484005, 0x10130200, 0x00800080, 0x00060008, 0x00001200, 0, 0, 0x00100000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0, 'Hidden No More: Taking Power 03', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+
+DELETE FROM `serverside_spell_effect` WHERE `SpellID` IN (197471, 210103, 210104, 210109) AND `EffectIndex`=0 AND `DifficultyID`=0;
+INSERT INTO `serverside_spell_effect` (`SpellID`, `EffectIndex`, `DifficultyID`, `Effect`, `EffectAura`, `EffectAmplitude`, `EffectAttributes`, `EffectAuraPeriod`, `EffectBonusCoefficient`, `EffectChainAmplitude`, `EffectChainTargets`, `EffectItemType`, `EffectMechanic`, `EffectPointsPerResource`, `EffectPosFacing`, `EffectRealPointsPerLevel`, `EffectTriggerSpell`, `BonusCoefficientFromAP`, `PvpMultiplier`, `Coefficient`, `Variance`, `ResourceCoefficient`, `GroupSizeBasePointsCoefficient`, `EffectBasePoints`, `EffectMiscValue1`, `EffectMiscValue2`, `EffectRadiusIndex1`, `EffectRadiusIndex2`, `EffectSpellClassMask1`, `EffectSpellClassMask2`, `EffectSpellClassMask3`, `EffectSpellClassMask4`, `ImplicitTarget1`, `ImplicitTarget2`) VALUES
+(197471, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0),
+(210103, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0),
+(210104, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106014, 0, 0, 0, 0, 0, 0, 0, 1, 0),
+(210109, 0, 0, 6, 23, 0, 0, 3000, 0, 1, 0, 0, 0, 0, 0, 0, 210104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0);
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index 09e3f4eca11..e1c8af38d0c 100644
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -1343,15 +1343,12 @@ void ScriptMgr::Initialize()
// Remove the used scripts from the given container.
sScriptRegistryCompositum->RemoveUsedScriptsFromContainer(unusedScriptNames);
- for (std::string const& scriptName : unusedScriptNames)
- {
- // Avoid complaining about empty script names since the
- // script name container contains a placeholder as the 0 element.
- if (scriptName.empty())
- continue;
+ // Avoid complaining about empty script names since the
+ // script name container contains a placeholder as the 0 element.
+ unusedScriptNames.erase("");
+ for (std::string const& scriptName : unusedScriptNames)
TC_LOG_ERROR("sql.sql", "Script '{}' is referenced by the database, but does not exist in the core!", scriptName);
- }
TC_LOG_INFO("server.loading", ">> Loaded {} C++ scripts in {} ms",
GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
@@ -2595,7 +2592,7 @@ BattlegroundMapScript::BattlegroundMapScript(char const* name, uint32 mapId) noe
if (!GetEntry())
TC_LOG_ERROR("scripts", "Invalid BattlegroundMapScript for {}; no such map ID.", mapId);
- if (GetEntry() && !GetEntry()->IsBattleground())
+ if (GetEntry() && !GetEntry()->IsBattlegroundOrArena())
TC_LOG_ERROR("scripts", "BattlegroundMapScript for map {} is invalid.", mapId);
ScriptRegistry<BattlegroundMapScript>::Instance()->AddScript(this);
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 986c8376a00..c4260860fb3 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2948,7 +2948,10 @@ void Spell::TargetInfo::DoDamageAndTriggers(Spell* spell)
if (MissCondition == SPELL_MISS_RESIST && spell->m_spellInfo->HasAttribute(SPELL_ATTR1_FAILURE_BREAKS_STEALTH) && spell->unitTarget->GetTypeId() == TYPEID_UNIT)
{
Unit* unitCaster = ASSERT_NOTNULL(spell->m_caster->ToUnit());
- unitCaster->RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags::Interacting);
+ unitCaster->RemoveAppliedAuras([](AuraApplication const* aurApp)
+ {
+ return aurApp->GetBase()->GetSpellInfo()->Dispel == DISPEL_STEALTH;
+ });
spell->unitTarget->ToCreature()->EngageWithTarget(unitCaster);
}
}
diff --git a/src/server/scripts/Battlegrounds/EnigmaCrucible/arena_enigma_crucible.cpp b/src/server/scripts/Battlegrounds/EnigmaCrucible/arena_enigma_crucible.cpp
new file mode 100644
index 00000000000..f8765e39769
--- /dev/null
+++ b/src/server/scripts/Battlegrounds/EnigmaCrucible/arena_enigma_crucible.cpp
@@ -0,0 +1,363 @@
+/*
+ * 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 "Battleground.h"
+#include "BattlegroundScript.h"
+#include "ConditionMgr.h"
+#include "Containers.h"
+#include "Conversation.h"
+#include "Creature.h"
+#include "CreatureAI.h"
+#include "GameObject.h"
+#include "Map.h"
+#include "Player.h"
+#include "ScriptedCreature.h"
+#include "ScriptMgr.h"
+#include "SpellScript.h"
+
+namespace EnigmaCrucible
+{
+ namespace Actions
+ {
+ static constexpr uint32 ReactionTrigger = 1;
+ static constexpr uint32 ReactionDead = 2;
+ }
+
+ namespace Creatures
+ {
+ static constexpr uint32 ZoSorg = 188479;
+ }
+
+ namespace GameObjects
+ {
+ static constexpr uint32 Door01 = 376876;
+ static constexpr uint32 Door02 = 376861;
+ }
+
+ namespace MapIds
+ {
+ static constexpr uint32 EnigmaCrucible = 2547;
+ }
+
+ namespace Positions
+ {
+ static constexpr Position PurpleWarningTeleport = { 327.70486f, 278.69965f, 90.0686f, 3.1415927f };
+ static constexpr Position GoldWarningTeleport = { 201.601f, 268.516f, 90.0686f, 0.0f };
+ }
+
+ namespace Spells
+ {
+ static constexpr uint32 ArenaLowHealthCooldownAura = 234031;
+ static constexpr uint32 EnigmaArenaVOCooldownAura = 371330;
+ static constexpr uint32 EnigmaArenaReactionTrigger = 371601;
+ static constexpr uint32 Warning = 370437;
+ static constexpr uint32 WarningTeleport = 371319;
+ static constexpr uint32 ArenaStartingAreaMarker = 228212;
+ }
+
+ namespace Texts
+ {
+ namespace ZoSorg
+ {
+ static constexpr uint8 Prepare = 0;
+ static constexpr uint8 Prepare2 = 1;
+ static constexpr uint8 Start = 2;
+ static constexpr uint8 ReactionTrigger = 3;
+ }
+ }
+}
+
+struct arena_enigma_crucible : ArenaScript
+{
+ explicit arena_enigma_crucible(BattlegroundMap* map) : ArenaScript(map) { }
+
+ void OnUpdate(uint32 diff) override
+ {
+ _scheduler.Update(diff);
+ }
+
+ void OnStart() override
+ {
+ for (ObjectGuid const& guid : _doorGUIDs)
+ {
+ if (GameObject* door = battlegroundMap->GetGameObject(guid))
+ {
+ door->UseDoorOrButton();
+ door->DespawnOrUnsummon(5s);
+ }
+ }
+
+ if (Creature const* creature = battlegroundMap->GetCreature(_zoSorgGUID))
+ creature->AI()->Talk(EnigmaCrucible::Texts::ZoSorg::Start);
+
+ _scheduler.Schedule(10s, [&](TaskContext context)
+ {
+ battlegroundMap->DoOnPlayers([&](Player* player)
+ {
+ if (!player->HasAura(EnigmaCrucible::Spells::ArenaStartingAreaMarker))
+ return;
+
+ if (player->HasAura(EnigmaCrucible::Spells::Warning))
+ return;
+
+ player->CastSpell(nullptr, EnigmaCrucible::Spells::Warning, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
+ });
+ });
+
+ context.Repeat();
+ });
+ }
+
+ void DoAction(uint32 actionId, WorldObject* source, WorldObject* target) override
+ {
+ switch (actionId)
+ {
+ case EnigmaCrucible::Actions::ReactionTrigger:
+ HandleReactionLowHealth(Object::ToPlayer(source));
+ break;
+ case EnigmaCrucible::Actions::ReactionDead:
+ HandleKill(Object::ToPlayer(target));
+ break;
+ default:
+ break;
+ }
+ }
+
+ void OnPrepareStage2() override
+ {
+ if (Creature const* creature = battlegroundMap->GetCreature(_zoSorgGUID))
+ creature->AI()->Talk(EnigmaCrucible::Texts::ZoSorg::Prepare);
+
+ _scheduler.Schedule(10s, [&](TaskContext)
+ {
+ if (Creature const* creature = battlegroundMap->GetCreature(_zoSorgGUID))
+ creature->AI()->Talk(EnigmaCrucible::Texts::ZoSorg::Prepare2);
+ });
+ }
+
+ void OnCreatureCreate(Creature* creature) override
+ {
+ switch (creature->GetEntry())
+ {
+ case EnigmaCrucible::Creatures::ZoSorg:
+ _zoSorgGUID = creature->GetGUID();
+ break;
+ default:
+ break;
+ }
+ }
+
+ void OnGameObjectCreate(GameObject* gameobject) override
+ {
+ switch (gameobject->GetEntry())
+ {
+ case EnigmaCrucible::GameObjects::Door01:
+ case EnigmaCrucible::GameObjects::Door02:
+ _doorGUIDs.emplace_back(gameobject->GetGUID());
+ break;
+ default:
+ break;
+ }
+ }
+
+ void OnPlayerJoined(Player* player, bool /*inBattleground*/) override
+ {
+ player->CastSpell(nullptr, EnigmaCrucible::Spells::EnigmaArenaReactionTrigger, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
+ });
+ }
+
+ void HandleKill(Player const* victim) const
+ {
+ if (!victim)
+ return;
+
+ if (Creature* creature = battlegroundMap->GetCreature(_zoSorgGUID))
+ {
+ if (creature->HasAura(EnigmaCrucible::Spells::EnigmaArenaVOCooldownAura))
+ return;
+
+ creature->AI()->Talk(EnigmaCrucible::Texts::ZoSorg::ReactionTrigger, victim);
+
+ creature->CastSpell(nullptr, EnigmaCrucible::Spells::EnigmaArenaVOCooldownAura, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
+ });
+ }
+ }
+
+ void HandleReactionLowHealth(Player const* victim) const
+ {
+ if (!victim)
+ return;
+
+ if (Creature* creature = battlegroundMap->GetCreature(_zoSorgGUID))
+ {
+ if (creature->HasAura(EnigmaCrucible::Spells::EnigmaArenaVOCooldownAura))
+ return;
+
+ creature->AI()->Talk(EnigmaCrucible::Texts::ZoSorg::ReactionTrigger, victim);
+
+ creature->CastSpell(nullptr, EnigmaCrucible::Spells::EnigmaArenaVOCooldownAura, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
+ });
+ }
+ }
+
+private:
+ GuidVector _doorGUIDs;
+ ObjectGuid _zoSorgGUID;
+
+ TaskScheduler _scheduler;
+};
+
+// 371602 - Enigma Arena Reaction Trigger - Low Health
+class spell_enigma_arena_reaction_trigger_low_health : public SpellScript
+{
+ bool Load() override
+ {
+ return GetCaster()->GetMapId() == EnigmaCrucible::MapIds::EnigmaCrucible;
+ }
+
+ void HandleHit(SpellEffIndex /*effIndex*/) const
+ {
+ Unit* target = GetHitUnit();
+ if (target->HasAura(EnigmaCrucible::Spells::ArenaLowHealthCooldownAura))
+ return;
+
+ target->CastSpell(nullptr, EnigmaCrucible::Spells::ArenaLowHealthCooldownAura, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
+ });
+
+ if (ZoneScript* zoneScript = target->FindZoneScript())
+ zoneScript->DoAction(EnigmaCrucible::Actions::ReactionTrigger, GetCaster(), target);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_enigma_arena_reaction_trigger_low_health::HandleHit, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 371601 - Enigma Arena Reaction Trigger
+class spell_enigma_arena_reaction_trigger : public AuraScript
+{
+ bool Load() override
+ {
+ return GetOwner()->GetMapId() == EnigmaCrucible::MapIds::EnigmaCrucible;
+ }
+
+ void HandleProc(ProcEventInfo const& eventInfo) const
+ {
+ if (ZoneScript* zonescript = GetTarget()->FindZoneScript())
+ zonescript->DoAction(EnigmaCrucible::Actions::ReactionDead, eventInfo.GetActor(), eventInfo.GetProcTarget());
+ }
+
+ void Register() override
+ {
+ OnProc += AuraProcFn(spell_enigma_arena_reaction_trigger::HandleProc);
+ }
+};
+
+// 370437 - Warning (countdown)
+class spell_enigma_arena_warning_countdown : public AuraScript
+{
+ bool Load() override
+ {
+ return GetOwner()->GetMapId() == EnigmaCrucible::MapIds::EnigmaCrucible;
+ }
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ EnigmaCrucible::Spells::WarningTeleport });
+ }
+
+ void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
+ {
+ Player* target = GetTarget()->ToPlayer();
+ if (!target)
+ return;
+
+ if (!target->HasAura(EnigmaCrucible::Spells::ArenaStartingAreaMarker))
+ return;
+
+ target->CastSpell(nullptr, EnigmaCrucible::Spells::WarningTeleport, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
+ });
+ }
+
+ void Register() override
+ {
+ OnEffectRemove += AuraEffectRemoveFn(spell_enigma_arena_warning_countdown::HandleRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+};
+
+// 371319 - Warning Teleport
+class spell_enigma_arena_warning_teleport : public SpellScript
+{
+ bool Load() override
+ {
+ return GetCaster()->GetMapId() == EnigmaCrucible::MapIds::EnigmaCrucible;
+ }
+
+ void HandleTeleport(SpellEffIndex /*effIndex*/) const
+ {
+ Player* target = GetHitPlayer();
+ if (!target)
+ return;
+
+ if (target->GetBGTeam() == ALLIANCE)
+ target->NearTeleportTo(EnigmaCrucible::Positions::PurpleWarningTeleport);
+ else
+ target->NearTeleportTo(EnigmaCrucible::Positions::GoldWarningTeleport);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_enigma_arena_warning_teleport::HandleTeleport, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+};
+
+class condition_enigma_arena_collision_doors : public ConditionScript
+{
+public:
+ condition_enigma_arena_collision_doors() : ConditionScript("condition_enigma_arena_collision_doors") {}
+
+ bool OnConditionCheck(Condition const* /*condition*/, ConditionSourceInfo& sourceInfo) override
+ {
+ if (!sourceInfo.mConditionMap)
+ return false;
+
+ if (BattlegroundMap const* bgMap = sourceInfo.mConditionMap->ToBattlegroundMap())
+ if (Battleground const* bg = bgMap->GetBG())
+ if (bg->GetStatus() >= STATUS_IN_PROGRESS)
+ return bg->GetInProgressDuration() >= 15s;
+
+ return false;
+ }
+};
+
+void AddSC_arena_enigma_crucible()
+{
+ RegisterBattlegroundMapScript(arena_enigma_crucible, EnigmaCrucible::MapIds::EnigmaCrucible);
+ RegisterSpellScript(spell_enigma_arena_reaction_trigger_low_health);
+ RegisterSpellScript(spell_enigma_arena_reaction_trigger);
+ RegisterSpellScript(spell_enigma_arena_warning_countdown);
+ RegisterSpellScript(spell_enigma_arena_warning_teleport);
+
+ new condition_enigma_arena_collision_doors();
+}
diff --git a/src/server/scripts/Battlegrounds/NokhudonProvingGrounds/arena_nokhudon_proving_grounds.cpp b/src/server/scripts/Battlegrounds/NokhudonProvingGrounds/arena_nokhudon_proving_grounds.cpp
new file mode 100644
index 00000000000..e681304f836
--- /dev/null
+++ b/src/server/scripts/Battlegrounds/NokhudonProvingGrounds/arena_nokhudon_proving_grounds.cpp
@@ -0,0 +1,303 @@
+/*
+ * 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 "Battleground.h"
+#include "BattlegroundScript.h"
+#include "Containers.h"
+#include "Conversation.h"
+#include "Creature.h"
+#include "CreatureAI.h"
+#include "GameObject.h"
+#include "Map.h"
+#include "Player.h"
+#include "ScriptedCreature.h"
+#include "ScriptMgr.h"
+#include "SpellScript.h"
+
+namespace NokhudonProvingGrounds
+{
+ namespace Actions
+ {
+ static constexpr uint32 ReactionTrigger = 1;
+ static constexpr uint32 ReactionDead = 2;
+ }
+
+ namespace Creatures
+ {
+ static constexpr uint32 Malicia = 196670;
+ static constexpr uint32 NokhudCombatant = 196470;
+ }
+
+ namespace GameObjects
+ {
+ static constexpr uint32 Door01 = 379282;
+ }
+
+ namespace MapIds
+ {
+ static constexpr uint32 NokhudonProvingGrounds = 2563;
+ }
+
+ namespace Spells
+ {
+ static constexpr uint32 ArenaLowHealthCooldownAura = 234031;
+ static constexpr uint32 NokhudonProvingGroundsVOCooldownAuraPlayerDeath = 391325;
+ static constexpr uint32 NokhudonProvingGroundsVOCooldownAura = 388904;
+ static constexpr uint32 NokhudonProvingGroundsReactionTrigger = 388970;
+ }
+
+ namespace Texts
+ {
+ namespace Malicia
+ {
+ static constexpr uint8 Prepare = 0;
+ static constexpr uint8 Start = 1;
+ static constexpr uint8 ReactionNonGendered = 2;
+ }
+ }
+
+ namespace Conversations
+ {
+ static constexpr std::array<uint32, 2> ReactionKill = { 20101, 20102 };
+ }
+}
+
+struct arena_nokhudon_proving_grounds : ArenaScript
+{
+ explicit arena_nokhudon_proving_grounds(BattlegroundMap* map) : ArenaScript(map) {}
+
+ void OnStart() override
+ {
+ for (ObjectGuid const& guid : _doorGUIDs)
+ {
+ if (GameObject* door = battlegroundMap->GetGameObject(guid))
+ {
+ door->UseDoorOrButton();
+ door->DespawnOrUnsummon(5s);
+ }
+ }
+
+ if (Creature const* creature = battlegroundMap->GetCreature(_maliciaGUID))
+ creature->AI()->Talk(NokhudonProvingGrounds::Texts::Malicia::Start);
+ }
+
+ void DoAction(uint32 actionId, WorldObject* source, WorldObject* target) override
+ {
+ switch (actionId)
+ {
+ case NokhudonProvingGrounds::Actions::ReactionTrigger:
+ HandleReactionLowHealth(Object::ToPlayer(source));
+ break;
+ case NokhudonProvingGrounds::Actions::ReactionDead:
+ HandleKill(Object::ToPlayer(target));
+ break;
+ default:
+ break;
+ }
+ }
+
+ void OnPrepareStage2() override
+ {
+ if (Creature const* creature = battlegroundMap->GetCreature(_maliciaGUID))
+ creature->AI()->Talk(NokhudonProvingGrounds::Texts::Malicia::Prepare);
+ }
+
+ void OnCreatureCreate(Creature* creature) override
+ {
+ switch (creature->GetEntry())
+ {
+ case NokhudonProvingGrounds::Creatures::Malicia:
+ _maliciaGUID = creature->GetGUID();
+ break;
+ case NokhudonProvingGrounds::Creatures::NokhudCombatant:
+ _nokhudCombatantGUIDs.emplace_back(creature->GetGUID());
+ break;
+ default:
+ break;
+ }
+ }
+
+ void OnGameObjectCreate(GameObject* gameobject) override
+ {
+ switch (gameobject->GetEntry())
+ {
+ case NokhudonProvingGrounds::GameObjects::Door01:
+ _doorGUIDs.emplace_back(gameobject->GetGUID());
+ break;
+ default:
+ break;
+ }
+ }
+
+ void OnPlayerJoined(Player* player, bool /*inBattleground*/) override
+ {
+ player->CastSpell(nullptr, NokhudonProvingGrounds::Spells::NokhudonProvingGroundsReactionTrigger, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
+ });
+ }
+
+ void HandleKill(Player const* victim) const
+ {
+ if (!victim)
+ return;
+
+ if (Creature* creature = battlegroundMap->GetCreature(_maliciaGUID))
+ {
+ if (creature->HasAura(NokhudonProvingGrounds::Spells::NokhudonProvingGroundsVOCooldownAuraPlayerDeath))
+ return;
+
+ uint32 conversationId = Trinity::Containers::SelectRandomContainerElement(NokhudonProvingGrounds::Conversations::ReactionKill);
+ Conversation::CreateConversation(conversationId, creature, creature->GetPosition(), ObjectGuid::Empty);
+
+ creature->CastSpell(nullptr, NokhudonProvingGrounds::Spells::NokhudonProvingGroundsVOCooldownAuraPlayerDeath, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
+ });
+ }
+ }
+
+ void HandleReactionLowHealth(Player const* victim) const
+ {
+ if (!victim)
+ return;
+
+ if (Creature* creature = battlegroundMap->GetCreature(_maliciaGUID))
+ {
+ if (creature->HasAura(NokhudonProvingGrounds::Spells::NokhudonProvingGroundsVOCooldownAura))
+ return;
+
+ creature->AI()->Talk(NokhudonProvingGrounds::Texts::Malicia::ReactionNonGendered, victim);
+
+ creature->CastSpell(nullptr, NokhudonProvingGrounds::Spells::NokhudonProvingGroundsVOCooldownAura, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
+ });
+ }
+
+ for (ObjectGuid const& guid : _nokhudCombatantGUIDs)
+ if (Creature* creature = battlegroundMap->GetCreature(guid))
+ creature->AI()->DoAction(NokhudonProvingGrounds::Actions::ReactionTrigger);
+ }
+
+private:
+ GuidVector _doorGUIDs;
+ GuidVector _nokhudCombatantGUIDs;
+ ObjectGuid _maliciaGUID;
+};
+
+// 196470 - Nokhud Combatant
+struct npc_nokhudon_proving_grounds_nokhud_combatant : ScriptedAI
+{
+ explicit npc_nokhudon_proving_grounds_nokhud_combatant(Creature* creature) : ScriptedAI(creature) { }
+
+ void UpdateAI(uint32 diff) override
+ {
+ _scheduler.Update(diff);
+ }
+
+ void DoAction(int32 param) override
+ {
+ switch (param)
+ {
+ case NokhudonProvingGrounds::Actions::ReactionTrigger:
+ HandleEmoteSequence();
+ break;
+ default:
+ break;
+ }
+ }
+
+ void HandleEmoteSequence()
+ {
+ if (me->GetStandState() != UNIT_STAND_STATE_SIT)
+ return;
+
+ me->HandleEmoteCommand(EMOTE_ONESHOT_JUMPSTART);
+ me->SetStandState(UNIT_STAND_STATE_STAND);
+
+ _scheduler.Schedule(2s, [&](TaskContext context)
+ {
+ me->HandleEmoteCommand(EMOTE_ONESHOT_CHEER);
+ if (context.GetRepeatCounter() < 2)
+ context.Repeat(1s);
+ else
+ {
+ context.Schedule(1s, [&](TaskContext)
+ {
+ me->SetStandState(UNIT_STAND_STATE_SIT);
+ });
+ }
+ });
+ }
+
+private:
+ TaskScheduler _scheduler;
+};
+
+// 388969 - Nokhudon Proving Grounds Reaction Trigger - Low Health
+class spell_nokhudon_proving_grounds_trigger_low_health : public SpellScript
+{
+ bool Load() override
+ {
+ return GetCaster()->GetMapId() == NokhudonProvingGrounds::MapIds::NokhudonProvingGrounds;
+ }
+
+ void HandleHit(SpellEffIndex /*effIndex*/) const
+ {
+ Unit* target = GetHitUnit();
+ if (target->HasAura(NokhudonProvingGrounds::Spells::ArenaLowHealthCooldownAura))
+ return;
+
+ target->CastSpell(nullptr, NokhudonProvingGrounds::Spells::ArenaLowHealthCooldownAura, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
+ });
+
+ if (ZoneScript* zoneScript = target->FindZoneScript())
+ zoneScript->DoAction(NokhudonProvingGrounds::Actions::ReactionTrigger, GetCaster(), target);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_nokhudon_proving_grounds_trigger_low_health::HandleHit, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 388970 - Nokhudon Proving Grounds Reaction Trigger
+class spell_nokhudon_proving_grounds_reaction_trigger : public AuraScript
+{
+ bool Load() override
+ {
+ return GetOwner()->GetMapId() == NokhudonProvingGrounds::MapIds::NokhudonProvingGrounds;
+ }
+
+ void HandleProc(ProcEventInfo const& eventInfo) const
+ {
+ if (ZoneScript* zonescript = GetTarget()->FindZoneScript())
+ zonescript->DoAction(NokhudonProvingGrounds::Actions::ReactionDead, eventInfo.GetActor(), eventInfo.GetProcTarget());
+ }
+
+ void Register() override
+ {
+ OnProc += AuraProcFn(spell_nokhudon_proving_grounds_reaction_trigger::HandleProc);
+ }
+};
+
+void AddSC_arena_nokhudon_proving_grounds()
+{
+ RegisterBattlegroundMapScript(arena_nokhudon_proving_grounds, NokhudonProvingGrounds::MapIds::NokhudonProvingGrounds);
+ RegisterCreatureAI(npc_nokhudon_proving_grounds_nokhud_combatant);
+ RegisterSpellScript(spell_nokhudon_proving_grounds_trigger_low_health);
+ RegisterSpellScript(spell_nokhudon_proving_grounds_reaction_trigger);
+}
diff --git a/src/server/scripts/Battlegrounds/battlegrounds_script_loader.cpp b/src/server/scripts/Battlegrounds/battlegrounds_script_loader.cpp
index c2c3d8b3439..1e84e622ffc 100644
--- a/src/server/scripts/Battlegrounds/battlegrounds_script_loader.cpp
+++ b/src/server/scripts/Battlegrounds/battlegrounds_script_loader.cpp
@@ -69,6 +69,9 @@ void AddSC_arena_mugambala();
void AddSC_arena_the_robodrome();
void AddSC_arena_maldraxxus_coliseum();
+void AddSC_arena_enigma_crucible();
+
+void AddSC_arena_nokhudon_proving_grounds();
void AddSC_arena_cage_of_carnage();
@@ -126,6 +129,9 @@ void AddBattlegroundsScripts()
AddSC_arena_the_robodrome();
AddSC_arena_maldraxxus_coliseum();
+ AddSC_arena_enigma_crucible();
+
+ AddSC_arena_nokhudon_proving_grounds();
AddSC_arena_cage_of_carnage();
}
diff --git a/src/server/scripts/BrokenIsles/zone_mardum.cpp b/src/server/scripts/BrokenIsles/zone_mardum.cpp
index 536d1b02b60..2f0cdd852c5 100644
--- a/src/server/scripts/BrokenIsles/zone_mardum.cpp
+++ b/src/server/scripts/BrokenIsles/zone_mardum.cpp
@@ -27,6 +27,7 @@
#include "MapUtils.h"
#include "MotionMaster.h"
#include "ObjectAccessor.h"
+#include "PathGenerator.h"
#include "PassiveAI.h"
#include "PhasingHandler.h"
#include "Player.h"
@@ -34,6 +35,7 @@
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "SpellAuras.h"
+#include "SpellMgr.h"
#include "SpellScript.h"
#include "TemporarySummon.h"
@@ -1969,6 +1971,282 @@ CreatureAI* DemonHunterHiddenNoMoreAISelector(Creature* creature)
return new NullCreatureAI(creature);
};
+enum FelLordCazaData
+{
+ // Text
+ SAY_FEL_LORD_CAZA_AGGRO = 0,
+ SAY_FEL_LORD_CAZA_THROW_AXE = 1,
+ SAY_FEL_LORD_CAZA_DEATH = 2,
+
+ // Spells
+ SPELL_FEL_LORD_CAZA_SWEEPING_SLASH = 197002,
+ SPELL_FEL_LORD_CAZA_FEL_INFUSION = 197180,
+ SPELL_FEL_LORD_CAZA_VIOLENT_FEL_ENERGY = 196989,
+ SPELL_FEL_LORD_CAZA_THROW_AXE_JUMP = 196875,
+ SPELL_FEL_LORD_CAZA_THROW_AXE_MISSILE = 196876,
+ SPELL_FEL_LORD_CAZA_THROW_AXE_KNOCKBACK = 196955,
+ SPELL_FEL_LORD_CAZA_DIES = 210101,
+ SPELL_FEL_LORD_CAZA_KILL_CREDIT = 210104,
+ SPELL_FEL_LORD_CAZA_TAKING_POWER = 210105,
+ SPELL_AREATRIGGER_DUMMY_FEL_LORD_CAZA = 197471, // Serverside
+
+ // Events
+ EVENT_CAZA_SWEEPING_SLASH = 1,
+ EVENT_CAZA_FEL_INFUSION,
+ EVENT_CAZA_THROW_AXE_JUMP,
+
+ NPC_FEL_LORD_CAZA = 96441,
+
+ DATA_CAZA_AXE_TARGET_GUID = 0,
+
+ ACTION_CAZA_AXE_RETRIEVED = 0,
+};
+
+// 96441 - Fel Lord Caza
+struct npc_fel_lord_caza_cryptic_hollow : public ScriptedAI
+{
+ npc_fel_lord_caza_cryptic_hollow(Creature* creature) : ScriptedAI(creature) { }
+
+ void JustEngagedWith(Unit* /*who*/) override
+ {
+ Talk(SAY_FEL_LORD_CAZA_AGGRO);
+ _events.ScheduleEvent(EVENT_CAZA_SWEEPING_SLASH, 6s);
+ _events.ScheduleEvent(EVENT_CAZA_FEL_INFUSION, 11s);
+ _events.ScheduleEvent(EVENT_CAZA_THROW_AXE_JUMP, 23s);
+ }
+
+ void Reset() override
+ {
+ _events.Reset();
+ _axeTarget = ObjectGuid::Empty;
+ }
+
+ void JustDied(Unit* /*killer*/) override
+ {
+ Talk(SAY_FEL_LORD_CAZA_DEATH);
+ DoCastSelf(SPELL_FEL_LORD_CAZA_DIES);
+
+ for (ObjectGuid tapperGUID : me->GetTapList())
+ {
+ if (Player* tapper = ObjectAccessor::GetPlayer(*me, tapperGUID))
+ tapper->CastSpell(tapper, SPELL_FEL_LORD_CAZA_KILL_CREDIT, false);
+ }
+ }
+
+ void OnSpellCast(SpellInfo const* spell) override
+ {
+ if (spell->Id == SPELL_FEL_LORD_CAZA_THROW_AXE_MISSILE)
+ me->SetReactState(REACT_AGGRESSIVE);
+ }
+
+ void SpellHitTarget(WorldObject* target, SpellInfo const* spellInfo) override
+ {
+ if (spellInfo->Id == SPELL_AREATRIGGER_DUMMY_FEL_LORD_CAZA && target->GetTypeId() == TYPEID_PLAYER && !me->IsInCombat())
+ me->AI()->AttackStart(target->ToUnit());
+ }
+
+ 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_CAZA_SWEEPING_SLASH:
+ DoCastVictim(SPELL_FEL_LORD_CAZA_SWEEPING_SLASH);
+ break;
+ case EVENT_CAZA_FEL_INFUSION:
+ DoCast(SPELL_FEL_LORD_CAZA_FEL_INFUSION);
+ break;
+ case EVENT_CAZA_THROW_AXE_JUMP:
+ Talk(SAY_FEL_LORD_CAZA_THROW_AXE);
+ me->SetReactState(REACT_PASSIVE);
+ DoCast(SPELL_FEL_LORD_CAZA_THROW_AXE_JUMP);
+ break;
+ default:
+ break;
+ }
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+ }
+ }
+
+ void DoAction(int32 param) override
+ {
+ if (param != ACTION_CAZA_AXE_RETRIEVED)
+ return;
+
+ _events.ScheduleEvent(EVENT_CAZA_FEL_INFUSION, 400ms);
+ _events.ScheduleEvent(EVENT_CAZA_SWEEPING_SLASH, 8500ms);
+ _events.ScheduleEvent(EVENT_CAZA_THROW_AXE_JUMP, 12000ms);
+ }
+
+ void SetGUID(ObjectGuid const& guid, int32 id) override
+ {
+ if (id != DATA_CAZA_AXE_TARGET_GUID)
+ return;
+
+ _axeTarget = guid;
+ }
+
+ ObjectGuid GetGUID(int32 id) const override
+ {
+ if (id != DATA_CAZA_AXE_TARGET_GUID)
+ return ObjectGuid::Empty;
+
+ return _axeTarget;
+ }
+
+private:
+ EventMap _events;
+ ObjectGuid _axeTarget;
+};
+
+// ID - 169
+struct at_fel_lord_caza_intro : AreaTriggerAI
+{
+ using AreaTriggerAI::AreaTriggerAI;
+
+ void OnUnitEnter(Unit* unit) override
+ {
+ Player* player = unit->ToPlayer();
+ if (!player || player->IsGameMaster())
+ return;
+
+ Creature* caza = player->FindNearestCreature(NPC_FEL_LORD_CAZA, 100.0f);
+ if (!caza || caza->isDead())
+ return;
+
+ // This should have a cooldown of 2 minutes
+ caza->CastSpell(player, SPELL_AREATRIGGER_DUMMY_FEL_LORD_CAZA, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
+ }
+};
+
+// 197180 - Fel Infusion
+// ID - 5315
+struct at_fel_lord_caza_fel_infusion : AreaTriggerAI
+{
+ using AreaTriggerAI::AreaTriggerAI;
+
+ void OnUnitEnter(Unit* unit) override
+ {
+ if (!unit->IsPlayer())
+ return;
+
+ Unit* caster = at->GetCaster();
+ if (!caster)
+ return;
+
+ caster->CastSpell(unit, SPELL_FEL_LORD_CAZA_VIOLENT_FEL_ENERGY, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
+ }
+};
+
+// 196959 - Throw Axe
+// ID - 5295
+struct at_fel_lord_caza_throw_axe_knockback : AreaTriggerAI
+{
+ using AreaTriggerAI::AreaTriggerAI;
+
+ void OnInitialize() override
+ {
+ SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(at->GetSpellId(), DIFFICULTY_NONE);
+ if (!spellInfo)
+ return;
+
+ Unit* caster = at->GetCaster();
+ if (!caster)
+ return;
+
+ Unit* axeTarget = ObjectAccessor::GetUnit(*at, caster->GetAI()->GetGUID(DATA_CAZA_AXE_TARGET_GUID));
+ if (!axeTarget)
+ return;
+
+ Position destPos = at->GetFirstCollisionPosition(spellInfo->GetMaxRange(false, caster), at->GetRelativeAngle(axeTarget));
+ PathGenerator path(at);
+
+ path.CalculatePath(destPos.GetPositionX(), destPos.GetPositionY(), destPos.GetPositionZ(), false);
+
+ at->InitSplines(path.GetPath());
+ }
+
+ void OnUnitEnter(Unit* unit) override
+ {
+ if (Unit* caster = at->GetCaster())
+ if (caster->IsValidAttackTarget(unit))
+ caster->CastSpell(unit, SPELL_FEL_LORD_CAZA_THROW_AXE_KNOCKBACK, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
+ }
+};
+
+// 196889 - Throw Axe
+class spell_fel_lord_caza_throwing_axe_selector : public SpellScript
+{
+ void FilterTargets(std::list<WorldObject*>& targets)
+ {
+ targets.remove_if([this](WorldObject* target) -> bool
+ {
+ return GetCaster()->GetDistance(target) <= 25.0f;
+ });
+ }
+
+ void HandleHit(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->CastSpell(GetHitUnit()->GetPosition(), SPELL_FEL_LORD_CAZA_THROW_AXE_MISSILE, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
+ GetCaster()->SetFacingToObject(GetHitUnit());
+ GetCaster()->GetAI()->SetGUID(GetHitUnit()->GetGUID(), DATA_CAZA_AXE_TARGET_GUID);
+ }
+
+ void Register() override
+ {
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_fel_lord_caza_throwing_axe_selector::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
+ OnEffectHitTarget += SpellEffectFn(spell_fel_lord_caza_throwing_axe_selector::HandleHit, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 210103 - (Serverside/Non-DB2) Hidden No More: Fel Lord Caza Dies 02
+class spell_fel_lord_caza_dies_02 : public SpellScript
+{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_FEL_LORD_CAZA_TAKING_POWER });
+ }
+
+ void HandleHitTarget(SpellEffIndex /*effIndex*/) const
+ {
+ Unit* target = GetHitUnit();
+ target->CastSpell(target, SPELL_FEL_LORD_CAZA_TAKING_POWER, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
+ .TriggeringSpell = GetSpell()
+ });
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_fel_lord_caza_dies_02::HandleHitTarget, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+};
+
+// 196892 - Disarmed
+class spell_fel_lord_caza_disarmed : public AuraScript
+{
+ void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ GetTarget()->GetAI()->DoAction(ACTION_CAZA_AXE_RETRIEVED);
+ }
+
+ void Register() override
+ {
+ AfterEffectRemove += AuraEffectRemoveFn(spell_fel_lord_caza_disarmed::AfterRemove, EFFECT_0, SPELL_AURA_MOD_MELEE_HASTE_3, AURA_EFFECT_HANDLE_REAL);
+ }
+};
+
void AddSC_zone_mardum()
{
// Creature
@@ -1982,6 +2260,7 @@ void AddSC_zone_mardum()
RegisterCreatureAI(npc_inquisitor_baleful_molten_shore);
RegisterCreatureAI(npc_baleful_beaming_eye);
RegisterCreatureAI(npc_sevis_brightflame_shivarra_gateway);
+ RegisterCreatureAI(npc_fel_lord_caza_cryptic_hollow);
// AISelector
new FactoryCreatureScript<CreatureAI, &KaynSunfuryNearLegionBannerAISelector>("npc_kayn_sunfury_ashtongue_intro");
@@ -1998,6 +2277,9 @@ void AddSC_zone_mardum()
// AreaTrigger
RegisterAreaTriggerAI(at_enter_the_illidari_ashtongue_allari_killcredit);
RegisterAreaTriggerAI(at_enter_the_illidari_shivarra_conversation);
+ RegisterAreaTriggerAI(at_fel_lord_caza_intro);
+ RegisterAreaTriggerAI(at_fel_lord_caza_fel_infusion);
+ RegisterAreaTriggerAI(at_fel_lord_caza_throw_axe_knockback);
// EventScript
new event_sevis_sacrifice_player();
@@ -2026,4 +2308,7 @@ void AddSC_zone_mardum()
RegisterSpellScriptWithArgs(spell_freed_killcredit_set_them_free<NPC_IZAL_WHITEMOON_FREED>, "spell_izal_whitemoon_killcredit_set_them_free");
RegisterSpellScriptWithArgs(spell_freed_killcredit_set_them_free<NPC_BELATH_DAWNBLADE_FREED>, "spell_belath_dawnblade_killcredit_set_them_free");
RegisterSpellScriptWithArgs(spell_freed_killcredit_set_them_free<NPC_MANNETHREL_DARKSTAR_FREED>, "spell_mannethrel_darkstar_killcredit_set_them_free");
+ RegisterSpellScript(spell_fel_lord_caza_throwing_axe_selector);
+ RegisterSpellScript(spell_fel_lord_caza_dies_02);
+ RegisterSpellScript(spell_fel_lord_caza_disarmed);
};