diff --git a/data/sql/updates/db_world/2025_01_03_00.sql b/data/sql/updates/db_world/2025_01_03_00.sql new file mode 100644 index 000000000..4daf0941f --- /dev/null +++ b/data/sql/updates/db_world/2025_01_03_00.sql @@ -0,0 +1,5 @@ +-- DB update 2024_12_31_01 -> 2025_01_03_00 +-- +DELETE FROM `spell_script_names` WHERE `spell_id` = 43096; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(43096, 'spell_summon_all_players_dummy'); diff --git a/data/sql/updates/db_world/2025_01_04_00.sql b/data/sql/updates/db_world/2025_01_04_00.sql new file mode 100644 index 000000000..737bf326c --- /dev/null +++ b/data/sql/updates/db_world/2025_01_04_00.sql @@ -0,0 +1,4 @@ +-- DB update 2025_01_03_00 -> 2025_01_04_00 +DELETE FROM `quest_offer_reward_locale` WHERE `ID` IN (8346) AND `locale` = 'deDE'; +INSERT INTO `quest_offer_reward_locale` (`ID`, `locale`, `RewardText`, `VerifiedBuild`) VALUES +(8346,'deDE','Ihr habt Euch heute bewiesen, $N. Euer Wille zu lernen zeigt, dass Ihr Euch sehr wohl gegenüber dem endlosen Verlangen, welches jeden Blutelfen beherrscht, durchsetzen könnt.$B$BRuht Euch nicht auf Euren Lorbeeren aus, sondern versucht zu meistern, was Ihr gelernt habt. Nur durch Tatendrang können wir als Volk überleben.$B$BNehmt dies - es wird Euch von Nutzen sein. Geht nun und macht unserem Volk noch einmal Ehre.',0); diff --git a/data/sql/updates/db_world/2025_01_04_01.sql b/data/sql/updates/db_world/2025_01_04_01.sql new file mode 100644 index 000000000..0fc04b6b9 --- /dev/null +++ b/data/sql/updates/db_world/2025_01_04_01.sql @@ -0,0 +1,28 @@ +-- DB update 2025_01_04_00 -> 2025_01_04_01 +-- Argah smart ai +SET @ENTRY := 27440; +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type` = 9 AND `entryOrGuid` IN (@ENTRY * 100, @ENTRY * 100 + 1); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `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 +(@ENTRY, 0, 0, 0, 60, 0, 100, 0, 0, 0, 120000, 330000, 0, 0, 87, 2744000, 2744001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Argah - On Update - Run Random Script'), +(@ENTRY * 100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Argah - Actionlist - Say Line 0'), +(@ENTRY * 100, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 27441, 5, 0, 0, 0, 0, 0, 'Closest alive creature Sagai (27441) in 5 yards: Talk 0 to invoker'), +(@ENTRY * 100, 9, 2, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Argah - Actionlist - Say Line 1'), +(@ENTRY * 100, 9, 3, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Argah - Actionlist - Say Line 2'), +(@ENTRY * 100, 9, 4, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 27441, 5, 0, 0, 0, 0, 0, 'Closest alive creature Sagai (27441) in 5 yards: Talk 1 to invoker'), +(@ENTRY * 100 + 1, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Argah - Actionlist - Say Line 3'), +(@ENTRY * 100 + 1, 9, 1, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 27441, 5, 0, 0, 0, 0, 0, 'Closest alive creature Sagai (27441) in 5 yards: Talk 2 to invoker'); + +DELETE FROM `creature_text` WHERE `CreatureID` = 27440; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(27440, 0, 0, 'The nerubian siege outside is chilling, Sagai. There seems to be no end to them.', 12, 0, 100, 1, 0, 0, 26618, 0, 'Argah'), +(27440, 1, 0, 'That\'s right... I recovered munitions from the quarry just yesterday for that purpose.', 12, 0, 100, 1, 0, 0, 26620, 0, 'Argah'), +(27440, 2, 0, 'I hope the charges are set soon. Everyone could use a respite.', 12, 0, 100, 1, 0, 0, 26621, 0, 'Argah'), +(27440, 3, 0, 'Saurfang is here, Sagai! Saurfang! The brother of Broxigar himself, here to aid our efforts!', 12, 0, 100, 1, 0, 0, 26623, 0, 'Argah'); + +DELETE FROM `creature_text` WHERE `CreatureID` = 27441; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(27441, 0, 0, 'Yah. It be dem sinkholes. You see dem? Dere be talk of blowin\' dem up, cavin\' dem in.', 12, 0, 100, 1, 0, 0, 26619, 0, 'Sagai'), +(27441, 1, 0, 'You got dat right.', 12, 0, 100, 1, 0, 0, 26622, 0, 'Sagai'), +(27441, 2, 0, 'Yah. Hellscream, he be a fierce one, but too eager to prove himself, I be thinkin\'. It be good Saurfang be here, for sure.', 12, 0, 100, 1, 0, 0, 26688, 0, 'Sagai'); diff --git a/data/sql/updates/db_world/2025_01_04_02.sql b/data/sql/updates/db_world/2025_01_04_02.sql new file mode 100644 index 000000000..34b5641a0 --- /dev/null +++ b/data/sql/updates/db_world/2025_01_04_02.sql @@ -0,0 +1,13 @@ +-- DB update 2025_01_04_01 -> 2025_01_04_02 +-- +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 23889) AND (`source_type` = 0) AND (`id` = 3); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(23889, 0, 3, 0, 38, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 0, 'Amani\'shi Savage - On Data Set 0 0 - Start Attacking'); + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 23597) AND (`source_type` = 0) AND (`id` IN (13, 19, 20, 21, 22)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(23597, 0, 13, 21, 1, 1, 100, 3, 7000, 7000, 7000, 7000, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 50, 0, 0, 0, 0, 0, 0, 0, 'Amani\'shi Guardian - Out of Combat - Start Attacking (No Repeat) (Normal Dungeon)'), +(23597, 0, 19, 20, 1, 2, 100, 3, 7800, 7800, 7800, 7800, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 50, 0, 0, 0, 0, 0, 0, 0, 'Amani\'shi Guardian - Out of Combat - Start Attacking (No Repeat) (Normal Dungeon)'), +(23597, 0, 20, 22, 61, 2, 100, 3, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani\'shi Guardian - Out of Combat - Set Reactstate Aggressive (Phase 2) (No Repeat) (Normal Dungeon)'), +(23597, 0, 21, 22, 61, 1, 100, 3, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani\'shi Guardian - Out of Combat - Set Reactstate Aggressive (Phase 2) (No Repeat) (Normal Dungeon)'), +(23597, 0, 22, 0, 61, 3, 100, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani\'shi Guardian - Out of Combat - Set Home Position (Phase 1+2) (No Repeat) (Normal Dungeon)'); diff --git a/data/sql/updates/db_world/2025_01_05_00.sql b/data/sql/updates/db_world/2025_01_05_00.sql new file mode 100644 index 000000000..1d51ea771 --- /dev/null +++ b/data/sql/updates/db_world/2025_01_05_00.sql @@ -0,0 +1,53 @@ +-- DB update 2025_01_04_02 -> 2025_01_05_00 + +-- Remove unofficial Npcs +DELETE FROM `creature` WHERE (`id1` = 23586) AND (`guid` IN (89274, 89287, 89288, 89293, 89303, 89308, 89312, 89313, 89329)); +DELETE FROM `creature_addon` WHERE (`guid` IN (89274, 89287, 89288, 89293, 89303, 89308, 89312, 89313, 89329)); +DELETE FROM `linked_respawn` WHERE (`guid` IN (89274, 89287, 89288, 89293, 89303, 89308, 89312, 89313, 89329)); + +-- Update Positions, Wander Distance, Movement Type and pose for 89280 (sit). +UPDATE `creature` SET `position_x` = -138.5746, `position_y` = 1164.1141, `position_z` = 3.0369, `orientation` = 1.3761, `wander_distance` = 0, `MovementType` = 0 WHERE `guid` = 89284 AND `id1` = 23586; +UPDATE `creature` SET `position_x` = -219.4417, `position_y` = 1379.474, `position_z` = 0.0258, `orientation` = 0.9638, `wander_distance` = 0, `MovementType` = 0 WHERE `guid` = 89280 AND `id1` = 23586; +UPDATE `creature_addon` SET `bytes1` = 1 WHERE `guid` = 89280; + +-- Add Waypoints for two Scout Patrols +DELETE FROM `waypoint_data` WHERE `id` IN (8927800); +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(8927800, 1, -197.76129, 1336.6729, 0.25522953, NULL, 0, 0, 0, 100, 0), +(8927800, 2, -195.18869, 1319.1761, 1.2445819, NULL, 0, 0, 0, 100, 0), +(8927800, 3, -194.77528, 1288.6068, 1.3654809, NULL, 0, 0, 0, 100, 0), +(8927800, 4, -199.99263, 1259.6373, 1.1474091, NULL, 0, 0, 0, 100, 0), +(8927800, 5, -191.13173, 1241.6224, 0.58376735, NULL, 0, 0, 0, 100, 0), +(8927800, 6, -148.23947, 1214.8658, 0.9682467, NULL, 0, 0, 0, 100, 0), +(8927800, 7, -141.05751, 1192.8319, 0.071034685, NULL, 0, 0, 0, 100, 0), +(8927800, 8, -141.5868, 1124.066, 0.026241792, NULL, 0, 0, 0, 100, 0), +(8927800, 9, -141.05751, 1192.8319, 0.071034685, NULL, 0, 0, 0, 100, 0), +(8927800, 10, -148.23947, 1214.8658, 0.9682467, NULL, 0, 0, 0, 100, 0), +(8927800, 11, -191.13173, 1241.6224, 0.58376735, NULL, 0, 0, 0, 100, 0), +(8927800, 12, -199.99263, 1259.6373, 1.1474091, NULL, 0, 0, 0, 100, 0), +(8927800, 13, -194.77528, 1288.6068, 1.3654809, NULL, 0, 0, 0, 100, 0), +(8927800, 14, -195.18869, 1319.1761, 1.2445819, NULL, 0, 0, 0, 100, 0), +(8927800, 15, -197.76129, 1336.6729, 0.25522953, NULL, 0, 0, 0, 100, 0), +(8927800, 16, -208.06369, 1379.98, -0.11678864, NULL, 0, 0, 0, 100, 0); + +DELETE FROM `waypoint_data` WHERE `id` IN (8928900); +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(8928900, 1, -206.0561, 1178.5385, -0.56990623, NULL, 0, 0, 0, 100, 0), +(8928900, 2, -201.31548, 1195.815, -0.02255094, NULL, 0, 0, 0, 100, 0), +(8928900, 3, -177.1632, 1235.7587, 0.89132327, NULL, 0, 0, 0, 100, 0), +(8928900, 4, -142.62305, 1206.9307, 1.0594966, NULL, 0, 0, 0, 100, 0), +(8928900, 5, -136.43565, 1188.6288, 0.00022190076, NULL, 0, 0, 0, 100, 0), +(8928900, 6, -130.66829, 1163.2294, 0.48558202, NULL, 0, 0, 0, 100, 0), +(8928900, 7, -138.89366, 1149.0428, 0.025163397, NULL, 0, 0, 0, 100, 0), +(8928900, 8, -134.64996, 1118.2001, 0.48225334, NULL, 0, 0, 0, 100, 0), +(8928900, 9, -152.4376, 1100.2438, 0.32423848, NULL, 0, 0, 0, 100, 0), +(8928900, 10, -174.22884, 1083.7368, 0.10808088, NULL, 0, 0, 0, 100, 0), +(8928900, 11, -187.53537, 1094.5493, 1.7097571, NULL, 0, 0, 0, 100, 0), +(8928900, 12, -203.66646, 1117.7672, -0.08857499, NULL, 0, 0, 0, 100, 0), +(8928900, 13, -215.36795, 1135.6195, -1.8750997, NULL, 0, 0, 0, 100, 0), +(8928900, 14, -215.95822, 1155.653, -1.9799352, NULL, 0, 0, 0, 100, 0); + +-- Load WPs to the Patrols +UPDATE `creature` SET `wander_distance` = 0, `MovementType` = 2 WHERE `guid` IN (89278, 89289) AND `id1` = 23586; +UPDATE `creature_addon` SET `path_id` = 8927800 WHERE (`guid` IN (89278)); +UPDATE `creature_addon` SET `path_id` = 8928900 WHERE (`guid` IN (89289)); diff --git a/data/sql/updates/db_world/2025_01_05_01.sql b/data/sql/updates/db_world/2025_01_05_01.sql new file mode 100644 index 000000000..c6f801751 --- /dev/null +++ b/data/sql/updates/db_world/2025_01_05_01.sql @@ -0,0 +1,3 @@ +-- DB update 2025_01_05_00 -> 2025_01_05_01 +-- Angered, Suffering & Hungering Soul Fragment respawn +UPDATE `creature` SET `spawntimesecs` = 15 WHERE (`guid` BETWEEN 148424 AND 148488) and `id1` in (23398, 23399, 23401); diff --git a/data/sql/updates/db_world/2025_01_05_02.sql b/data/sql/updates/db_world/2025_01_05_02.sql new file mode 100644 index 000000000..a9e68a965 --- /dev/null +++ b/data/sql/updates/db_world/2025_01_05_02.sql @@ -0,0 +1,7 @@ +-- DB update 2025_01_05_01 -> 2025_01_05_02 + +DELETE FROM `creature_template_movement` WHERE `CreatureId` IN (25817, 25748); + +UPDATE `creature` SET `MovementType` = 0, `wander_distance` = 0 WHERE `id1` IN (25817, 25748); +-- set to 'sitting' +UPDATE `creature_template_addon`SET `bytes1` = 1 WHERE `entry` IN (25817, 25748); diff --git a/data/sql/updates/db_world/2025_01_05_03.sql b/data/sql/updates/db_world/2025_01_05_03.sql new file mode 100644 index 000000000..fdeed5fcd --- /dev/null +++ b/data/sql/updates/db_world/2025_01_05_03.sql @@ -0,0 +1,14 @@ +-- DB update 2025_01_05_02 -> 2025_01_05_03 +-- +-- Amani'shi Warbringer: Set MinHealth% to 0 for HEALTH_PCT +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 23580) AND (`source_type` = 0) AND (`id` IN (0, 1, 2, 3)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(23580, 0, 0, 1, 2, 0, 100, 1, 0, 30, 0, 0, 0, 0, 11, 43274, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani\'shi Warbringer - Between 0-30% Health - Cast \'Dismount Bear\' (No Repeat)'), +(23580, 0, 1, 2, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 90, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani\'shi Warbringer - Between 0-30% Health - Set Flag Standstate Stand Up (No Repeat)'), +(23580, 0, 2, 3, 61, 0, 100, 3, 0, 0, 0, 0, 0, 0, 11, 40743, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani\'shi Warbringer - Between 0-30% Health - Cast \'Frenzy\' (No Repeat)'), +(23580, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 206, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani\'shi Warbringer - Between 0-30% Health - Set caster combat distance to 0 (RestToMax: 0) (No Repeat)'); +-- Amani Bear Mount +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 24217; +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 24217) AND (`source_type` = 0) AND (`id` IN (0)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(24217, 0, 0, 0, 7, 0, 100, 1, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Bear Mount - On Evade - Despawn Instant (No Repeat)'); diff --git a/data/sql/updates/db_world/2025_01_05_04.sql b/data/sql/updates/db_world/2025_01_05_04.sql new file mode 100644 index 000000000..03c3dbaa3 --- /dev/null +++ b/data/sql/updates/db_world/2025_01_05_04.sql @@ -0,0 +1,26 @@ +-- DB update 2025_01_05_03 -> 2025_01_05_04 + +-- Remove unit flag "stunned" from Citizen of Havenshire +UPDATE `creature_template` SET `unit_flags`=`unit_flags`& ~262144 WHERE (`entry` = 28576); + +-- Update SmartAI for Citizens of Havenshire (rows 12-13 are Guid Reserved) +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28576; +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28576) AND (`source_type` = 0) AND (`id` IN (14, 15)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(28576, 0, 14, 0, 1, 0, 30, 0, 5000, 20000, 5000, 20000, 0, 0, 11, 52149, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Citizen of Havenshire - Out of Combat - Cast \'Rain of Darkness\''), +(28576, 0, 15, 0, 8, 0, 100, 0, 52149, 0, 0, 0, 0, 0, 142, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Citizen of Havenshire - On Spellhit \'Rain of Darkness\' - Set HP to 10%'); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28577; +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28577) AND (`source_type` = 0) AND (`id` IN (14, 15)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(28577, 0, 14, 0, 1, 0, 30, 0, 5000, 20000, 5000, 20000, 0, 0, 11, 52149, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Citizen of Havenshire - Out of Combat - Cast \'Rain of Darkness\''), +(28577, 0, 15, 0, 8, 0, 100, 0, 52149, 0, 0, 0, 0, 0, 142, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Citizen of Havenshire - On Spellhit \'Rain of Darkness\' - Set HP to 10%'); + +-- Remove aura from Scourge Sky Darkeners +UPDATE `creature_template_addon` SET `visibilityDistanceType` = 0, `auras` = '' WHERE (`entry` = 28642); + +-- Add SmartAI for Scourge Sky Darkeners +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28642; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28642); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(28642, 0, 0, 0, 1, 0, 100, 0, 5000, 20000, 5000, 20000, 0, 0, 11, 52147, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scourge Sky Darkener - Out of Combat - Cast \'Sky Darkener Assault\''); diff --git a/data/sql/updates/db_world/2025_01_05_05.sql b/data/sql/updates/db_world/2025_01_05_05.sql new file mode 100644 index 000000000..a68042373 --- /dev/null +++ b/data/sql/updates/db_world/2025_01_05_05.sql @@ -0,0 +1,15 @@ +-- DB update 2025_01_05_04 -> 2025_01_05_05 +-- +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 23586) AND (`source_type` = 0); +UPDATE `creature_template` SET `AIName` = '', `ScriptName` = 'npc_amanishi_scout' WHERE (`entry` = 23586); +DELETE FROM `spell_script_names` WHERE `spell_id`=42177 AND `ScriptName`='spell_alert_drums'; +DELETE FROM `spell_script_names` WHERE `spell_id`=42179 AND `ScriptName`='spell_summon_amanishi_sentries'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(42177, 'spell_alert_drums'), +(42179, 'spell_summon_amanishi_sentries'); + +-- Reinforcement +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 23587) AND (`source_type` = 0) AND (`id` IN (2, 3)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(23587, 0, 2, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani\'shi Reinforcement - On Just Summoned - Set In Combat With Zone'), +(23587, 0, 3, 0, 1, 0, 100, 1, 10000, 10000, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani\'shi Reinforcement - Out of Combat - Despawn Instant (No Repeat)'); diff --git a/data/sql/updates/db_world/2025_01_05_06.sql b/data/sql/updates/db_world/2025_01_05_06.sql new file mode 100644 index 000000000..723326a6d --- /dev/null +++ b/data/sql/updates/db_world/2025_01_05_06.sql @@ -0,0 +1,31 @@ +-- DB update 2025_01_05_05 -> 2025_01_05_06 +-- +-- Scarlet Medic +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28608) AND (`source_type` = 0) AND (`id` IN (3, 4)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(28608, 0, 3, 0, 0, 0, 100, 0, 0, 0, 3400, 4800, 0, 0, 11, 15498, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Medic - In Combat - Cast \'Holy Smite\''), +(28608, 0, 4, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Medic - Between 0-15% Health - Flee For Assist (No Repeat)'); +-- Phantasmal ogre +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 27647) AND (`source_type` = 0) AND (`id` IN (0)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(27647, 0, 0, 0, 2, 0, 100, 0, 0, 30, 20000, 24000, 0, 0, 11, 50730, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Phantasmal Ogre - Between 0-30% Health - Cast \'Bloodlust\''); +-- Halfdan the Ice-Hearted +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 23671) AND (`source_type` = 0) AND (`id` IN (9, 10, 11)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(23671, 0, 9, 10, 2, 0, 100, 1, 25, 75, 120000, 120000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Halfdan the Ice-Hearted - Between 25-75% Health - Say Line 2 (No Repeat)'), +(23671, 0, 10, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 8599, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Halfdan the Ice-Hearted - Between 25-75% Health - Cast \'Enrage\' (No Repeat)'), +(23671, 0, 11, 0, 2, 0, 100, 1, 0, 25, 120000, 120000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Halfdan the Ice-Hearted - Between 0-25% Health - Say Line 3 (No Repeat)'); +-- Dalaran Spellscribe +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 1920) AND (`source_type` = 0) AND (`id` IN (2)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(1920, 0, 2, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Dalaran Spellscribe - Between 0-15% Health - Flee For Assist (No Repeat)'); +-- Makrinni Scrabbler +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 6370) AND (`source_type` = 0) AND (`id` IN (0, 1, 2)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(6370, 0, 0, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 12548, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Makrinni Scrabbler - On Aggro - Cast \'Frost Shock\''), +(6370, 0, 1, 0, 0, 0, 100, 0, 2100, 2300, 6100, 6300, 0, 0, 11, 20822, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Makrinni Scrabbler - In Combat - Cast \'Frostbolt\''), +(6370, 0, 2, 0, 2, 0, 100, 1, 0, 20, 0, 0, 0, 0, 11, 11642, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Makrinni Scrabbler - Between 0-20% Health - Cast \'Heal\' (No Repeat)'); +-- Alexandra Blazen +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 8378) AND (`source_type` = 0) AND (`id` IN (3)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(8378, 0, 3, 0, 2, 0, 100, 0, 0, 20, 20000, 20000, 0, 0, 11, 11640, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Alexandra Blazen - Between 0-20% Health - Cast \'Renew\''); diff --git a/data/sql/updates/db_world/2025_01_05_07.sql b/data/sql/updates/db_world/2025_01_05_07.sql new file mode 100644 index 000000000..e47224202 --- /dev/null +++ b/data/sql/updates/db_world/2025_01_05_07.sql @@ -0,0 +1,3 @@ +-- DB update 2025_01_05_06 -> 2025_01_05_07 +-- +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 23889) AND (`source_type` = 0) AND (`id` = 3); diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index 5896ee978..51a63724a 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4862,6 +4862,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->RequiresSpellFocus = 0; }); + // Booming Voice + ApplySpellFix({ 40080 }, [](SpellInfo* spellInfo) + { + spellInfo->Effects[EFFECT_0].RealPointsPerLevel = 0; + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 846e1b180..083059869 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -2690,7 +2690,7 @@ void World::_UpdateGameTime() } /// Shutdown the server -void World::ShutdownServ(uint32 time, uint32 options, uint8 exitcode, const std::string& reason) +void World::ShutdownServ(uint32 time, uint32 options, uint8 exitcode, std::string const& reason) { // ignore if server shutdown at next tick @@ -2699,8 +2699,9 @@ void World::ShutdownServ(uint32 time, uint32 options, uint8 exitcode, const std: _shutdownMask = options; _exitCode = exitcode; + _shutdownReason = reason; - LOG_WARN("server", "Time left until shutdown/restart: {}", time); + LOG_DEBUG("server.worldserver", "Server shutdown called with ShutdownMask {}, ExitCode {}, Time {}, Reason {}", ShutdownMask(options), ShutdownExitCode(exitcode), secsToTimeString(time), reason); ///- If the shutdown time is 0, set m_stopEvent (except if shutdown is 'idle' with remaining sessions) if (time == 0) @@ -2720,32 +2721,45 @@ void World::ShutdownServ(uint32 time, uint32 options, uint8 exitcode, const std: sScriptMgr->OnShutdownInitiate(ShutdownExitCode(exitcode), ShutdownMask(options)); } -/// Display a shutdown message to the user(s) -void World::ShutdownMsg(bool show, Player* player, const std::string& reason) +/** + * @brief Displays a shutdown message at specific intervals or immediately if required. + * + * Show the time remaining for a server shutdown/restart with a reason appended if one is provided. + * Messages are displayed at regular intervals such as every + * 12 hours, 1 hour, 5 minutes, 1 minute, 30 seconds, 10 seconds, + * and every second in the last 10 seconds. + * + * @param show Forces the message to be displayed immediately. + * @param player The player who should recieve the message (can be nullptr for global messages). + * @param reason The reason for the shutdown, appended to the message if provided. + */ +void World::ShutdownMsg(bool show, Player* player, std::string const& reason) { - // not show messages for idle shutdown mode + // Do not show a message for idle shutdown if (_shutdownMask & SHUTDOWN_MASK_IDLE) return; - ///- Display a message every 12 hours, hours, 5 minutes, minute, 5 seconds and finally seconds - if (show || - (_shutdownTimer < 5 * MINUTE && (_shutdownTimer % 15) == 0) || // < 5 min; every 15 sec - (_shutdownTimer < 15 * MINUTE && (_shutdownTimer % MINUTE) == 0) || // < 15 min ; every 1 min - (_shutdownTimer < 30 * MINUTE && (_shutdownTimer % (5 * MINUTE)) == 0) || // < 30 min ; every 5 min - (_shutdownTimer < 12 * HOUR && (_shutdownTimer % HOUR) == 0) || // < 12 h ; every 1 h - (_shutdownTimer > 12 * HOUR && (_shutdownTimer % (12 * HOUR)) == 0)) // > 12 h ; every 12 h + bool twelveHours = (_shutdownTimer > 12 * HOUR && (_shutdownTimer % (12 * HOUR)) == 0); // > 12 h ; every 12 h + bool oneHour = (_shutdownTimer < 12 * HOUR && (_shutdownTimer % HOUR) == 0); // < 12 h ; every 1 h + bool fiveMin = (_shutdownTimer < 30 * MINUTE && (_shutdownTimer % (5 * MINUTE)) == 0); // < 30 min ; every 5 min + bool oneMin = (_shutdownTimer < 15 * MINUTE && (_shutdownTimer % MINUTE) == 0); // < 15 min ; every 1 min + bool thirtySec = (_shutdownTimer < 5 * MINUTE && (_shutdownTimer % 30) == 0); // < 5 min; every 30 sec + bool tenSec = (_shutdownTimer < 1 * MINUTE && (_shutdownTimer % 10) == 0); // < 1 min; every 10 sec + bool oneSec = (_shutdownTimer < 10 * SECOND && (_shutdownTimer % 1) == 0); // < 10 sec; every 1 sec + + ///- Display a message every 12 hours, hour, 5 minutes, minute, 30 seconds, 10 seconds and finally seconds + if (show || twelveHours || oneHour || fiveMin || oneMin || thirtySec || tenSec || oneSec) { std::string str = secsToTimeString(_shutdownTimer).append("."); - if (!reason.empty()) - { str += " - " + reason; - } + // Display the reason every 12 hours, hour, 5 minutes, minute. At 60 seconds and at 10 seconds + else if (!_shutdownReason.empty() && (twelveHours || oneHour || fiveMin || oneMin || _shutdownTimer == 60 || _shutdownTimer == 10)) + str += " - " + _shutdownReason; ServerMessageType msgid = (_shutdownMask & SHUTDOWN_MASK_RESTART) ? SERVER_MSG_RESTART_TIME : SERVER_MSG_SHUTDOWN_TIME; - SendServerMessage(msgid, str, player); - LOG_DEBUG("server.worldserver", "Server is {} in {}", (_shutdownMask & SHUTDOWN_MASK_RESTART ? "restart" : "shuttingdown"), str); + LOG_WARN("server.worldserver", "Server {} in {}", (_shutdownMask & SHUTDOWN_MASK_RESTART ? "restarting" : "shutdown"), str); } } diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index fcca45248..793100c48 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -245,9 +245,9 @@ public: /// Are we in the middle of a shutdown? [[nodiscard]] bool IsShuttingDown() const override { return _shutdownTimer > 0; } [[nodiscard]] uint32 GetShutDownTimeLeft() const override { return _shutdownTimer; } - void ShutdownServ(uint32 time, uint32 options, uint8 exitcode, const std::string& reason = std::string()) override; + void ShutdownServ(uint32 time, uint32 options, uint8 exitcode, std::string const& reason = std::string()) override; void ShutdownCancel() override; - void ShutdownMsg(bool show = false, Player* player = nullptr, const std::string& reason = std::string()) override; + void ShutdownMsg(bool show = false, Player* player = nullptr, std::string const& reason = std::string()) override; static uint8 GetExitCode() { return _exitCode; } static void StopNow(uint8 exitcode) { _stopEvent = true; _exitCode = exitcode; } static bool IsStopped() { return _stopEvent; } @@ -372,6 +372,7 @@ private: static uint8 _exitCode; uint32 _shutdownTimer; uint32 _shutdownMask; + std::string _shutdownReason; uint32 _cleaningFlags; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp index 436691010..d96450ca7 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp @@ -55,10 +55,9 @@ enum PhaseHalazzi { PHASE_NONE = 0, PHASE_LYNX = 1, - PHASE_SPLIT = 2, - PHASE_HUMAN = 3, - PHASE_MERGE = 4, - PHASE_ENRAGE = 5 + PHASE_HUMAN = 2, + PHASE_MERGE = 3, + PHASE_ENRAGE = 4 }; enum Yells @@ -118,15 +117,15 @@ struct boss_halazzi : public BossAI { BossAI::DamageTaken(attacker, damage, damagetype, damageSchoolMask); - if (_phase == PHASE_LYNX || _phase == PHASE_ENRAGE) + if (_phase == PHASE_LYNX) { uint32 _healthCheckPercentage = 25 * (3 - _transformCount); - if (!HealthAbovePct(_healthCheckPercentage)) - EnterPhase(PHASE_SPLIT); + if (me->HealthBelowPctDamaged(_healthCheckPercentage, damage)) + EnterPhase(PHASE_HUMAN); } else if (_phase == PHASE_HUMAN) { - if (!HealthAbovePct(20)) + if (me->HealthBelowPctDamaged(20, damage)) EnterPhase(PHASE_MERGE); } } @@ -153,20 +152,12 @@ struct boss_halazzi : public BossAI void EnterPhase(PhaseHalazzi nextPhase) { + _phase = nextPhase; + switch (nextPhase) { - case PHASE_ENRAGE: - SetInvincibility(false); - scheduler.Schedule(12s, GROUP_LYNX, [this](TaskContext context) - { - DoCastSelf(SPELL_SUMMON_TOTEM); - context.Repeat(20s); - }); - [[fallthrough]]; case PHASE_LYNX: { - if (_phase == PHASE_MERGE) - me->ResumeChasingVictim(); summons.DespawnAll(); if (_transformCount) @@ -188,6 +179,8 @@ struct boss_halazzi : public BossAI } } + me->ResumeChasingVictim(); + scheduler.CancelGroup(GROUP_MERGE); scheduler.Schedule(5s, 15s, GROUP_LYNX, [this](TaskContext context) { @@ -201,16 +194,15 @@ struct boss_halazzi : public BossAI }); break; } - case PHASE_SPLIT: + case PHASE_HUMAN: Talk(SAY_SPLIT); DoCastSelf(SPELL_TRANSFIGURE, true); scheduler.Schedule(3s, GROUP_SPLIT, [this](TaskContext /*context*/) { DoCastSelf(SPELL_SUMMON_LYNX, true); }); - nextPhase = PHASE_HUMAN; - [[fallthrough]]; - case PHASE_HUMAN: + _phase = PHASE_HUMAN; + scheduler.CancelGroup(GROUP_MERGE); scheduler.CancelGroup(GROUP_LYNX); scheduler.Schedule(10s, GROUP_HUMAN, [this](TaskContext context) @@ -240,24 +232,35 @@ struct boss_halazzi : public BossAI me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MoveFollow(lynx, 0, 0); ++_transformCount; - scheduler.Schedule(2s, GROUP_MERGE, [this](TaskContext context) + scheduler.Schedule(2s, GROUP_MERGE, [this, lynx](TaskContext context) { - if (Creature* lynx = instance->GetCreature(DATA_SPIRIT_LYNX)) + if (lynx) + { if (me->IsWithinDistInMap(lynx, 6.0f)) { - if (_transformCount < 3) - EnterPhase(PHASE_LYNX); - else - EnterPhase(PHASE_ENRAGE); + EnterPhase(PHASE_LYNX); + + // Enrage phase + if (_transformCount == 3) + { + _phase = PHASE_ENRAGE; + SetInvincibility(false); + scheduler.Schedule(12s, GROUP_LYNX, [this](TaskContext context) + { + DoCastSelf(SPELL_SUMMON_TOTEM); + context.Repeat(20s); + }); + } } - context.Repeat(2s); + else + context.Repeat(2s); + } }); } break; default: break; } - _phase = nextPhase; } void KilledUnit(Unit* victim) override diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp index 401b8f6f5..04b09dca0 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp @@ -21,6 +21,8 @@ #include "GridNotifiersImpl.h" #include "PassiveAI.h" #include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" #include "zulaman.h" enum Yells @@ -42,6 +44,7 @@ enum Spells SPELL_FLAME_BREATH = 43140, SPELL_FIRE_WALL = 43113, SPELL_ENRAGE = 44779, + SPELL_SUMMON_PLAYERS_DUMMY = 43096, SPELL_SUMMON_PLAYERS = 43097, SPELL_TELE_TO_CENTER = 43098, // coord SPELL_HATCH_ALL = 43144, @@ -323,11 +326,9 @@ struct boss_janalai : public BossAI SpawnBombs(); _isBombing = true; - me->GetMap()->DoForAllPlayers([&](Player* player) - { - if (player->IsAlive()) - DoTeleportPlayer(player, janalainPos.GetPositionX() - 5 + rand() % 10, janalainPos.GetPositionY() - 5 + rand() % 10, janalainPos.GetPositionZ(), 0.0f); - }); + DoCastSelf(SPELL_TELE_TO_CENTER); + DoCastAOE(SPELL_SUMMON_PLAYERS_DUMMY, true); + //DoCast(Temp, SPELL_SUMMON_PLAYERS, true) // core bug, spell does not work if too far ThrowBombs(); @@ -400,7 +401,7 @@ struct npc_janalai_hatcher : public ScriptedAI ++_repeatCount; if (me->FindNearestCreature(NPC_EGG, 100.0f)) - context.Repeat(4s); + context.Repeat(5s); else { if (WorldObject* summoner = GetSummoner()) @@ -449,8 +450,39 @@ private: bool _isHatching; }; +class spell_summon_all_players_dummy: public SpellScript +{ + PrepareSpellScript(spell_summon_all_players_dummy); + + bool Validate(SpellInfo const* /*spell*/) override + { + return ValidateSpellInfo({ SPELL_SUMMON_PLAYERS }); + } + + void FilterTargets(std::list& targets) + { + Position pos = GetCaster()->GetPosition(); + targets.remove_if([&, pos](WorldObject* target) -> bool + { + return target->IsWithinBox(pos, 18.0f, 18.0f, 18.0f); + }); + } + + void OnHit(SpellEffIndex /*effIndex*/) + { + GetCaster()->CastSpell(GetHitUnit(), SPELL_SUMMON_PLAYERS, true); + } + + void Register() override + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_summon_all_players_dummy::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); + OnEffectHitTarget += SpellEffectFn(spell_summon_all_players_dummy::OnHit, EFFECT_0, SPELL_EFFECT_DUMMY); + } +}; + void AddSC_boss_janalai() { RegisterZulAmanCreatureAI(boss_janalai); RegisterZulAmanCreatureAI(npc_janalai_hatcher); + RegisterSpellScript(spell_summon_all_players_dummy); } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp index d27394fdf..22c405ed6 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp @@ -72,10 +72,11 @@ enum Phases enum NalorakkGroups { GROUP_CHECK_DEAD = 1, - GROUP_MOVE = 2, - GROUP_BERSERK = 3, - GROUP_HUMAN = 4, - GROUP_BEAR = 5 + GROUP_CHECK_EVADE = 2, + GROUP_MOVE = 3, + GROUP_BERSERK = 4, + GROUP_HUMAN = 5, + GROUP_BEAR = 6 }; struct boss_nalorakk : public BossAI @@ -109,7 +110,7 @@ struct boss_nalorakk : public BossAI void MoveInLineOfSight(Unit* who) override { - if (who->IsPlayer() && _phase < PHASE_START_COMBAT && _active) + if (who->IsPlayer() && !who->ToPlayer()->IsGameMaster() && _phase < PHASE_START_COMBAT && _active) { _active = false; switch (_phase) @@ -199,6 +200,25 @@ struct boss_nalorakk : public BossAI me->SetHomePosition(me->GetPosition()); break; } + _introScheduler.Schedule(10s, GROUP_CHECK_EVADE, [this](TaskContext context) + { + if (CheckAnyEvadeGroup(_waveList)) + { + _introScheduler.CancelGroup(GROUP_CHECK_DEAD); + _introScheduler.Schedule(5s, GROUP_CHECK_EVADE, [this](TaskContext context) + { + for (Creature* member : _waveList) + if (member->isMoving()) + { + context.Repeat(1s); + return; + } + _active = true; + }); + } + else + context.Repeat(10s); + }); } BossAI::MoveInLineOfSight(who); } @@ -310,7 +330,7 @@ struct boss_nalorakk : public BossAI BossAI::UpdateAI(diff); } - bool CheckFullyDeadGroup(std::list groupToCheck) + bool CheckFullyDeadGroup(std::list groupToCheck) { for (Creature* member : groupToCheck) { @@ -322,6 +342,14 @@ struct boss_nalorakk : public BossAI return true; } + bool CheckAnyEvadeGroup(std::list groupToCheck) + { + for (Creature* member : groupToCheck) + if (member->IsAlive() && !member->IsInCombat()) + return true; + return false; + } + void JustDied(Unit* killer) override { BossAI::JustDied(killer); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp index 95de6bc40..59b0686d1 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp @@ -381,6 +381,8 @@ struct npc_zuljin_vortex : public ScriptedAI me->SetSpeed(MOVE_RUN, 1.0f); me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); DoZoneInCombat(); + // Start attacking random target + ChangeToNewPlayer(); } void SpellHit(Unit* caster, SpellInfo const* spell) override @@ -389,13 +391,22 @@ struct npc_zuljin_vortex : public ScriptedAI DoCast(caster, SPELL_ZAP_DAMAGE, true); } + void ChangeToNewPlayer() + { + DoResetThreatList(); + if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true)) + { + me->AddThreat(target, 10000000.0f); + } + } + void UpdateAI(uint32 /*diff*/) override { UpdateVictim(); //if the vortex reach the target, it change his target to another player if (me->IsWithinMeleeRange(me->GetVictim())) - AttackStart(SelectTarget(SelectTargetMethod::Random, 0)); + ChangeToNewPlayer(); } }; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index 97dde689d..88cd3e738 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -20,6 +20,7 @@ #include "Player.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "SpellAuraEffects.h" #include "SpellInfo.h" #include "SpellScript.h" #include "SpellScriptLoader.h" @@ -410,6 +411,13 @@ struct npc_harrison_jones : public ScriptedAI scheduler.Schedule(1s, [this](TaskContext /*task*/) { me->SetStandState(UNIT_STAND_STATE_DEAD); + }).Schedule(2s, [this](TaskContext /*task*/) + { + // Send savages to attack players + std::list creatures; + me->GetCreatureListWithEntryInGrid(creatures, NPC_AMANISHI_SAVAGE, 100.0f); + for (Creature* creature : creatures) + creature->SetInCombatWithZone(); }); _instance->StorePersistentData(DATA_TIMED_RUN, 21); _instance->DoAction(ACTION_START_TIMED_RUN); @@ -674,6 +682,166 @@ private: SummonList _summons; }; +struct WorldTriggerHutPred +{ + bool operator()(Creature* trigger) const + { + return trigger->GetOrientation() > 2.7f || (trigger->GetOrientation() < 2.7f && 1270.0f < trigger->GetPositionY() && trigger->GetPositionY() < 1280.0f); + } +}; + +struct WorldTriggerDrumPred +{ + bool operator()(Creature* trigger) const + { + return !WorldTriggerHutPred()(trigger); + } +}; + +enum AmanishiScout +{ + NPC_WORLD_TRIGGER = 22515, + POINT_DRUM = 0, + SAY_AGGRO = 0, + SPELL_ALERT_DRUMS = 42177, + SPELL_MULTI_SHOT = 43205, + SPELL_SHOOT = 16496 +}; + +struct npc_amanishi_scout : public ScriptedAI +{ + npc_amanishi_scout(Creature* creature) : ScriptedAI(creature) { } + + void Reset() override + { + scheduler.CancelAll(); + me->SetCombatMovement(false); + } + + void JustEngagedWith(Unit* /*who*/) override + { + me->SetInCombatWithZone(); + Talk(SAY_AGGRO); + // Move to Drum + std::list triggers; + GetCreatureListWithEntryInGrid(triggers, me, NPC_WORLD_TRIGGER, 50.0f); + triggers.remove_if(WorldTriggerHutPred()); + triggers.sort(Acore::ObjectDistanceOrderPred(me)); + if (!triggers.empty()) + { + me->ClearTarget(); + Creature* closestDrum = triggers.front(); + me->GetMotionMaster()->MovePoint(POINT_DRUM, closestDrum->GetPositionX(), closestDrum->GetPositionY(), closestDrum->GetPositionZ()); + } + else + ScheduleCombat(); + } + + void MovementInform(uint32 type, uint32 id) override + { + if (type == POINT_MOTION_TYPE && id == POINT_DRUM) + { + DoCastSelf(SPELL_ALERT_DRUMS); + scheduler.Schedule(5s, [this](TaskContext /*context*/) + { + ScheduleCombat(); + }); + } + } + + void ScheduleCombat() + { + me->SetCombatMovement(true); + if (Unit* victim = me->GetVictim()) + me->GetMotionMaster()->MoveChase(victim); + scheduler.Schedule(2s, [this](TaskContext context) + { + DoCastVictim(SPELL_SHOOT); + context.Repeat(4s, 5s); + }).Schedule(6s, [this](TaskContext context) + { + DoCastAOE(SPELL_MULTI_SHOT); + context.Repeat(20s, 24s); + }); + } + + void UpdateAI(uint32 diff) override + { + scheduler.Update(diff); + + if (!UpdateVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +enum SpellAlertDrums +{ + SPELL_SUMMON_AMANISHI_SENTRIES = 42179 +}; + +class spell_alert_drums : public AuraScript +{ + PrepareAuraScript(spell_alert_drums); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_SUMMON_AMANISHI_SENTRIES }); + } + + void HandleTriggerSpell(AuraEffect const* aurEff) + { + PreventDefaultAction(); + if (aurEff->GetTickNumber() == 1) + GetCaster()->CastSpell(GetCaster(), SPELL_SUMMON_AMANISHI_SENTRIES, true); + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_alert_drums::HandleTriggerSpell, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } +}; + +enum AmanishiSentries +{ + SUMMON_AMANISHI_SENTRIES_1 = 42180, + SUMMON_AMANISHI_SENTRIES_2 = 42181, + SUMMON_AMANISHI_SENTRIES_3 = 42182, + SUMMON_AMANISHI_SENTRIES_4 = 42183, +}; + +class spell_summon_amanishi_sentries : public SpellScript +{ + PrepareSpellScript(spell_summon_amanishi_sentries); + + constexpr static uint32 spells[4] = { SUMMON_AMANISHI_SENTRIES_1, SUMMON_AMANISHI_SENTRIES_2, SUMMON_AMANISHI_SENTRIES_3, SUMMON_AMANISHI_SENTRIES_4 }; + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo(spells); + } + + void HandleScriptEffect(SpellEffIndex /*effIndex*/) + { + std::list triggers; + GetCreatureListWithEntryInGrid(triggers, GetHitUnit(), NPC_WORLD_TRIGGER, 50.0f); + triggers.remove_if(WorldTriggerDrumPred()); + if (triggers.empty()) + return; + Creature* trigger = Acore::Containers::SelectRandomContainerElement(triggers); + uint8 index_1 = urand(0, 3); + uint8 index_2 = (index_1 + 1) % 4; + trigger->CastSpell(trigger, spells[index_1], true); + trigger->CastSpell(trigger, spells[index_2], true); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_summon_amanishi_sentries::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + void AddSC_zulaman() { RegisterZulAmanCreatureAI(npc_forest_frog); @@ -682,4 +850,7 @@ void AddSC_zulaman() RegisterSpellScript(spell_ritual_of_power); RegisterZulAmanCreatureAI(npc_amanishi_lookout); RegisterZulAmanCreatureAI(npc_amanishi_tempest); + RegisterZulAmanCreatureAI(npc_amanishi_scout); + RegisterSpellScript(spell_alert_drums); + RegisterSpellScript(spell_summon_amanishi_sentries); } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h index 66e3b079a..1004be12f 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h @@ -54,6 +54,7 @@ enum CreatureIds NPC_HALAZZI = 23577, NPC_NALORAKK = 23576, NPC_SPIRIT_LYNX = 24143, + NPC_AMANISHI_SAVAGE = 23889, NPC_AMANISHI_WARBRINGER = 23580, NPC_AMANISHI_TRIBESMAN = 23582, NPC_AMANISHI_MEDICINE_MAN = 23581,