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 00000000000000..737bf326c158b5 --- /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 00000000000000..0fc04b6b96ba32 --- /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 00000000000000..34b5641a073b4d --- /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 00000000000000..1d51ea7711ad01 --- /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 00000000000000..c6f801751a2586 --- /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 00000000000000..a9e68a96578aec --- /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 00000000000000..fdeed5fcdcd531 --- /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 00000000000000..03c3dbaa3538dd --- /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 00000000000000..a6804237308f5c --- /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 00000000000000..723326a6d66c22 --- /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 00000000000000..e47224202279d2 --- /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/data/sql/updates/db_world/2025_01_07_00.sql b/data/sql/updates/db_world/2025_01_07_00.sql new file mode 100644 index 00000000000000..e724ddcad508fa --- /dev/null +++ b/data/sql/updates/db_world/2025_01_07_00.sql @@ -0,0 +1,178 @@ +-- DB update 2025_01_05_07 -> 2025_01_07_00 + +-- Remove Wrong WP for Tamed Amani Crocolisk +DELETE FROM `waypoint_data` WHERE `id` IN (176360, 201960); + +-- Remove Amani'shi Handler and Flame Caster (replaced with Amani'shi Beast Tamer) +DELETE FROM `creature` WHERE (`id1` = 24065) AND (`guid` IN (24323, 20861, 34024, 34025, 34026)); +DELETE FROM `creature` WHERE (`id1` = 23596) AND (`guid` IN (34031, 34030)); +DELETE FROM `creature_addon` WHERE (`guid` IN (24323, 20861, 34024, 34025, 34031, 34030, 34026)); +DELETE FROM `linked_respawn` WHERE (`guid` IN (24323, 20861, 34024, 34025, 34031, 34030, 34026)); + +-- Waypoint for Amani'shi Beast Tamer group (already in DB I only corrected it) +DELETE FROM `waypoint_data` WHERE `id` IN (243230); +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(243230, 1, 442.129, 904.214, 0.000692, NULL, 0, 0, 0, 100, 0), +(243230, 2, 416.327, 888.693, 0.000035, NULL, 0, 0, 0, 100, 0), +(243230, 3, 442.129, 904.214, 0.000692, NULL, 0, 0, 0, 100, 0), +(243230, 4, 445.459, 962.963, 0.000075, NULL, 0, 0, 0, 100, 0), +(243230, 5, 425.408, 985.171, 0.000075, NULL, 0, 0, 0, 100, 0), +(243230, 6, 410.89, 986.49, 0.000075, NULL, 0, 0, 0, 100, 0), +(243230, 7, 425.408, 985.171, 0.000075, NULL, 0, 0, 0, 100, 0), +(243230, 8, 445.459, 962.963, 0.000075, NULL, 0, 0, 0, 100, 0), +(243230, 9, 442.129, 904.214, 0.000692, NULL, 0, 0, 0, 100, 0); + +-- Sniffed Waypoint for an Amani'shi Handler +DELETE FROM `waypoint_data` WHERE `id` IN (8917400); +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(8917400, 1, 221.95709, 1133.2837, 0, NULL, 0, 0, 0, 100, 0), +(8917400, 2, 220.70128, 1130.3092, 0, NULL, 0, 0, 0, 100, 0), +(8917400, 3, 222.21317, 1126.2802, 0, NULL, 0, 0, 0, 100, 0), +(8917400, 4, 225.12256, 1123.6393, 0, NULL, 0, 0, 0, 100, 0), +(8917400, 5, 231.03201, 1126.2893, 0, NULL, 0, 0, 0, 100, 0), +(8917400, 6, 235.53342, 1124.0503, 0, NULL, 0, 0, 0, 100, 0), +(8917400, 7, 242.74089, 1126.9958, 0, NULL, 0, 0, 0, 100, 0), +(8917400, 8, 244.73573, 1133.0251, 1.55080, NULL, 0, 0, 0, 100, 0), +(8917400, 9, 248.98828, 1142.2306, 0, NULL, 0, 0, 0, 100, 0), +(8917400, 10, 243.06467, 1143.4736, 0, NULL, 0, 0, 0, 100, 0), +(8917400, 11, 242.09348, 1137.6598, 0, NULL, 0, 0, 0, 100, 0), +(8917400, 12, 236.63585, 1135.982, 0, NULL, 0, 0, 0, 100, 0), +(8917400, 13, 231.60368, 1135.6569, 0, NULL, 0, 0, 0, 100, 0), +(8917400, 14, 227.66483, 1133.9977, 0, NULL, 0, 0, 0, 100, 0), +(8917400, 15, 224.44601, 1136.731, 0, NULL, 0, 0, 0, 100, 0), +(8917400, 16, 221.43864, 1138.8192, 0, NULL, 0, 0, 0, 100, 0), +(8917400, 17, 221.95709, 1133.2837, 0, NULL, 0, 0, 0, 100, 0); + +-- Set WD, MT and remove pathid from Tamed Amani Crocolisk +UPDATE `creature` SET `wander_distance` = 0, `MovementType` = 0 WHERE `guid` IN (17636, 20196) AND `id1` = 24138; +UPDATE `creature_addon` SET `path_id` = 0 WHERE (`guid` IN (17636, 20196)); + +-- Create new Amani'shi Beast Tamer +DELETE FROM `creature` WHERE (`id1` = 24059) AND (`guid` IN (89309, 89311, 89312, 89329, 89407)); +INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES +(89309, 24059, 0, 0, 568, 0, 0, 1, 1, 1, 277.305, 1054.69, 0.000044, 5.70759, 7200, 0, 0, 78044, 0, 2, 0, 0, 0, '', 0), +(89311, 24059, 0, 0, 568, 0, 0, 1, 1, 1, 436.083, 920.6, 0.00397012, 1.93599, 7200, 0, 0, 78044, 0, 2, 0, 0, 0, '', 0), +(89312, 24059, 0, 0, 568, 0, 0, 1, 1, 1, 440.151, 919.88, 0.0001, 4.539345, 7200, 0, 0, 78044, 0, 0, 0, 0, 0, '', 0), +(89329, 24059, 0, 0, 568, 0, 0, 1, 1, 1, 385.161, 996.886, 0.009852, 5.01081, 7200, 0, 0, 78044, 0, 0, 0, 0, 0, '', 0), +(89407, 24059, 0, 0, 568, 0, 0, 1, 1, 1, 381.87, 991.632, 0.00122086, 0.387951, 7200, 0, 0, 78044, 0, 0, 0, 0, 0, '', 0); + +-- Update WD and MT for Amani'shi Handler +UPDATE `creature` SET `wander_distance` = 0, `MovementType` = 2 WHERE `guid` IN (89174) AND `id1` = 24065; + +-- Creature Addon for two Amani'shi Beast Tamer and one Amani'shi Handler +DELETE FROM `creature_addon` WHERE (`guid` IN (89309, 89311, 89174)); +INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(89309, 208610, 0, 0, 0, 0, 0, NULL), +(89311, 243230, 0, 0, 0, 0, 0, NULL), +(89174, 8917400, 0, 0, 0, 0, 0, NULL); + +-- Set Creature Formation for Amani'shi Beast Tamer and Crocodiles +DELETE FROM `creature_formations` WHERE `leaderGUID` = 89309; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES +(89309, 89309, 0, 0, 515, 0, 0), +(89309, 17636, 3, 90, 515, 0, 0), +(89309, 20196, 3, 270, 515, 0, 0); + +-- Set Creature Formation for two Amani'shi Beast Tamer +DELETE FROM `creature_formations` WHERE `leaderGUID` = 89311; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES +(89311, 89311, 0, 0, 515, 0, 0), +(89311, 89312, 3, 90, 515, 0, 0); + +-- Set WD and MT for Amani Lynx +UPDATE `creature` SET `wander_distance` = 0, `MovementType` = 0 WHERE `guid` IN (25813, 28406, 29104, 29105, 29107, 29108, 29109, 29441, 29846, 31753, 31756, 31826, 31834, 33301) AND `id1` = 24043; + +-- Set SmartAI for Amani Lynx +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 24043; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 24043); +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 +(24043, 0, 0, 0, 1, 0, 100, 3, 0, 0, 1000, 1000, 0, 0, 11, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Cast \'Stealth\''), +(24043, 0, 1, 2, 4, 0, 100, 512, 0, 0, 0, 0, 0, 0, 28, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - On Aggro - Remove Aura \'Stealth\''), +(24043, 0, 2, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 43317, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - On Aggro - Cast \'Dash\''), +(24043, 0, 3, 0, 0, 0, 100, 2, 5000, 5000, 35000, 35000, 0, 0, 11, 43357, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - In Combat - Cast \'Feral Swipe\''); + +-- Set WD and MT for Amani Lynx Cub +UPDATE `creature` SET `wander_distance` = 0, `MovementType` = 0 WHERE `guid` IN (87042, 89201, 89202, 89203) AND `id1` = 24064; + +-- Add Extra Flag (DONT_OVERRIDE_SAI_ENTRY) +UPDATE `creature_template` SET `flags_extra` = `flags_extra`|134217728 WHERE `entry` IN (24064); + +-- Amani Lynx Cub smartAI change +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 24064; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 24064); +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 +(24064, 0, 0, 1, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 28, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - On Aggro - Remove Aura \'Stealth\''), +(24064, 0, 1, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 43317, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - On Aggro - Cast \'Dash\''), +(24064, 0, 2, 0, 0, 0, 100, 2, 5000, 5000, 35000, 35000, 0, 0, 11, 43358, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - In Combat - Cast \'Gut Rip\' (Normal Dungeon)'); + +-- First on/off invisibility pack +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -89177); +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 +(-89177, 0, 3, 0, 1, 0, 100, 0, 30000, 35000, 30000, 35000, 0, 0, 11, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Cast \'Stealth\''), +(-89177, 0, 4, 0, 1, 0, 100, 0, 40000, 40000, 40000, 40000, 0, 0, 28, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Remove Aura \'Stealth\''); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -86922); +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 +(-86922, 0, 3, 0, 1, 0, 100, 0, 50000, 55000, 50000, 55000, 0, 0, 11, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Cast \'Stealth\''), +(-86922, 0, 4, 0, 1, 0, 100, 0, 60000, 60000, 60000, 60000, 0, 0, 28, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Remove Aura \'Stealth\''); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -89172); +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 +(-89172, 0, 3, 0, 1, 0, 100, 0, 60000, 65000, 60000, 65000, 0, 0, 11, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Cast \'Stealth\''), +(-89172, 0, 4, 0, 1, 0, 100, 0, 70000, 70000, 70000, 70000, 0, 0, 28, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Remove Aura \'Stealth\''); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -89173); +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 +(-89173, 0, 3, 0, 1, 0, 100, 0, 80000, 85000, 80000, 85000, 0, 0, 11, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Cast \'Stealth\''), +(-89173, 0, 4, 0, 1, 0, 100, 0, 90000, 90000, 90000, 90000, 0, 0, 28, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Remove Aura \'Stealth\''); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -89145); +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 +(-89145, 0, 3, 0, 1, 0, 100, 0, 100000, 105000, 100000, 105000, 0, 0, 11, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Cast \'Stealth\''), +(-89145, 0, 4, 0, 1, 0, 100, 0, 110000, 110000, 110000, 110000, 0, 0, 28, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Remove Aura \'Stealth\''); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -89175); +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 +(-89175, 0, 3, 0, 1, 0, 100, 0, 20000, 25000, 20000, 25000, 0, 0, 11, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Cast \'Stealth\''), +(-89175, 0, 4, 0, 1, 0, 100, 0, 30000, 30000, 30000, 30000, 0, 0, 28, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Remove Aura \'Stealth\''); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -86921); +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 +(-86921, 0, 3, 0, 1, 0, 100, 0, 120000, 125000, 120000, 125000, 0, 0, 11, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Cast \'Stealth\''), +(-86921, 0, 4, 0, 1, 0, 100, 0, 130000, 130000, 130000, 130000, 0, 0, 28, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Remove Aura \'Stealth\''); + +-- Second on/off invisibility pack +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -87043); +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 +(-87043, 0, 3, 0, 1, 0, 100, 0, 30000, 35000, 30000, 35000, 0, 0, 11, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Cast \'Stealth\''), +(-87043, 0, 4, 0, 1, 0, 100, 0, 40000, 40000, 40000, 40000, 0, 0, 28, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Remove Aura \'Stealth\''); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -86198); +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 +(-86198, 0, 3, 0, 1, 0, 100, 0, 50000, 55000, 50000, 55000, 0, 0, 11, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Cast \'Stealth\''), +(-86198, 0, 4, 0, 1, 0, 100, 0, 60000, 60000, 60000, 60000, 0, 0, 28, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Remove Aura \'Stealth\''); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -89141); +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 +(-89141, 0, 3, 0, 1, 0, 100, 0, 60000, 65000, 60000, 65000, 0, 0, 11, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Cast \'Stealth\''), +(-89141, 0, 4, 0, 1, 0, 100, 0, 70000, 70000, 70000, 70000, 0, 0, 28, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Remove Aura \'Stealth\''); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -89176); +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 +(-89176, 0, 3, 0, 1, 0, 100, 0, 80000, 85000, 80000, 85000, 0, 0, 11, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Cast \'Stealth\''), +(-89176, 0, 4, 0, 1, 0, 100, 0, 90000, 90000, 90000, 90000, 0, 0, 28, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Remove Aura \'Stealth\''); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -88652); +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 +(-88652, 0, 3, 0, 1, 0, 100, 0, 100000, 105000, 100000, 105000, 0, 0, 11, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Cast \'Stealth\''), +(-88652, 0, 4, 0, 1, 0, 100, 0, 110000, 110000, 110000, 110000, 0, 0, 28, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Remove Aura \'Stealth\''); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -89135); +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 +(-89135, 0, 3, 0, 1, 0, 100, 0, 20000, 25000, 20000, 25000, 0, 0, 11, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Cast \'Stealth\''), +(-89135, 0, 4, 0, 1, 0, 100, 0, 30000, 30000, 30000, 30000, 0, 0, 28, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Remove Aura \'Stealth\''); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -89200); +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 +(-89200, 0, 3, 0, 1, 0, 100, 0, 120000, 125000, 120000, 125000, 0, 0, 11, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Cast \'Stealth\''), +(-89200, 0, 4, 0, 1, 0, 100, 0, 130000, 130000, 130000, 130000, 0, 0, 28, 42943, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Lynx Cub - Out of Combat - Remove Aura \'Stealth\''); diff --git a/data/sql/updates/db_world/2025_01_07_01.sql b/data/sql/updates/db_world/2025_01_07_01.sql new file mode 100644 index 00000000000000..ec32fe1601ef89 --- /dev/null +++ b/data/sql/updates/db_world/2025_01_07_01.sql @@ -0,0 +1,44 @@ +-- DB update 2025_01_07_00 -> 2025_01_07_01 + +-- Delete Wrong Amani'shi Medicine Man +DELETE FROM `creature` WHERE (`id1` = 23581) AND (`guid` IN (89310)); +DELETE FROM `creature_addon` WHERE (`guid` IN (89310)); +DELETE FROM `linked_respawn` WHERE (`guid` IN (89310)); + +-- Set WD and MT for Amani'shi Medicine Man +UPDATE `creature` SET `wander_distance` = 0, `MovementType` = 0 WHERE `guid` IN (86209) AND `id1` = 23581; + +-- Waypoint +DELETE FROM `waypoint_data` WHERE `id` IN (8621000); +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(8621000, 1, 97.787, 1411.9034, -3.8629317, NULL, 0, 0, 0, 100, 0), +(8621000, 2, 118.593, 1404.9677, -7.3945456, NULL, 0, 0, 0, 100, 0), +(8621000, 3, 140.44618, 1412.8431, -0.6880279, NULL, 0, 0, 0, 100, 0), +(8621000, 4, 160.95193, 1408.474, 4.5122232, NULL, 0, 0, 0, 100, 0), +(8621000, 5, 148.4082, 1422.7607, 2.8240137, NULL, 0, 0, 0, 100, 0), +(8621000, 6, 132.07227, 1418.0293, -1.9425232, NULL, 0, 0, 0, 100, 0), +(8621000, 7, 99.87826, 1421.7754, 0.6053877, NULL, 0, 0, 0, 100, 0), +(8621000, 8, 69.989365, 1421.9194, 0.8218676, NULL, 0, 0, 0, 100, 0), +(8621000, 9, 63.964302, 1410.9033, 0.8689089, NULL, 0, 0, 0, 100, 0), +(8621000, 10, 97.787, 1411.9034, -3.8629317, NULL, 0, 0, 0, 100, 0); + +-- Set WD and MT and add creature addon for Amani'shi Wind Walker (I would have preferred to put the path in the guid smartai, just to prevent the delay). +UPDATE `creature` SET `wander_distance` = 0, `MovementType` = 2 WHERE `guid` IN (86210) AND `id1` = 24179; +DELETE FROM `creature_addon` WHERE (`guid` IN (86210)); +INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(86210, 8621000, 0, 0, 0, 0, 0, NULL); + +-- Add Creature Formation +DELETE FROM `creature_formations` WHERE `leaderGUID` = 86210; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES +(86210, 86210, 0, 0, 515, 0, 0), +(86210, 86209, 3, 270, 515, 0, 0); + +-- Remove other two Wrong Npcs (and set WD and MT for another). +DELETE FROM `creature` WHERE (`id1` = 24059) AND (`guid` IN (86211)); +DELETE FROM `creature` WHERE (`id1` = 23596) AND (`guid` IN (86212)); +DELETE FROM `creature_addon` WHERE (`guid` IN (86211 ,86212)); +DELETE FROM `linked_respawn` WHERE (`guid` IN (86211 ,86212)); + +-- This npc and an Amani'shi Flame Caster should be in formation and one of them have a waypoint, but I cannot sniff it (it was changed during cataclysm). +UPDATE `creature` SET `wander_distance` = 0, `MovementType` = 0 WHERE `guid` IN (89326) AND `id1` = 24059; diff --git a/data/sql/updates/db_world/2025_01_07_02.sql b/data/sql/updates/db_world/2025_01_07_02.sql new file mode 100644 index 00000000000000..a9f252e9a70b75 --- /dev/null +++ b/data/sql/updates/db_world/2025_01_07_02.sql @@ -0,0 +1,3 @@ +-- DB update 2025_01_07_01 -> 2025_01_07_02 +-- loot table for item 22568 Sealed Craftsman's Writ +UPDATE `item_template` SET `flagsCustom` = `flagsCustom` | 2 WHERE `entry` BETWEEN 22600 AND 22626; diff --git a/data/sql/updates/db_world/2025_01_07_03.sql b/data/sql/updates/db_world/2025_01_07_03.sql new file mode 100644 index 00000000000000..9f8412d62bc270 --- /dev/null +++ b/data/sql/updates/db_world/2025_01_07_03.sql @@ -0,0 +1,3 @@ +-- DB update 2025_01_07_02 -> 2025_01_07_03 +-- +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` IN (17160, 17159)); diff --git a/data/sql/updates/db_world/2025_01_09_00.sql b/data/sql/updates/db_world/2025_01_09_00.sql new file mode 100644 index 00000000000000..ba792d62b56825 --- /dev/null +++ b/data/sql/updates/db_world/2025_01_09_00.sql @@ -0,0 +1,8 @@ +-- DB update 2025_01_07_03 -> 2025_01_09_00 + +-- Delete Tanzar +DELETE FROM `creature` WHERE `id1` = 23790 AND (`guid` IN (89157)); +DELETE FROM `creature_addon` WHERE (`guid` IN (89157)); + +-- Set use group loot rules +UPDATE `gameobject_template` SET `Data15` = `Data15`|1 WHERE (`entry` = 186648); diff --git a/data/sql/updates/db_world/2025_01_09_01.sql b/data/sql/updates/db_world/2025_01_09_01.sql new file mode 100644 index 00000000000000..b6c6992a466b94 --- /dev/null +++ b/data/sql/updates/db_world/2025_01_09_01.sql @@ -0,0 +1,6 @@ +-- DB update 2025_01_09_00 -> 2025_01_09_01 +-- +DELETE FROM `spell_script_names` WHERE `spell_id` IN (7098, 39647); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(7098, 'spell_gen_proc_on_victim'), +(39647, 'spell_gen_proc_on_victim'); diff --git a/data/sql/updates/db_world/2025_01_09_02.sql b/data/sql/updates/db_world/2025_01_09_02.sql new file mode 100644 index 00000000000000..fabf2fd9462d67 --- /dev/null +++ b/data/sql/updates/db_world/2025_01_09_02.sql @@ -0,0 +1,5 @@ +-- DB update 2025_01_09_01 -> 2025_01_09_02 +-- +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2726) AND (`source_type` = 0) AND (`id` IN (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_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(2726, 0, 1, 0, 8, 0, 100, 0, 9712, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scorched Guardian - Aggro on spell hit'); diff --git a/data/sql/updates/db_world/2025_01_10_00.sql b/data/sql/updates/db_world/2025_01_10_00.sql new file mode 100644 index 00000000000000..a83046324c9556 --- /dev/null +++ b/data/sql/updates/db_world/2025_01_10_00.sql @@ -0,0 +1,5 @@ +-- DB update 2025_01_09_02 -> 2025_01_10_00 +-- Spawn alliance quest giver for Shattered Halls Imprisoned in the Citadel quest +DELETE FROM `creature` WHERE (`id1` = 17288) AND (`guid` IN (151300)); +INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES +(151300, 17288, 0, 0, 540, 37114, 3714, 2, 1, 0, 120.88, 252.78, -14.57, 0.82, 7200, 0, 0, 6104, 0, 0, 2, 0, 0, '', 0); diff --git a/data/sql/updates/db_world/2025_01_10_01.sql b/data/sql/updates/db_world/2025_01_10_01.sql new file mode 100644 index 00000000000000..67b8ac0d3c987f --- /dev/null +++ b/data/sql/updates/db_world/2025_01_10_01.sql @@ -0,0 +1,8 @@ +-- DB update 2025_01_10_00 -> 2025_01_10_01 +-- +DELETE FROM `spell_script_names` WHERE `spell_id`=42577 AND `ScriptName`='spell_zuljin_zap'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES(42577, 'spell_zuljin_zap'); +-- 43983 Energy Storm, add CD to proc +DELETE FROM `spell_proc_event` WHERE `entry` = 43983; +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `procPhase`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(43983, 0, 0, 0, 0, 0, 0x4000|0x10000, 1|2, 1, 0.0, 100.0, 600); diff --git a/src/common/Threading/PCQueue.h b/src/common/Threading/PCQueue.h index 1efb494ba0b1a5..57ea0b2d344b48 100644 --- a/src/common/Threading/PCQueue.h +++ b/src/common/Threading/PCQueue.h @@ -20,51 +20,51 @@ #include #include +#include +#include template class ProducerConsumerQueue { private: - std::mutex _queueLock; + mutable std::mutex _queueLock; std::queue _queue; std::condition_variable _condition; - std::atomic _cancel; - std::atomic _shutdown; + std::atomic _cancel{}; + std::atomic _shutdown{}; public: - ProducerConsumerQueue() : _cancel(false), _shutdown(false) { } + ProducerConsumerQueue() = default; void Push(const T& value) { - std::lock_guard lock(_queueLock); - _queue.push(std::move(value)); - + { + std::lock_guard lock(_queueLock); + _queue.push(std::move(value)); + } _condition.notify_one(); } - bool Empty() + bool Empty() const { std::lock_guard lock(_queueLock); - return _queue.empty(); } [[nodiscard]] std::size_t Size() const { + std::lock_guard lock(_queueLock); return _queue.size(); } bool Pop(T& value) { std::lock_guard lock(_queueLock); - if (_queue.empty() || _cancel) return false; - value = _queue.front(); - + value = std::move(_queue.front()); _queue.pop(); - return true; } @@ -72,39 +72,30 @@ class ProducerConsumerQueue { std::unique_lock lock(_queueLock); - // we could be using .wait(lock, predicate) overload here but it is broken - // https://connect.microsoft.com/VisualStudio/feedback/details/1098841 - while (_queue.empty() && !_cancel && !_shutdown) - _condition.wait(lock); + // Wait for the queue to have an element or the cancel/shutdown flag + _condition.wait(lock, [this] { return !_queue.empty() || _cancel || _shutdown; }); if (_queue.empty() || _cancel) return; - value = _queue.front(); - + value = std::move(_queue.front()); _queue.pop(); } - // Clears the queue and will immediately stop any consumers + // Clears the queue and immediately stops any consumers. void Cancel() { - std::unique_lock lock(_queueLock); - - while (!_queue.empty()) - { + std::lock_guard lock(_queueLock); + while (!_queue.empty()) { T& value = _queue.front(); - DeleteQueuedObject(value); - _queue.pop(); } - _cancel = true; - _condition.notify_all(); } - // Graceful stop, will wait for queue to become empty before stopping consumers + // Graceful stop: waits for the queue to become empty before stopping consumers. void Shutdown() { _shutdown = true; @@ -113,10 +104,13 @@ class ProducerConsumerQueue private: template - typename std::enable_if::value>::type DeleteQueuedObject(E& obj) { delete obj; } + typename std::enable_if::value>::type DeleteQueuedObject(E& obj) + { + delete obj; + } template - typename std::enable_if::value>::type DeleteQueuedObject(E const& /*packet*/) { } + typename std::enable_if::value>::type DeleteQueuedObject(E const& /*obj*/) { } }; #endif diff --git a/src/common/Utilities/TaskScheduler.cpp b/src/common/Utilities/TaskScheduler.cpp index 6f8978f3c8c1e3..8e07e0ed03a34a 100644 --- a/src/common/Utilities/TaskScheduler.cpp +++ b/src/common/Utilities/TaskScheduler.cpp @@ -124,9 +124,9 @@ bool TaskScheduler::IsGroupScheduled(group_t const group) return _task_holder.IsGroupQueued(group); } -Milliseconds TaskScheduler::GetNextGroupOcurrence(group_t const group) const +Milliseconds TaskScheduler::GetNextGroupOccurrence(group_t const group) const { - return std::chrono::duration_cast(_task_holder.GetNextGroupOcurrence(group) - clock_t::now()); + return std::chrono::duration_cast(_task_holder.GetNextGroupOccurrence(group) - clock_t::now()); } void TaskScheduler::TaskQueue::Push(TaskContainer&& task) @@ -194,15 +194,12 @@ bool TaskScheduler::TaskQueue::IsGroupQueued(group_t const group) return false; } -TaskScheduler::timepoint_t TaskScheduler::TaskQueue::GetNextGroupOcurrence(group_t const group) const +TaskScheduler::timepoint_t TaskScheduler::TaskQueue::GetNextGroupOccurrence(group_t const group) const { TaskScheduler::timepoint_t next = TaskScheduler::timepoint_t::max(); for (auto const& task : container) - { if (task->IsInGroup(group) && task->_end < next) next = task->_end; - } - return next; } @@ -248,7 +245,7 @@ TaskScheduler::repeated_t TaskContext::GetRepeatCounter() const return _task->_repeated; } -TaskScheduler::timepoint_t TaskContext::GetNextOcurrence() const +TaskScheduler::timepoint_t TaskContext::GetNextOccurrence() const { return _task->_end; } diff --git a/src/common/Utilities/TaskScheduler.h b/src/common/Utilities/TaskScheduler.h index b85ad54978fc2d..4e422d63755f80 100644 --- a/src/common/Utilities/TaskScheduler.h +++ b/src/common/Utilities/TaskScheduler.h @@ -149,7 +149,7 @@ class TaskScheduler bool IsGroupQueued(group_t const group); // Returns the next group occurrence. - TaskScheduler::timepoint_t GetNextGroupOcurrence(group_t const group) const; + TaskScheduler::timepoint_t GetNextGroupOccurrence(group_t const group) const; bool IsEmpty() const; }; @@ -377,7 +377,7 @@ class TaskScheduler } // Returns the next group occurrence. - Milliseconds GetNextGroupOcurrence(group_t const group) const; + Milliseconds GetNextGroupOccurrence(group_t const group) const; private: /// Insert a new task to the enqueued tasks. @@ -483,7 +483,7 @@ class TaskContext /// Returns the repeat counter which increases every time the task is repeated. TaskScheduler::repeated_t GetRepeatCounter() const; - TaskScheduler::timepoint_t GetNextOcurrence() const; + TaskScheduler::timepoint_t GetNextOccurrence() const; /// Repeats the event and sets a new duration. /// std::chrono::seconds(5) for example. diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 7cd36c99464476..0c1e6dfa46fecf 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -10267,8 +10267,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg return false; } // Cast positive spell on enemy target - case 7099: // Curse of Mending - case 39703: // Curse of Mending case 20233: // Improved Lay on Hands (cast on target) { target = victim; diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index f37cf5d3a99713..d949698214f628 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -3525,20 +3525,20 @@ void ObjectMgr::LoadVehicleSeatAddon() if (!sVehicleSeatStore.LookupEntry(seatID)) { - LOG_ERROR("sql.sql", "Table `vehicle_seat_addon`: SeatID: %u does not exist in VehicleSeat.dbc. Skipping entry.", seatID); + LOG_ERROR("sql.sql", "Table `vehicle_seat_addon`: SeatID: {} does not exist in VehicleSeat.dbc. Skipping entry.", seatID); continue; } // Sanitizing values if (orientation > float(M_PI * 2)) { - LOG_ERROR("sql.sql", "Table `vehicle_seat_addon`: SeatID: %u is using invalid angle offset value (%f). Set Value to 0.", seatID, orientation); + LOG_ERROR("sql.sql", "Table `vehicle_seat_addon`: SeatID: {} is using invalid angle offset value ({}). Set Value to 0.", seatID, orientation); orientation = 0.0f; } if (exitParam >= AsUnderlyingType(VehicleExitParameters::VehicleExitParamMax)) { - LOG_ERROR("sql.sql", "Table `vehicle_seat_addon`: SeatID: %u is using invalid exit parameter value (%u). Setting to 0 (none).", seatID, exitParam); + LOG_ERROR("sql.sql", "Table `vehicle_seat_addon`: SeatID: {} is using invalid exit parameter value ({}). Setting to 0 (none).", seatID, exitParam); continue; } @@ -3547,7 +3547,7 @@ void ObjectMgr::LoadVehicleSeatAddon() ++count; } while (result->NextRow()); - LOG_INFO("server.loading", ">> Loaded %u Vehicle Seat Addon entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + LOG_INFO("server.loading", ">> Loaded {} Vehicle Seat Addon entries in {} ms", count, GetMSTimeDiffToNow(oldMSTime)); } void ObjectMgr::LoadPetLevelInfo() diff --git a/src/server/game/Maps/MapUpdater.cpp b/src/server/game/Maps/MapUpdater.cpp index 552b48d7e307d9..8f8704da5b64d1 100644 --- a/src/server/game/Maps/MapUpdater.cpp +++ b/src/server/game/Maps/MapUpdater.cpp @@ -67,7 +67,7 @@ class LFGUpdateRequest : public UpdateRequest uint32 m_diff; }; -MapUpdater::MapUpdater(): pending_requests(0) +MapUpdater::MapUpdater() : pending_requests(0), _cancelationToken(false) { } @@ -84,10 +84,11 @@ void MapUpdater::deactivate() { _cancelationToken = true; - wait(); + wait(); // This is where we wait for tasks to complete - _queue.Cancel(); + _queue.Cancel(); // Cancel the queue to prevent further task processing + // Join all worker threads for (auto& thread : _workerThreads) { if (thread.joinable()) @@ -99,44 +100,45 @@ void MapUpdater::deactivate() void MapUpdater::wait() { - std::unique_lock guard(_lock); + std::unique_lock guard(_lock); // Guard lock for safe waiting - while (pending_requests > 0) - _condition.wait(guard); + // Wait until there are no pending requests + _condition.wait(guard, [this] { + return pending_requests.load(std::memory_order_acquire) == 0; + }); +} - guard.unlock(); +void MapUpdater::schedule_task(UpdateRequest* request) +{ + // Atomic increment for pending_requests + pending_requests.fetch_add(1, std::memory_order_release); + _queue.Push(request); } void MapUpdater::schedule_update(Map& map, uint32 diff, uint32 s_diff) { - std::lock_guard guard(_lock); - - ++pending_requests; - - _queue.Push(new MapUpdateRequest(map, *this, diff, s_diff)); + schedule_task(new MapUpdateRequest(map, *this, diff, s_diff)); } void MapUpdater::schedule_lfg_update(uint32 diff) { - std::lock_guard guard(_lock); - - ++pending_requests; - - _queue.Push(new LFGUpdateRequest(*this, diff)); + schedule_task(new LFGUpdateRequest(*this, diff)); } bool MapUpdater::activated() { - return _workerThreads.size() > 0; + return !_workerThreads.empty(); } void MapUpdater::update_finished() { - std::lock_guard lock(_lock); - - --pending_requests; - - _condition.notify_all(); + // Atomic decrement for pending_requests + if (pending_requests.fetch_sub(1, std::memory_order_acquire) == 1) + { + // Only notify when pending_requests becomes 0 (i.e., all tasks are finished) + std::lock_guard lock(_lock); // Lock only for condition variable notification + _condition.notify_all(); // Notify waiting threads that all requests are complete + } } void MapUpdater::WorkerThread() @@ -145,16 +147,16 @@ void MapUpdater::WorkerThread() CharacterDatabase.WarnAboutSyncQueries(true); WorldDatabase.WarnAboutSyncQueries(true); - while (1) + while (!_cancelationToken) { UpdateRequest* request = nullptr; - _queue.WaitAndPop(request); - if (_cancelationToken) - return; + _queue.WaitAndPop(request); // Wait for and pop a request from the queue - request->call(); - - delete request; + if (!_cancelationToken && request) + { + request->call(); // Execute the request + delete request; // Clean up after processing + } } } diff --git a/src/server/game/Maps/MapUpdater.h b/src/server/game/Maps/MapUpdater.h index e65cb0193905af..174cef97719e48 100644 --- a/src/server/game/Maps/MapUpdater.h +++ b/src/server/game/Maps/MapUpdater.h @@ -22,6 +22,7 @@ #include "PCQueue.h" #include #include +#include class Map; class UpdateRequest; @@ -32,6 +33,7 @@ class MapUpdater MapUpdater(); ~MapUpdater() = default; + void schedule_task(UpdateRequest* request); void schedule_update(Map& map, uint32 diff, uint32 s_diff); void schedule_lfg_update(uint32 diff); void wait(); @@ -42,15 +44,12 @@ class MapUpdater private: void WorkerThread(); - ProducerConsumerQueue _queue; - + std::atomic pending_requests; // Use std::atomic for pending_requests to avoid lock contention + std::atomic _cancelationToken; // Atomic flag for cancellation to avoid race conditions std::vector _workerThreads; - std::atomic _cancelationToken; - - std::mutex _lock; + std::mutex _lock; // Mutex and condition variable for synchronization std::condition_variable _condition; - std::size_t pending_requests; }; #endif //_MAP_UPDATER_H_INCLUDED diff --git a/src/server/game/Motd/MotdMgr.cpp b/src/server/game/Motd/MotdMgr.cpp index eb16810bd25635..a63bce7b6d0ef7 100644 --- a/src/server/game/Motd/MotdMgr.cpp +++ b/src/server/game/Motd/MotdMgr.cpp @@ -139,7 +139,7 @@ void MotdMgr::LoadLocalizedMotds(uint32 realmId) { if (!baseResult) { - LOG_ERROR("server.loading", "No base MOTD found for realm %u. Localized MOTDs will not be loaded.", realmId); + LOG_ERROR("server.loading", "No base MOTD found for realm {}. Localized MOTDs will not be loaded.", realmId); return; } diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index e04627c0a4494f..a6bf64577d55da 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -2683,7 +2683,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 if (IsStopped()) @@ -2691,8 +2691,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) @@ -2712,32 +2713,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); } } @@ -2870,27 +2884,27 @@ void World::UpdateRealmCharCount(uint32 accountId) { CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_COUNT); stmt->SetData(0, accountId); - _queryProcessor.AddCallback(CharacterDatabase.AsyncQuery(stmt).WithPreparedCallback(std::bind(&World::_UpdateRealmCharCount, this, std::placeholders::_1))); + _queryProcessor.AddCallback(CharacterDatabase.AsyncQuery(stmt).WithPreparedCallback(std::bind(&World::_UpdateRealmCharCount, this, std::placeholders::_1,accountId))); } -void World::_UpdateRealmCharCount(PreparedQueryResult resultCharCount) +void World::_UpdateRealmCharCount(PreparedQueryResult resultCharCount,uint32 accountId) { + uint8 charCount{0}; if (resultCharCount) { Field* fields = resultCharCount->Fetch(); - uint32 accountId = fields[0].Get(); - uint8 charCount = uint8(fields[1].Get()); + charCount = uint8(fields[1].Get()); + } - LoginDatabaseTransaction trans = LoginDatabase.BeginTransaction(); + LoginDatabaseTransaction trans = LoginDatabase.BeginTransaction(); - LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_REP_REALM_CHARACTERS); - stmt->SetData(0, charCount); - stmt->SetData(1, accountId); - stmt->SetData(2, realm.Id.Realm); - trans->Append(stmt); + LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_REP_REALM_CHARACTERS); + stmt->SetData(0, charCount); + stmt->SetData(1, accountId); + stmt->SetData(2, realm.Id.Realm); + trans->Append(stmt); - LoginDatabase.CommitTransaction(trans); - } + LoginDatabase.CommitTransaction(trans); } void World::InitWeeklyQuestResetTime() diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index bb62006011083c..fa0e1302a2a80e 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -245,9 +245,9 @@ class World: public IWorld /// 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; } @@ -347,7 +347,7 @@ class World: public IWorld protected: void _UpdateGameTime(); // callback for UpdateRealmCharacters - void _UpdateRealmCharCount(PreparedQueryResult resultCharCount); + void _UpdateRealmCharCount(PreparedQueryResult resultCharCount,uint32 accountId); void InitDailyQuestResetTime(); void InitWeeklyQuestResetTime(); @@ -366,6 +366,7 @@ class World: public IWorld static uint8 _exitCode; uint32 _shutdownTimer; uint32 _shutdownMask; + std::string _shutdownReason; uint32 _cleaningFlags; diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index d0ddbc05c19d55..cc326413e54684 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -1302,7 +1302,7 @@ class npc_commandscript : public CommandScript if (!sObjectMgr->SetCreatureLinkedRespawn(creature->GetSpawnId(), linkguid)) { - handler->SendErrorMessage("Selected creature can't link with guid '%u'", linkguid); + handler->SendErrorMessage("Selected creature can't link with guid '{}'", linkguid); return false; } diff --git a/src/server/scripts/Commands/cs_send.cpp b/src/server/scripts/Commands/cs_send.cpp index d09e9e29234afa..2874976ac0f274 100644 --- a/src/server/scripts/Commands/cs_send.cpp +++ b/src/server/scripts/Commands/cs_send.cpp @@ -179,7 +179,7 @@ class send_commandscript : public CommandScript /// - Send the message // Use SendAreaTriggerMessage for fastest delivery. - player->GetSession()->SendAreaTriggerMessage("%s", msg.c_str()); + player->GetSession()->SendAreaTriggerMessage("{}", msg); player->GetSession()->SendAreaTriggerMessage("|cffff0000[Message from administrator]:|r"); // Confirmation message diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp index 430ff20ee92d20..7638efe9a82a5b 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp @@ -342,7 +342,7 @@ class spell_entropius_negative_energy_periodic : public AuraScript void PeriodicTick(AuraEffect const* aurEff) { PreventDefaultAction(); - uint32 targetCount = aurEff->GetTickNumber() > 12 ? 1 : aurEff->GetTickNumber() / 12; + uint32 targetCount = (aurEff->GetTickNumber() + 11) / 12; GetTarget()->CastCustomSpell(aurEff->GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, SPELLVALUE_MAX_TARGETS, targetCount); } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp index 11cf383a0f4230..d2b04f31846d17 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp @@ -98,7 +98,7 @@ struct boss_akilzon : public BossAI }); ScheduleTimedEvent(20s, 30s, [&] { - if (scheduler.GetNextGroupOcurrence(GROUP_ELECTRICAL_STORM) > 5s) + if (scheduler.GetNextGroupOccurrence(GROUP_ELECTRICAL_STORM) > 5s) DoCastRandomTarget(SPELL_GUST_OF_WIND, 1); }, 20s, 30s); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp index 43669101065634..d96450ca775d38 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_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp index 5f5f05a341d2ec..9c9b1514df7b8b 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp @@ -135,7 +135,8 @@ enum Misc MAX_ADD_COUNT = 4, ADDITIONAL_CLASS_SPRIEST = 11, AURA_SHADOW_FORM = 15473, - GROUP_CLASS_ABILITY = 1 + GROUP_CLASS_ABILITY = 1, + GROUP_DRAIN_POWER = 2 }; enum AbilityTarget @@ -242,12 +243,15 @@ struct boss_hexlord_malacrass : public BossAI BossAI::Reset(); _currentClass = CLASS_NONE; _classAbilityTimer = 10000ms; + _timeUntilNextDrainPower = 0ms; SpawnAdds(); ScheduleHealthCheckEvent(80, [&] { - ScheduleTimedEvent(1s, [&] { + scheduler.Schedule(1s, GROUP_DRAIN_POWER, [this](TaskContext context) + { DoCastSelf(SPELL_DRAIN_POWER, true); Talk(SAY_DRAIN_POWER); - }, 30s); + context.Repeat(30s); + }); }); } @@ -282,6 +286,14 @@ struct boss_hexlord_malacrass : public BossAI ScheduleTimedEvent(30s, [&]{ scheduler.CancelGroup(GROUP_CLASS_ABILITY); DoCastSelf(SPELL_SPIRIT_BOLTS); + // Delay Drain Power if it's currently within 10s of being cast + // TODO: see what is wrong with GetNextGroupOccurrence as the timers don't seem correct on resets + _timeUntilNextDrainPower = scheduler.GetNextGroupOccurrence(GROUP_DRAIN_POWER); + if (_timeUntilNextDrainPower > 0s && _timeUntilNextDrainPower < 10s) + { + std::chrono::milliseconds delayTime = 10s - _timeUntilNextDrainPower + 1s; + scheduler.DelayGroup(GROUP_DRAIN_POWER, delayTime); + } scheduler.Schedule(10s, [this](TaskContext) { if (Creature* siphonTrigger = me->SummonCreature(NPC_TEMP_TRIGGER, me->GetPosition(), TEMPSUMMON_TIMED_DESPAWN, 30000)) @@ -354,6 +366,7 @@ struct boss_hexlord_malacrass : public BossAI private: uint8 _currentClass; std::chrono::milliseconds _classAbilityTimer; + std::chrono::milliseconds _timeUntilNextDrainPower; std::vector _creatureIndex; }; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp index 238e94e1e4d4d2..b179c16d08b350 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp @@ -401,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()) @@ -464,7 +464,7 @@ class spell_summon_all_players_dummy: public SpellScript Position pos = GetCaster()->GetPosition(); targets.remove_if([&, pos](WorldObject* target) -> bool { - return target->IsWithinBox(pos, 18.0f, 18.0f, 18.0f); + return target->IsWithinBox(pos, 22.0f, 28.0f, 28.0f); }); } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp index 95de6bc404ec40..b415fe0d19dee0 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp @@ -381,12 +381,15 @@ 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 + void ChangeToNewPlayer() { - if (spell->Id == SPELL_ZAP_INFORM) - DoCast(caster, SPELL_ZAP_DAMAGE, true); + DoResetThreatList(); + if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true)) + me->AddThreat(target, 10000000.0f); } void UpdateAI(uint32 /*diff*/) override @@ -395,7 +398,7 @@ struct npc_zuljin_vortex : public ScriptedAI //if the vortex reach the target, it change his target to another player if (me->IsWithinMeleeRange(me->GetVictim())) - AttackStart(SelectTarget(SelectTargetMethod::Random, 0)); + ChangeToNewPlayer(); } }; @@ -431,9 +434,33 @@ class spell_claw_rage_aura : public AuraScript } }; +// 42577 - Zap +class spell_zuljin_zap : public SpellScript +{ + PrepareSpellScript(spell_zuljin_zap); + + bool Validate(SpellInfo const* /*spell*/) override + { + return ValidateSpellInfo({ SPELL_ZAP_DAMAGE }); + } + + void HandleScript(SpellEffIndex effIndex) + { + PreventHitDefaultEffect(effIndex); + if (Unit* victim = GetHitUnit()) + victim->CastSpell(GetCaster(), SPELL_ZAP_DAMAGE, true); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_zuljin_zap::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + void AddSC_boss_zuljin() { RegisterZulAmanCreatureAI(boss_zuljin); RegisterZulAmanCreatureAI(npc_zuljin_vortex); RegisterSpellScript(spell_claw_rage_aura); + RegisterSpellScript(spell_zuljin_zap); } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index 97dde689d398a5..ecc4ec01a154d3 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,162 @@ struct npc_amanishi_tempest : public ScriptedAI SummonList _summons; }; +enum AmanishiScout +{ + NPC_WORLD_TRIGGER = 22515, + POINT_DRUM = 0, + SAY_AGGRO = 0, + SPELL_ALERT_DRUMS = 42177, + SPELL_MULTI_SHOT = 43205, + SPELL_SHOOT = 16496 +}; + +inline bool IsHut(Creature* trigger) +{ + return trigger->GetPositionX() < -90.0f // South of Jan'alai area + && ((trigger->GetOrientation() > 2.7f) || (trigger->GetOrientation() < 2.7f && 1270.0f < trigger->GetPositionY() && trigger->GetPositionY() < 1280.0f)); +} + +inline bool IsDrum(Creature* trigger) +{ + return trigger->GetPositionX() < -90.0f // South of Jan'alai area + && !IsHut(trigger); +} + +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([](Creature* trigger) {return !IsDrum(trigger);}); + 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([](Creature* trigger) {return !IsHut(trigger);}); + 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 +846,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 66e3b079af9052..1004be12fa3234 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, diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp index 64a6de9a39c339..08a178be078fdb 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp @@ -268,7 +268,7 @@ class boss_halion : public CreatureScript Map::PlayerList const& playerList = me->GetMap()->GetPlayers(); for(Map::PlayerList::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr) if (Player* player = itr->GetSource()) - if (!player->IsGameMaster() && player->IsAlive() && me->GetHomePosition().GetExactDist2d(player) < 52.0f && me->IsWithinLOSInMap(player) && !player->HasInvisibilityAura() && !player->HasStealthAura() && !player->HasUnattackableAura()) + if (!player->IsGameMaster() && player->IsAlive() && me->GetHomePosition().GetExactDist2d(player) < 52.0f && me->IsWithinLOSInMap(player) && !player->HasInvisibilityAura() && !player->HasStealthAura() && !player->HasUnattackableAura() && !player->HasAura(5384)) return true; return false; } diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp index 3e739e6a458c3b..03e4c325052ae8 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp @@ -67,6 +67,7 @@ class instance_shattered_halls : public InstanceMapScript { if (TeamIdInInstance == TEAM_NEUTRAL) TeamIdInInstance = player->GetTeamId(); + } void OnCreatureCreate(Creature* creature) override @@ -84,22 +85,26 @@ class instance_shattered_halls : public InstanceMapScript case NPC_SHATTERED_EXECUTIONER: if (RescueTimer > 25 * MINUTE * IN_MILLISECONDS) creature->AddLootMode(2); - executionerGUID = creature->GetGUID(); + ExecutionerGUID = creature->GetGUID(); break; case NPC_RIFLEMAN_BROWNBEARD: if (TeamIdInInstance == TEAM_HORDE) creature->UpdateEntry(NPC_KORAG_PROUDMANE); - prisonerGUID[0] = creature->GetGUID(); + PrisonerGUID[0] = creature->GetGUID(); break; case NPC_CAPTAIN_ALINA: if (TeamIdInInstance == TEAM_HORDE) creature->UpdateEntry(NPC_CAPTAIN_BONESHATTER); - prisonerGUID[1] = creature->GetGUID(); + PrisonerGUID[1] = creature->GetGUID(); break; case NPC_PRIVATE_JACINT: if (TeamIdInInstance == TEAM_HORDE) creature->UpdateEntry(NPC_SCOUT_ORGARR); - prisonerGUID[2] = creature->GetGUID(); + PrisonerGUID[2] = creature->GetGUID(); + break; + case NPC_RANDY_WHIZZLESPROCKET: + if (TeamIdInInstance == TEAM_HORDE) + creature->UpdateEntry(NPC_DRISELLA); break; } InstanceScript::OnCreatureCreate(creature); @@ -126,9 +131,9 @@ class instance_shattered_halls : public InstanceMapScript case DATA_PRISONER_1: case DATA_PRISONER_2: case DATA_PRISONER_3: - return prisonerGUID[data - DATA_PRISONER_1]; + return PrisonerGUID[data - DATA_PRISONER_1]; case DATA_EXECUTIONER: - return executionerGUID; + return ExecutionerGUID; } return ObjectGuid::Empty; @@ -144,22 +149,22 @@ class instance_shattered_halls : public InstanceMapScript { DoRemoveAurasDueToSpellOnPlayers(SPELL_KARGATHS_EXECUTIONER_1); DoCastSpellOnPlayers(SPELL_KARGATHS_EXECUTIONER_2); - if (Creature* prisoner = instance->GetCreature(prisonerGUID[0])) + if (Creature* prisoner = instance->GetCreature(PrisonerGUID[0])) Unit::Kill(prisoner, prisoner); - if (Creature* executioner = instance->GetCreature(executionerGUID)) + if (Creature* executioner = instance->GetCreature(ExecutionerGUID)) executioner->RemoveLootMode(2); } else if ((RescueTimer / IN_MILLISECONDS) == 15 * MINUTE) { DoRemoveAurasDueToSpellOnPlayers(SPELL_KARGATHS_EXECUTIONER_2); DoCastSpellOnPlayers(SPELL_KARGATHS_EXECUTIONER_3); - if (Creature* prisoner = instance->GetCreature(prisonerGUID[1])) + if (Creature* prisoner = instance->GetCreature(PrisonerGUID[1])) Unit::Kill(prisoner, prisoner); } else if ((RescueTimer / IN_MILLISECONDS) == 0) { DoRemoveAurasDueToSpellOnPlayers(SPELL_KARGATHS_EXECUTIONER_3); - if (Creature* prisoner = instance->GetCreature(prisonerGUID[2])) + if (Creature* prisoner = instance->GetCreature(PrisonerGUID[2])) Unit::Kill(prisoner, prisoner); } } @@ -176,8 +181,8 @@ class instance_shattered_halls : public InstanceMapScript } protected: - ObjectGuid executionerGUID; - ObjectGuid prisonerGUID[3]; + ObjectGuid ExecutionerGUID; + ObjectGuid PrisonerGUID[3]; uint32 RescueTimer; TeamId TeamIdInInstance; }; diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h index 9001522a8f9167..f0c0a364720126 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h @@ -66,6 +66,11 @@ enum CreatureIds NPC_KORAG_PROUDMANE = 17295, NPC_CAPTAIN_BONESHATTER = 17296, NPC_SCOUT_ORGARR = 17297, + + //Drisella + NPC_DRISELLA = 17294, + // Randy Whizzlesprocket + NPC_RANDY_WHIZZLESPROCKET = 17288, }; enum GameobjectIds diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index a4442124c876ea..bc435c4eeeb904 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -5400,6 +5400,26 @@ class spell_pet_spellhit_expertise_spellpen_scaling : public AuraScript } }; +// 7098 - Curse of Mending +// 39647 - Curse of Mending +class spell_gen_proc_on_victim : public AuraScript +{ + PrepareAuraScript(spell_gen_proc_on_victim); + + void OnProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + + if (Unit* target = eventInfo.GetActionTarget()) + GetUnitOwner()->CastSpell(target, GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, true); + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_gen_proc_on_victim::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } +}; + void AddSC_generic_spell_scripts() { RegisterSpellScript(spell_silithyst); @@ -5559,4 +5579,5 @@ void AddSC_generic_spell_scripts() RegisterSpellScript(spell_gen_steal_weapon); RegisterSpellScript(spell_gen_set_health); RegisterSpellScript(spell_pet_spellhit_expertise_spellpen_scaling); + RegisterSpellScript(spell_gen_proc_on_victim); }