diff --git a/data/sql/updates/db_world/2023_07_08_00.sql b/data/sql/updates/db_world/2023_07_08_00.sql new file mode 100644 index 000000000..23f7ced41 --- /dev/null +++ b/data/sql/updates/db_world/2023_07_08_00.sql @@ -0,0 +1,5 @@ +-- DB update 2023_07_02_00 -> 2023_07_08_00 +-- Shriveling Gaze +DELETE FROM `spell_script_names` WHERE `spell_id` = 37589; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(37589,'spell_gen_shriveling_gaze'); diff --git a/data/sql/updates/db_world/2023_07_08_01.sql b/data/sql/updates/db_world/2023_07_08_01.sql new file mode 100644 index 000000000..d4f132718 --- /dev/null +++ b/data/sql/updates/db_world/2023_07_08_01.sql @@ -0,0 +1,7 @@ +-- DB update 2023_07_08_00 -> 2023_07_08_01 +-- remove old SAI trying to script mob behaviour (see AC issue for old SAI) and add simple behaviour equivalent to Riverpaw Mystic +DELETE FROM `smart_scripts` WHERE `entryorguid` = 16337 AND `source_type` = 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`, `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 +(16337, 0, 0, 0, 0, 0, 100, 0, 0, 0, 3400, 4800, 0, 11, 20802, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Blackpaw Shaman - In Combat CMC - Cast \'Lightning Bolt\''), +(16337, 0, 1, 0, 2, 0, 100, 1, 0, 30, 15000, 25000, 0, 11, 28902, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blackpaw Shaman - Between 0-30% Health - Cast \'Bloodlust\''), +(16337, 0, 2, 0, 2, 0, 100, 1, 0, 15, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Blackpaw Shaman - Between 0-15% Health - Flee For Assist (No Repeat)'); diff --git a/data/sql/updates/db_world/2023_07_08_02.sql b/data/sql/updates/db_world/2023_07_08_02.sql new file mode 100644 index 000000000..2241340b5 --- /dev/null +++ b/data/sql/updates/db_world/2023_07_08_02.sql @@ -0,0 +1,3 @@ +-- DB update 2023_07_08_01 -> 2023_07_08_02 +-- +UPDATE `smart_scripts` SET `action_param1` = 9739 WHERE `entryorguid` = 7235 AND `source_type` = 0; -- action_param1 was 5177 AKA wrong Wrath diff --git a/data/sql/updates/db_world/2023_07_08_03.sql b/data/sql/updates/db_world/2023_07_08_03.sql new file mode 100644 index 000000000..d6717f18c --- /dev/null +++ b/data/sql/updates/db_world/2023_07_08_03.sql @@ -0,0 +1,12 @@ +-- DB update 2023_07_08_02 -> 2023_07_08_03 +-- Fix Un'goro's Crystal Pylons -- +UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI' WHERE `entry` IN (164955, 164956, 164957); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 1 AND `entryorguid` IN (164955, 164956, 164957)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(164955, 1, 0, 1, 62, 0, 100, 0, 2177, 0, 0, 0, 0, 15, 4285, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Northern Crystal Pylon - On Gossip Option 0 Selected - Quest Credit \'The Northern Pylon\''), +(164955, 1, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Northern Crystal Pylon - On Gossip Option 0 Selected - Close Gossip'), +(164956, 1, 0, 1, 62, 0, 100, 0, 2179, 0, 0, 0, 0, 15, 4288, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Western Crystal Pylon - On Gossip Option 0 Selected - Quest Credit \'The Western Pylon\''), +(164956, 1, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Western Crystal Pylon - On Gossip Option 0 Selected - Close Gossip'), +(164957, 1, 0, 1, 62, 0, 100, 0, 2178, 0, 0, 0, 0, 15, 4287, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Eastern Crystal Pylon - On Gossip Option 0 Selected - Quest Credit \'The Eastern Pylon\''), +(164957, 1, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Eastern Crystal Pylon - On Gossip Option 0 Selected - Close Gossip'); diff --git a/data/sql/updates/db_world/2023_07_08_04.sql b/data/sql/updates/db_world/2023_07_08_04.sql new file mode 100644 index 000000000..42a40891e --- /dev/null +++ b/data/sql/updates/db_world/2023_07_08_04.sql @@ -0,0 +1,5 @@ +-- DB update 2023_07_08_03 -> 2023_07_08_04 +-- +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 18639 AND `id`=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`, `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 +(18639, 0, 1, 0, 13, 0, 100, 0, 9600, 16900, 0, 0, 0, 11, 32691, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Cabal Spellbinder - On Victim Casting - Cast \'Spell Shock\''); diff --git a/data/sql/updates/db_world/2023_07_08_05.sql b/data/sql/updates/db_world/2023_07_08_05.sql new file mode 100644 index 000000000..64b6302f3 --- /dev/null +++ b/data/sql/updates/db_world/2023_07_08_05.sql @@ -0,0 +1,3 @@ +-- DB update 2023_07_08_04 -> 2023_07_08_05 +-- +UPDATE `quest_offer_reward` SET `RewardText` = 'Good to hear that Lethvalin made it to safety, and that he was smart enough to ask you for help instead of just waiting there.$B$BI hope that Ranger Salissa made it safely to Farstrider Enclave.' WHERE (`ID` = 9145); diff --git a/data/sql/updates/db_world/2023_07_08_06.sql b/data/sql/updates/db_world/2023_07_08_06.sql new file mode 100644 index 000000000..da48ecb0e --- /dev/null +++ b/data/sql/updates/db_world/2023_07_08_06.sql @@ -0,0 +1,2 @@ +-- DB update 2023_07_08_05 -> 2023_07_08_06 +UPDATE `quest_offer_reward` SET `RewardText` = 'You say that you found it on one of the Scourge at Windrunner Spire and that there\'s an inscription on it? Let me see!$B$BHere, take this coin for a job well done.' WHERE (`ID` = 9175); diff --git a/data/sql/updates/db_world/2023_07_08_07.sql b/data/sql/updates/db_world/2023_07_08_07.sql new file mode 100644 index 000000000..272e242d1 --- /dev/null +++ b/data/sql/updates/db_world/2023_07_08_07.sql @@ -0,0 +1,4 @@ +-- DB update 2023_07_08_06 -> 2023_07_08_07 +-- +UPDATE `creature_model_info` SET `DisplayID_Other_Gender`=0 WHERE `DisplayID`=18309; + diff --git a/data/sql/updates/db_world/2023_07_08_08.sql b/data/sql/updates/db_world/2023_07_08_08.sql new file mode 100644 index 000000000..d1cc393a6 --- /dev/null +++ b/data/sql/updates/db_world/2023_07_08_08.sql @@ -0,0 +1,7 @@ +-- DB update 2023_07_08_07 -> 2023_07_08_08 +-- +DELETE FROM `smart_scripts` WHERE `entryorguid` = 4126 AND `source_type` = 0 AND `id` = 0; +DELETE FROM `creature_template_addon` WHERE `entry` = 4126; +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES (4126, 0, 0, 0, 1, 0, 0, '22766'); +UPDATE `smart_scripts` SET `id`=0 WHERE `entryorguid`=4126 AND `source_type`=0 AND `id`=1 AND `link`=0; + diff --git a/data/sql/updates/db_world/2023_07_08_09.sql b/data/sql/updates/db_world/2023_07_08_09.sql new file mode 100644 index 000000000..5f24f099e --- /dev/null +++ b/data/sql/updates/db_world/2023_07_08_09.sql @@ -0,0 +1,21 @@ +-- DB update 2023_07_08_08 -> 2023_07_08_09 +-- +-- Creature entry 20287, Zaxxis Ambusher +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 20287; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 20287); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(20287, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 85, 0, 0, 0, 0, 0, 0, 0, 'Zaxxis Ambusher - On Just Summoned - Start Attacking'); + +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 35282) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 29) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 20243) AND (`ConditionValue2` = 13) AND (`ConditionValue3` = 0); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 35282, 0, 0, 29, 0, 20243, 13, 0, 0, 0, 0, '', 'Shocks the Scrapped Fel Reaver\'s heart into a state that it can be salvaged.'); + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 20243) AND (`source_type` = 0) AND (`id` IN (4, 5, 6, 7, 8, 9)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(20243, 0, 4, 0, 0, 0, 100, 0, 2000, 2000, 30000, 30000, 0, 12, 20287, 2, 180000, 1, 0, 0, 8, 0, 0, 0, 0, 2587.87, 3952.51, 136.37, 2.38, 'Scrapped Fel Reaver - In Combat - Summon Creature \'Zaxxis Ambusher\''), +(20243, 0, 5, 0, 0, 0, 100, 0, 17000, 17000, 45000, 45000, 0, 12, 20287, 2, 180000, 1, 0, 0, 8, 0, 0, 0, 0, 2535.75, 3922.99, 135.58, 1.81, 'Scrapped Fel Reaver - In Combat - Summon Creature \'Zaxxis Ambusher\''), +(20243, 0, 6, 0, 0, 0, 100, 0, 32000, 32000, 45000, 45000, 0, 12, 20287, 2, 180000, 1, 0, 0, 8, 0, 0, 0, 0, 2506.46, 4008.93, 133.8, 6.19, 'Scrapped Fel Reaver - In Combat - Summon Creature \'Zaxxis Ambusher\''), +(20243, 0, 7, 0, 0, 0, 100, 0, 60000, 60000, 45000, 45000, 0, 12, 20287, 2, 180000, 1, 0, 0, 8, 0, 0, 0, 0, 2537.3, 4027.11, 135.5, 4.3, 'Scrapped Fel Reaver - In Combat - Summon Creature \'Zaxxis Ambusher\''), +(20243, 0, 8, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 9, 20287, 0, 200, 0, 0, 0, 0, 0, 'Scrapped Fel Reaver - On Just Died - Kill Target'), +(20243, 0, 9, 0, 7, 0, 100, 0, 0, 0, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 9, 20287, 0, 200, 0, 0, 0, 0, 0, 'Scrapped Fel Reaver - On Evade - Kill Target'); diff --git a/data/sql/updates/db_world/2023_07_09_00.sql b/data/sql/updates/db_world/2023_07_09_00.sql new file mode 100644 index 000000000..a4a39fae6 --- /dev/null +++ b/data/sql/updates/db_world/2023_07_09_00.sql @@ -0,0 +1,2 @@ +-- DB update 2023_07_08_09 -> 2023_07_09_00 +UPDATE `npc_text` SET `BroadcastTextID0` = 0 WHERE `ID` = 15906 AND `BroadcastTextID0` = 40591; -- Unlink incorrect broadcast text diff --git a/data/sql/updates/db_world/2023_07_09_01.sql b/data/sql/updates/db_world/2023_07_09_01.sql new file mode 100644 index 000000000..274f7657e --- /dev/null +++ b/data/sql/updates/db_world/2023_07_09_01.sql @@ -0,0 +1,3 @@ +-- DB update 2023_07_09_00 -> 2023_07_09_01 +UPDATE `creature_text` SET `Text` = 'FIRE IN THE HOLE!', `Type` = 14, `BroadcastTextId` = 32326 WHERE (`CreatureID` = 7998) AND (`GroupID` = 19) AND (`ID` = 0); +UPDATE `creature_text` SET `BroadcastTextId` = 4446 WHERE `CreatureID` = 7998 AND `GroupID` = 20 AND `ID` = 0; diff --git a/data/sql/updates/db_world/2023_07_10_00.sql b/data/sql/updates/db_world/2023_07_10_00.sql new file mode 100644 index 000000000..3dace1d24 --- /dev/null +++ b/data/sql/updates/db_world/2023_07_10_00.sql @@ -0,0 +1,27 @@ +-- DB update 2023_07_09_01 -> 2023_07_10_00 +-- +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 1782700); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(1782700, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Claw - Actionlist - Remove All Aura'), +(1782700, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Claw - Actionlist - Set Run On'), +(1782700, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 289.255, -129.7, 29.821, 2.49582, 'Claw - Actionlist - Move To Position'), +(1782700, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 2, 1660, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Claw - Actionlist - Set Faction 1660'), +(1782700, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 18, 525072, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Claw - Actionlist - Set Flags Rename & Immune To Players & Immune To NPC\'s & In Combat'), +(1782700, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 3, 0, 2289, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Claw - Actionlist - Morph To Model 2289'), +(1782700, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Claw - Actionlist - Set Npc Flag '), +(1782700, 9, 7, 0, 0, 0, 100, 0, 4000, 4000, 4000, 4000, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 290.532, -125.352, 29.6971, 1.82491, 'Claw - Actionlist - Move To Position'), +(1782700, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 3, 17894, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Claw - Actionlist - Morph To Creature Windcaller Claw'), +(1782700, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 18, 557824, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Claw - Actionlist - Set Flags Immune To Players & Immune To NPC\'s & In Combat'), +(1782700, 9, 10, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 90, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Claw - Actionlist - Set Flag Standstate Sit Down'), +(1782700, 9, 11, 0, 0, 0, 100, 0, 500, 500, 500, 500, 0, 81, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Claw - Actionlist - Set Npc Flags Gossip'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 17827); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(17827, 0, 0, 0, 0, 0, 100, 0, 7400, 7400, 20000, 20000, 0, 11, 39435, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Claw - In Combat - Cast \'Feral Charge\''), +(17827, 0, 1, 0, 0, 0, 100, 0, 2400, 2400, 10600, 21200, 0, 11, 31429, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Claw - In Combat - Cast \'Echoing Roar\''), +(17827, 0, 2, 6, 0, 0, 100, 0, 5000, 5000, 30500, 30500, 0, 11, 34971, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Claw - In Combat - Cast \'Frenzy\''), +(17827, 0, 3, 0, 0, 0, 100, 0, 5300, 5300, 11100, 21500, 0, 11, 34298, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Claw - In Combat - Cast \'Maul\''), +(17827, 0, 4, 0, 2, 0, 100, 769, 0, 20, 0, 0, 0, 80, 1782700, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Claw - Between 0-20% Health - Run Script'), +(17827, 0, 5, 0, 64, 0, 100, 512, 0, 0, 0, 0, 0, 33, 17894, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 'Claw - On Gossip Hello - Quest Credit \'Lost In Action\''), +(17827, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 17826, 100, 0, 0, 0, 0, 0, 0, 'Claw - In Combat - Say Line 0'), +(17827, 0, 7, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 42, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Claw - On Reset - Set Invincibility Hp 1'); diff --git a/data/sql/updates/db_world/2023_07_10_01.sql b/data/sql/updates/db_world/2023_07_10_01.sql new file mode 100644 index 000000000..b27b48971 --- /dev/null +++ b/data/sql/updates/db_world/2023_07_10_01.sql @@ -0,0 +1,9 @@ +-- DB update 2023_07_10_00 -> 2023_07_10_01 +-- +DELETE FROM `creature_formations` WHERE `memberGUID` IN (90978, 90979, 90980, 90981, 90982); +INSERT INTO `creature_formations` (`memberGUID`, `leaderGUID`, `groupAI`) VALUES +(90978, 90978, 3), +(90979, 90978, 3), +(90980, 90978, 3), +(90981, 90978, 3), +(90982, 90978, 3); diff --git a/data/sql/updates/db_world/2023_07_10_02.sql b/data/sql/updates/db_world/2023_07_10_02.sql new file mode 100644 index 000000000..f0333ca11 --- /dev/null +++ b/data/sql/updates/db_world/2023_07_10_02.sql @@ -0,0 +1,22 @@ +-- DB update 2023_07_10_01 -> 2023_07_10_02 +-- +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 17256); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(17256, 0, 0, 0, 0, 0, 100, 0, 20900, 28200, 12100, 19400, 0, 11, 30510, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Channeler - In Combat - Cast \'Shadow Bolt Volley\''), +(17256, 0, 1, 0, 74, 0, 100, 0, 0, 50, 14500, 15000, 30, 11, 30528, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Channeler - On Friendly Between 0-50% Health - Cast \'Dark Mending\''), +(17256, 0, 2, 0, 0, 0, 100, 0, 6000, 12000, 17000, 28000, 0, 11, 30530, 0, 0, 0, 0, 0, 6, 30, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Channeler - In Combat - Cast \'Fear\''), +(17256, 0, 3, 0, 0, 0, 100, 0, 19650, 63350, 60000, 60000, 0, 11, 30511, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Channeler - In Combat - Cast \'Burning Abyssal\''), +(17256, 0, 4, 0, 1, 0, 100, 0, 3600, 3600, 3600, 3600, 0, 11, 30207, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Channeler - Out of Combat - Cast \'Shadow Grasp\''), +(17256, 0, 5, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 11, 30531, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Channeler - On Just Died - Cast \'Soul Transfer\''), +(17256, 0, 6, 0, 4, 0, 100, 512, 0, 0, 0, 0, 0, 34, 10, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Channeler - On Aggro - Set Instance Data 10 to 1'), +(17256, 0, 7, 0, 25, 0, 100, 512, 0, 0, 0, 0, 0, 8, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Channeler - On Reset - Set Reactstate Defensive'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 18829); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(18829, 0, 0, 0, 0, 0, 100, 0, 10050, 26400, 13350, 23100, 0, 11, 39175, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Warder - In Combat - Cast \'Shadow Bolt Volley\''), +(18829, 0, 1, 0, 0, 0, 100, 0, 10600, 16100, 12100, 26700, 0, 11, 34437, 0, 0, 0, 0, 0, 5, 30, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Warder - In Combat - Cast \'Death Coil\''), +(18829, 0, 2, 0, 0, 0, 100, 0, 8200, 8800, 12150, 19450, 0, 11, 34435, 0, 0, 0, 0, 0, 5, 40, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Warder - In Combat - Cast \'Rain of Fire\''), +(18829, 0, 3, 0, 0, 0, 100, 0, 8200, 8800, 18200, 30350, 0, 11, 34436, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Warder - In Combat - Cast \'Shadow Burst\''), +(18829, 0, 4, 0, 0, 0, 100, 0, 19750, 25200, 8500, 18200, 0, 11, 34439, 32, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Warder - In Combat - Cast \'Unstable Affliction\''), +(18829, 0, 5, 0, 0, 0, 100, 0, 10600, 16100, 26700, 29100, 0, 11, 34441, 32, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Warder - In Combat - Cast \'Shadow Word: Pain\''), +(18829, 0, 6, 0, 31, 0, 100, 512, 34439, 0, 0, 0, 0, 13, 0, 100, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Warder - On Target Spellhit \'Unstable Affliction\' - Reset Threat'); diff --git a/data/sql/updates/db_world/2023_07_10_03.sql b/data/sql/updates/db_world/2023_07_10_03.sql new file mode 100644 index 000000000..54929900b --- /dev/null +++ b/data/sql/updates/db_world/2023_07_10_03.sql @@ -0,0 +1,3 @@ +-- DB update 2023_07_10_02 -> 2023_07_10_03 +-- +UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`&~(64|2048|536870912) WHERE `entry` = 17454; diff --git a/data/sql/updates/db_world/2023_07_11_00.sql b/data/sql/updates/db_world/2023_07_11_00.sql new file mode 100644 index 000000000..8f995a382 --- /dev/null +++ b/data/sql/updates/db_world/2023_07_11_00.sql @@ -0,0 +1,78 @@ +-- DB update 2023_07_10_03 -> 2023_07_11_00 +-- Old Hillsbrad Foothills +UPDATE `creature_loot_template` SET `GroupID` = 7 WHERE `Entry` = 20531 AND `Item` IN ( +27904, -- Resounding Ring of Glory +28401, -- Hauberk of Desolation +28191, -- Mana-Etched Vestments +28344, -- Wyrmfury Pauldrons +27911, -- Epoch's Whispering Cinch +28224 -- Wastewalker Helm +); +-- Mana-Tombs +UPDATE `creature_loot_template` SET `GroupID` = 6 WHERE `Entry` = 20266 AND `Item` IN ( +27843, -- Glyph-Lined Sash +27798, -- Gauntlets of Vindication +27842, -- Grand Scepter of the Nexus-Kings +28400, -- Warp-Storm Warblade +27844, -- Pauldrons of Swift Retribution +27840 -- Scepter of Shatar +); +-- The Underbog +DELETE FROM `creature_loot_template` WHERE (`Entry` = 20184) AND (`Item` = 43001) AND (`Reference` = 43001); +DELETE FROM `reference_loot_template` WHERE (`Entry` = 43001); +DELETE FROM `creature_loot_template` WHERE `Item` IN (27768,27769,27770,27771,27772,27773,27779,27780,27781,27896,27907,27938); +INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(20184, 27768, 0, 0, 0, 1, 5, 1, 1, 'The Black Stalker (1) - Oracle Belt of Timeless Mystery'), +(20184, 27769, 0, 0, 0, 1, 5, 1, 1, 'The Black Stalker (1) - Endbringer'), +(20184, 27770, 0, 0, 0, 1, 5, 1, 1, 'The Black Stalker (1) - Argussian Compass'), +(20184, 27771, 0, 0, 0, 1, 5, 1, 1, 'The Black Stalker (1) - Doomplate Shoulderguards'), +(20184, 27772, 0, 0, 0, 1, 5, 1, 1, 'The Black Stalker (1) - Stormshield of Renewal'), +(20184, 27773, 0, 0, 0, 1, 5, 1, 1, 'The Black Stalker (1) - Barbaric Legstraps'), +(20184, 27779, 0, 0, 0, 1, 2, 1, 1, 'The Black Stalker (1) - Bone Chain Necklace'), +(20184, 27780, 0, 0, 0, 1, 2, 1, 1, 'The Black Stalker (1) - Ring of Fabled Hope'), +(20184, 27781, 0, 0, 0, 1, 2, 1, 1, 'The Black Stalker (1) - Demonfang Ritual Helm'), +(20184, 27896, 0, 0, 0, 1, 2, 1, 1, 'The Black Stalker (1) - Alembic of Infernal Power'), +(20184, 27907, 0, 0, 0, 1, 2, 1, 1, 'The Black Stalker (1) - Mana-Etched Pantaloons'), +(20184, 27938, 0, 0, 0, 1, 2, 1, 1, 'The Black Stalker (1) - Savage Mask of the Lynx Lord'); +-- The Slave Pens +DELETE FROM `creature_loot_template` WHERE (`Entry` = 19894) AND (`Item` IN (31882, 31892, 31901, 31910)); +UPDATE `creature_loot_template` SET `GroupID` = 5 WHERE `Entry` = 19894 AND `Item` IN ( +27741, -- Bleeding Hollow Warhammer +27742, -- Mage-Fury Girdle +27800, -- Earthsoul Britches +28337, -- Breastplate of Righteous Fury +27796, -- Mana-Etched Spaulders +27740 -- Band of Ursol +); +-- The Blood Furnace +UPDATE `creature_loot_template` SET `GroupID` = 6 WHERE `Entry` = 18607 AND `Item` IN ( +27494, -- Emerald Eye Bracer +27505, -- Ruby Helm of the Just +27507, -- Adamantine Repeater +27495, -- Soldier's Dog Tag +27497, -- Doomplate Gauntlets +27506 -- Robe of Effervescent Light +); +-- Hellfire Ramparts / Omor the Breaker +UPDATE `creature_loot_template` SET `GroupID` = 5 WHERE `Entry` = 18433 AND `Item` IN ( +27463, -- Terror Flame Dagger +27465, -- Mana-Etched Gloves +27464, -- Omor's Unyielding Will +27462, -- Crimson Bracers of Gloom +27466, -- Headdress of Alacricity +27467 -- Silent-Strider Kneeboots +); +-- Hellfire Ramparts / Reinforced Fel Iron Chest +DELETE FROM `gameobject_loot_template` WHERE (`Entry` = 21764) AND (`Item` IN (1, 2, 3, 4)); +INSERT INTO `gameobject_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(21764, 1, 35093, 100, 0, 1, 1, 1, 2, 'Reinforced Fel Iron Chest - (ReferenceTable)'), +(21764, 2, 35093, 100, 0, 1, 2, 1, 1, 'Reinforced Fel Iron Chest - (ReferenceTable)'), +(21764, 3, 35094, 30, 0, 1, 0, 1, 1, 'Reinforced Fel Iron Chest - (ReferenceTable)'), +(21764, 4, 25009, 100, 0, 1, 0, 1, 1, 'Reinforced Fel Iron Chest - (ReferenceTable)'); +UPDATE `reference_loot_template` SET `GroupID` = 2 WHERE `Entry` = 35093 AND `Item` IN ( +27455, -- Irondrake Faceguard +27453, -- Averinn's Ring of Slaying +27452, -- Light Scribe Bands +27454, -- Volcanic Pauldrons +27456 -- Raiments of Nature's Breath +); diff --git a/data/sql/updates/db_world/2023_07_11_01.sql b/data/sql/updates/db_world/2023_07_11_01.sql new file mode 100644 index 000000000..c799be6ef --- /dev/null +++ b/data/sql/updates/db_world/2023_07_11_01.sql @@ -0,0 +1,6 @@ +-- DB update 2023_07_11_00 -> 2023_07_11_01 +-- +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = 30658 AND `spell_effect` = 30571; +DELETE FROM `spell_script_names` WHERE `ScriptName` = ('spell_magtheridon_quake'); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(30658, 'spell_magtheridon_quake'); diff --git a/data/sql/updates/db_world/2023_07_11_02.sql b/data/sql/updates/db_world/2023_07_11_02.sql new file mode 100644 index 000000000..3325a9efd --- /dev/null +++ b/data/sql/updates/db_world/2023_07_11_02.sql @@ -0,0 +1,7 @@ +-- DB update 2023_07_11_01 -> 2023_07_11_02 +-- +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 20757); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(20757, 0, 0, 0, 0, 0, 100, 0, 3000, 4800, 12000, 16000, 0, 11, 33245, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Fingrom - In Combat - Cast \'Ice Barrier\''), +(20757, 0, 1, 0, 9, 0, 100, 0, 0, 10, 5000, 11000, 1, 11, 17145, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Fingrom - Within 0-10 Range - Cast \'Blast Wave\''), +(20757, 0, 2, 0, 0, 0, 100, 0, 0, 0, 3400, 4800, 0, 11, 15242, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Fingrom - In Combat - Cast \'Fireball\''); diff --git a/data/sql/updates/db_world/2023_07_11_03.sql b/data/sql/updates/db_world/2023_07_11_03.sql new file mode 100644 index 000000000..10ffd1fb0 --- /dev/null +++ b/data/sql/updates/db_world/2023_07_11_03.sql @@ -0,0 +1,4 @@ +-- DB update 2023_07_11_02 -> 2023_07_11_03 +-- +UPDATE `creature_template` SET `lootid`=0 WHERE `entry`=17256; + diff --git a/data/sql/updates/db_world/2023_07_12_00.sql b/data/sql/updates/db_world/2023_07_12_00.sql new file mode 100644 index 000000000..8696f6a17 --- /dev/null +++ b/data/sql/updates/db_world/2023_07_12_00.sql @@ -0,0 +1,4 @@ +-- DB update 2023_07_11_03 -> 2023_07_12_00 +-- Mosh'Ogg Witch Doctor SAI flag correction +UPDATE `smart_scripts` SET `event_flags`=0 WHERE `entryorguid`=1144 AND `source_type`=0 AND `id`=0 AND `link`=0; +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=1144 AND `source_type`=0 AND `id`=1 AND `link`=0; diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index a4b218b36..fef69d6ef 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -3167,3 +3167,8 @@ GuidUnorderedSet const& WorldObject::GetAllowedLooters() const { return _allowedLooters; } + +void WorldObject::RemoveAllowedLooter(ObjectGuid guid) +{ + _allowedLooters.erase(guid); +} diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index ac72ba3b0..8a75f3d87 100644 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -614,6 +614,7 @@ public: void SetAllowedLooters(GuidUnorderedSet const looters); [[nodiscard]] bool HasAllowedLooter(ObjectGuid guid) const; [[nodiscard]] GuidUnorderedSet const& GetAllowedLooters() const; + void RemoveAllowedLooter(ObjectGuid guid); std::string GetDebugInfo() const override; diff --git a/src/server/game/Entities/Player/PlayerGossip.cpp b/src/server/game/Entities/Player/PlayerGossip.cpp index e6fcb518c..77bc1901a 100644 --- a/src/server/game/Entities/Player/PlayerGossip.cpp +++ b/src/server/game/Entities/Player/PlayerGossip.cpp @@ -164,33 +164,31 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool if (canTalk) { + // using gossip_menu_option texts by default + std::string strOptionText = itr->second.OptionText; + std::string strBoxText = itr->second.BoxText; // search in broadcast_text and broadcast_text_locale - std::string strOptionText, strBoxText; BroadcastText const* optionBroadcastText = sObjectMgr->GetBroadcastText(itr->second.OptionBroadcastTextID); BroadcastText const* boxBroadcastText = sObjectMgr->GetBroadcastText(itr->second.BoxBroadcastTextID); LocaleConstant locale = GetSession()->GetSessionDbLocaleIndex(); if (optionBroadcastText) ObjectMgr::GetLocaleString(getGender() == GENDER_MALE ? optionBroadcastText->MaleText : optionBroadcastText->FemaleText, locale, strOptionText); - else - strOptionText = itr->second.OptionText; if (boxBroadcastText) ObjectMgr::GetLocaleString(getGender() == GENDER_MALE ? boxBroadcastText->MaleText : boxBroadcastText->FemaleText, locale, strBoxText); - else - strBoxText = itr->second.BoxText; // if the language is not default and the texts weren't found, maybe they're in gossip_menu_option_locale table if (locale != DEFAULT_LOCALE) { - if (strOptionText.empty()) + if (!optionBroadcastText) { /// Find localizations from database. if (GossipMenuItemsLocale const* gossipMenuLocale = sObjectMgr->GetGossipMenuItemsLocale(MAKE_PAIR32(menuId, itr->second.OptionID))) ObjectMgr::GetLocaleString(gossipMenuLocale->OptionText, locale, strOptionText); } - if (strBoxText.empty()) + if (!boxBroadcastText) { /// Find localizations from database. if (GossipMenuItemsLocale const* gossipMenuLocale = sObjectMgr->GetGossipMenuItemsLocale(MAKE_PAIR32(menuId, itr->second.OptionID))) diff --git a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp index 16eb9e89a..146080b63 100644 --- a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp +++ b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp @@ -87,11 +87,11 @@ struct boss_gruul : public BossAI _caveInTimer = _caveInTimer - 1500ms; } context.Repeat(_caveInTimer); - }).Schedule(20s, [this](TaskContext context) + }).Schedule(39900ms, 55700ms, [this](TaskContext context) { DoCastSelf(SPELL_REVERBERATION); - context.Repeat(22s); - }).Schedule(10s, [this](TaskContext context) + context.Repeat(39900ms, 55700ms); + }).Schedule(5600ms, [this](TaskContext context) { if (Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 1, 5.0f)) { @@ -101,7 +101,7 @@ struct boss_gruul : public BossAI { DoCastVictim(SPELL_HURTFUL_STRIKE); } - context.Repeat(15s); + context.Repeat(8400ms); }).Schedule(35s, [this](TaskContext context) { Talk(SAY_SLAM); diff --git a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp index b59eeec83..71ce4f2cd 100644 --- a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp +++ b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp @@ -85,7 +85,7 @@ struct boss_high_king_maulgar : public BossAI context.Repeat(35s); }).Schedule(0ms, [this](TaskContext context) { - DoCastSelf(SPELL_ROAR); + DoCastVictim(SPELL_ROAR); context.Repeat(20600ms, 29100ms); }); }); diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp index 025fc4fbb..9683d04dc 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp @@ -66,7 +66,7 @@ struct boss_vazruden_the_herald : public BossAI void Reset() override { - BossAI::Reset(); + _Reset(); me->SetVisible(true); me->SetReactState(REACT_PASSIVE); me->SummonCreature(NPC_HELLFIRE_SENTRY, -1372.56f, 1724.31f, 82.967f, 5.3058f); @@ -253,6 +253,7 @@ struct boss_vazruden : public ScriptedAI void Reset() override { + _scheduler.CancelAll(); _nazanCalled = false; } diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index 077dbd977..d537d9a50 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -18,6 +18,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellInfo.h" +#include "TaskScheduler.h" #include "magtheridons_lair.h" enum Yells @@ -49,6 +50,7 @@ enum Spells SPELL_SHADOW_GRASP_VISUAL = 30166, SPELL_MIND_EXHAUSTION = 44032, SPELL_QUAKE = 30657, + SPELL_QUAKE_KNOCKBACK = 30571, SPELL_COLLAPSE_DAMAGE = 36449, SPELL_CAMERA_SHAKE = 36455, SPELL_DEBRIS_VISUAL = 30632, @@ -77,232 +79,221 @@ private: ObjectGuid _targetGUID; }; -class boss_magtheridon : public CreatureScript +struct boss_magtheridon : public BossAI { -public: - boss_magtheridon() : CreatureScript("boss_magtheridon") { } - - struct boss_magtheridonAI : public BossAI + boss_magtheridon(Creature* creature) : BossAI(creature, TYPE_MAGTHERIDON) { - boss_magtheridonAI(Creature* creature) : BossAI(creature, TYPE_MAGTHERIDON) + scheduler.SetValidator([this] { - scheduler.SetValidator([this] + return !me->HasUnitState(UNIT_STATE_CASTING); + }); + } + + void Reset() override + { + BossAI::Reset(); + _currentPhase = 0; + _recentlySpoken = false; + _interruptScheduler.CancelAll(); + scheduler.Schedule(90s, [this](TaskContext context) + { + Talk(SAY_TAUNT); + context.Repeat(90s); + }); + DoCastSelf(SPELL_SHADOW_CAGE, true); + me->SetReactState(REACT_PASSIVE); + me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + me->SetImmuneToPC(true); + + ScheduleHealthCheckEvent(30, [&] + { + _currentPhase = 1; + Talk(SAY_PHASE3); + me->GetMotionMaster()->Clear(); + scheduler.DelayAll(18s); + scheduler.Schedule(8s, [this](TaskContext /*context*/) { - return !me->HasUnitState(UNIT_STATE_CASTING); + DoCastSelf(SPELL_CAMERA_SHAKE, true); + instance->SetData(DATA_COLLAPSE, GO_STATE_ACTIVE); + }).Schedule(15s, [this](TaskContext /*context*/) + { + DoCastSelf(SPELL_COLLAPSE_DAMAGE, true); + me->resetAttackTimer(); + me->GetMotionMaster()->MoveChase(me->GetVictim()); + _currentPhase = 0; + scheduler.Schedule(20s, [this](TaskContext context) + { + if (Unit* target = SelectTarget(SelectTargetMethod::Random)) + { + target->CastSpell(target, SPELL_DEBRIS_VISUAL, true, nullptr, nullptr, me->GetGUID()); + me->m_Events.AddEvent(new DealDebrisDamage(*me, target->GetGUID()), me->m_Events.CalculateTime(5000)); + } + context.Repeat(20s); + }); }); + }); + } + + void KilledUnit(Unit* /*victim*/) override + { + if (!_recentlySpoken) + { + Talk(SAY_SLAY); + _recentlySpoken = true; } - void Reset() override + scheduler.Schedule(5s, [this](TaskContext /*context*/) { - _Reset(); - _currentPhase = 0; _recentlySpoken = false; - scheduler.Schedule(90s, [this](TaskContext context) - { - Talk(SAY_TAUNT); - context.Repeat(90s); - }); - me->CastSpell(me, SPELL_SHADOW_CAGE, true); - me->SetReactState(REACT_PASSIVE); - me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - me->SetImmuneToPC(true); + }); + } - ScheduleHealthCheckEvent(30, [&] { - _currentPhase = 1; - Talk(SAY_PHASE3); - me->GetMotionMaster()->Clear(); - scheduler.DelayAll(18s); - scheduler.Schedule(8s, [this](TaskContext /*context*/) + void JustDied(Unit* killer) override + { + Talk(SAY_DEATH); + BossAI::JustDied(killer); + } + + void JustEngagedWith(Unit* who) override + { + BossAI::JustEngagedWith(who); + Talk(SAY_EMOTE_BEGIN); + + scheduler.Schedule(60s, [this](TaskContext /*context*/) + { + Talk(SAY_EMOTE_NEARLY); + }).Schedule(120s, [this](TaskContext /*context*/) + { + Talk(SAY_EMOTE_FREE); + }).Schedule(123s, [this](TaskContext /*context*/) + { + me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + me->SetImmuneToPC(false); + me->SetReactState(REACT_AGGRESSIVE); + instance->SetData(DATA_ACTIVATE_CUBES, 1); + me->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE); + + scheduler.Schedule(9s, [this](TaskContext context) + { + DoCastVictim(SPELL_CLEAVE); + context.Repeat(1200ms, 16300ms); + }).Schedule(20s, [this](TaskContext context) + { + me->CastCustomSpell(SPELL_BLAZE, SPELLVALUE_MAX_TARGETS, 1); + context.Repeat(11s, 39s); + }).Schedule(40s, [this](TaskContext context) + { + DoCastSelf(SPELL_QUAKE); //needs fixes with custom spell + scheduler.Schedule(7s, [this](TaskContext /*context*/) { - DoCastSelf(SPELL_CAMERA_SHAKE, true); - instance->SetData(DATA_COLLAPSE, GO_STATE_ACTIVE); - }).Schedule(15s, [this](TaskContext /*context*/) - { - DoCastSelf(SPELL_COLLAPSE_DAMAGE, true); - me->resetAttackTimer(); - me->GetMotionMaster()->MoveChase(me->GetVictim()); - _currentPhase = 0; - scheduler.Schedule(20s, [this](TaskContext context) + DoCastSelf(SPELL_BLAST_NOVA); + + _interruptScheduler.Schedule(50ms, GROUP_INTERRUPT_CHECK, [this](TaskContext context) { - if (Unit* target = SelectTarget(SelectTargetMethod::Random)) - { - target->CastSpell(target, SPELL_DEBRIS_VISUAL, true, nullptr, nullptr, me->GetGUID()); - me->m_Events.AddEvent(new DealDebrisDamage(*me, target->GetGUID()), me->m_Events.CalculateTime(5000)); - } - context.Repeat(20s); - }); - }); - }); - } - - void KilledUnit(Unit* /*victim*/) override - { - if(!_recentlySpoken) - { - Talk(SAY_SLAY); - _recentlySpoken = true; - } - - scheduler.Schedule(5s, [this](TaskContext /*context*/) - { - _recentlySpoken = false; - }); - } - - void JustDied(Unit* /*killer*/) override - { - _JustDied(); - Talk(SAY_DEATH); - } - - void JustEngagedWith(Unit* /*who*/) override - { - _JustEngagedWith(); - Talk(SAY_EMOTE_BEGIN); - - scheduler.Schedule(60s, [this](TaskContext /*context*/) - { - Talk(SAY_EMOTE_NEARLY); - }).Schedule(120s, [this](TaskContext /*context*/) - { - Talk(SAY_EMOTE_FREE); - }).Schedule(123s, [this](TaskContext /*context*/) - { - me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - me->SetImmuneToPC(false); - me->SetReactState(REACT_AGGRESSIVE); - instance->SetData(DATA_ACTIVATE_CUBES, 1); - me->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE); - - scheduler.Schedule(9s, [this](TaskContext context) - { - DoCastVictim(SPELL_CLEAVE); - context.Repeat(10s); - }).Schedule(10s, [this](TaskContext context) - { - me->CastCustomSpell(SPELL_BLAZE, SPELLVALUE_MAX_TARGETS, 1); - context.Repeat(30s); - }).Schedule(40s, [this](TaskContext context) - { - me->CastSpell(me, SPELL_QUAKE); //needs fixes with custom spell - scheduler.Schedule(7s, [this](TaskContext /*context*/) - { - DoCastSelf(SPELL_BLAST_NOVA); - - scheduler.Schedule(50ms, GROUP_INTERRUPT_CHECK, [this](TaskContext context) - { - if (me->GetAuraCount(SPELL_SHADOW_GRASP_VISUAL) == 5) - { - Talk(SAY_BANISH); - me->InterruptNonMeleeSpells(true); - scheduler.CancelGroup(GROUP_INTERRUPT_CHECK); - } - context.Repeat(50ms); - }).Schedule(12s, GROUP_INTERRUPT_CHECK, [this](TaskContext /*context*/) + if (me->GetAuraCount(SPELL_SHADOW_GRASP_VISUAL) == 5) { + Talk(SAY_BANISH); + me->InterruptNonMeleeSpells(true); scheduler.CancelGroup(GROUP_INTERRUPT_CHECK); - }); + } + else + context.Repeat(50ms); + }).Schedule(12s, GROUP_INTERRUPT_CHECK, [this](TaskContext /*context*/) + { + _interruptScheduler.CancelGroup(GROUP_INTERRUPT_CHECK); }); - context.Repeat(50s); - }).Schedule(1320s, [this](TaskContext /*context*/) - { - DoCastSelf(SPELL_BERSERK, true); }); - }); - } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; - - scheduler.Update(diff); - - if (_currentPhase != 1) + context.Repeat(53s, 56s); + }).Schedule(1320s, [this](TaskContext /*context*/) { - DoMeleeAttackIfReady(); - } - } - private: - bool _recentlySpoken; - uint8 _currentPhase; - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return GetMagtheridonsLairAI(creature); + DoCastSelf(SPELL_BERSERK, true); + }); + }); } + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + return; + + scheduler.Update(diff); + _interruptScheduler.Update(diff); + + if (_currentPhase != 1) + { + DoMeleeAttackIfReady(); + } + } + +private: + bool _recentlySpoken; + uint8 _currentPhase; + TaskScheduler _interruptScheduler; }; -class spell_magtheridon_blaze : public SpellScriptLoader +class spell_magtheridon_blaze : public SpellScript { -public: - spell_magtheridon_blaze() : SpellScriptLoader("spell_magtheridon_blaze") { } + PrepareSpellScript(spell_magtheridon_blaze); - class spell_magtheridon_blaze_SpellScript : public SpellScript + void HandleScriptEffect(SpellEffIndex /*effIndex*/) { - PrepareSpellScript(spell_magtheridon_blaze_SpellScript); + if (Unit* target = GetHitUnit()) + target->CastSpell(target, SPELL_BLAZE_SUMMON, true); + } - void HandleScriptEffect(SpellEffIndex /*effIndex*/) - { - if (Unit* target = GetHitUnit()) - target->CastSpell(target, SPELL_BLAZE_SUMMON, true); - } - - void Register() override - { - OnEffectHitTarget += SpellEffectFn(spell_magtheridon_blaze_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); - } - }; - - SpellScript* GetSpellScript() const override + void Register() override { - return new spell_magtheridon_blaze_SpellScript(); + OnEffectHitTarget += SpellEffectFn(spell_magtheridon_blaze::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } }; -class spell_magtheridon_shadow_grasp : public SpellScriptLoader +class spell_magtheridon_shadow_grasp : public AuraScript { -public: - spell_magtheridon_shadow_grasp() : SpellScriptLoader("spell_magtheridon_shadow_grasp") { } + PrepareAuraScript(spell_magtheridon_shadow_grasp); - class spell_magtheridon_shadow_grasp_AuraScript : public AuraScript + void HandleDummyApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { - PrepareAuraScript(spell_magtheridon_shadow_grasp_AuraScript) + GetUnitOwner()->CastSpell((Unit*)nullptr, SPELL_SHADOW_GRASP_VISUAL, false); + } - void HandleDummyApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) - { - GetUnitOwner()->CastSpell((Unit*)nullptr, SPELL_SHADOW_GRASP_VISUAL, false); - } - - void HandleDummyRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) - { - GetUnitOwner()->InterruptNonMeleeSpells(true); - } - - void HandlePeriodicRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) - { - GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_MIND_EXHAUSTION, true); - } - - void Register() override - { - OnEffectApply += AuraEffectApplyFn(spell_magtheridon_shadow_grasp_AuraScript::HandleDummyApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); - OnEffectRemove += AuraEffectRemoveFn(spell_magtheridon_shadow_grasp_AuraScript::HandleDummyRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); - OnEffectRemove += AuraEffectRemoveFn(spell_magtheridon_shadow_grasp_AuraScript::HandlePeriodicRemove, EFFECT_1, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL); - } - }; - - AuraScript* GetAuraScript() const override + void HandleDummyRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { - return new spell_magtheridon_shadow_grasp_AuraScript(); + GetUnitOwner()->InterruptNonMeleeSpells(true); + } + + void HandlePeriodicRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_MIND_EXHAUSTION, true); + } + + void Register() override + { + OnEffectApply += AuraEffectApplyFn(spell_magtheridon_shadow_grasp::HandleDummyApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + OnEffectRemove += AuraEffectRemoveFn(spell_magtheridon_shadow_grasp::HandleDummyRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + OnEffectRemove += AuraEffectRemoveFn(spell_magtheridon_shadow_grasp::HandlePeriodicRemove, EFFECT_1, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL); + } +}; + +class spell_magtheridon_quake : public SpellScript +{ + PrepareSpellScript(spell_magtheridon_quake); + + void HandleHit() + { + if (urand(0, 3) == 0) + GetCaster()->CastSpell(GetCaster(), SPELL_QUAKE_KNOCKBACK, true); + } + + void Register() override + { + OnHit += SpellHitFn(spell_magtheridon_quake::HandleHit); } }; void AddSC_boss_magtheridon() { - new boss_magtheridon(); - new spell_magtheridon_blaze(); - new spell_magtheridon_shadow_grasp(); + RegisterMagtheridonsLairCreatureAI(boss_magtheridon); + RegisterSpellScript(spell_magtheridon_blaze); + RegisterSpellScript(spell_magtheridon_shadow_grasp); + RegisterSpellScript(spell_magtheridon_quake); } diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h index 9f38598fc..fe6fccf97 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h @@ -62,4 +62,6 @@ inline AI* GetMagtheridonsLairAI(T* obj) return GetInstanceAI(obj, MagtheridonsLairScriptName); } +#define RegisterMagtheridonsLairCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetMagtheridonsLairAI) + #endif diff --git a/src/server/scripts/Outland/boss_doomwalker.cpp b/src/server/scripts/Outland/boss_doomwalker.cpp index 1838b9835..de61c6877 100644 --- a/src/server/scripts/Outland/boss_doomwalker.cpp +++ b/src/server/scripts/Outland/boss_doomwalker.cpp @@ -50,6 +50,7 @@ public: void Reset() override { _inEnrage = false; + _scheduler.CancelAll(); } void KilledUnit(Unit* victim) override diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp index effc40527..76d65a417 100644 --- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp +++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp @@ -234,7 +234,8 @@ enum WoundedBloodElf SAY_ELF_AGGRO = 5, QUEST_ROAD_TO_FALCON_WATCH = 9375, NPC_HAALESHI_WINDWALKER = 16966, - NPC_HAALESHI_TALONGUARD = 16967 + NPC_HAALESHI_TALONGUARD = 16967, + ARAKKOA_CAGE = 181664 }; class npc_wounded_blood_elf : public CreatureScript @@ -246,7 +247,11 @@ public: { npc_wounded_blood_elfAI(Creature* creature) : npc_escortAI(creature) { } - void Reset() override { } + void Reset() override + { + me->SetReactState(REACT_PASSIVE); + me->FindNearestGameObject(ARAKKOA_CAGE, 10.0f)->SetGoState(GO_STATE_READY); + } void JustEngagedWith(Unit* /*who*/) override { @@ -263,6 +268,7 @@ public: { if (quest->GetQuestId() == QUEST_ROAD_TO_FALCON_WATCH) { + me->SetReactState(REACT_AGGRESSIVE); me->SetFaction(FACTION_ESCORTEE_H_PASSIVE); npc_escortAI::Start(true, false, player->GetGUID()); } @@ -278,6 +284,7 @@ public: { case 0: Talk(SAY_ELF_START, player); + me->FindNearestGameObject(ARAKKOA_CAGE, 10.0f)->SetGoState(GO_STATE_ACTIVE); break; case 9: Talk(SAY_ELF_SUMMON1, player); diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 0acf396ff..4001a5327 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -4814,6 +4814,7 @@ class spell_freezing_circle : public SpellScript } }; +// 35385 - Threshalisk Charge enum Threshalisk { SPELL_THRESHALISK_CHARGE = 35385, @@ -4849,6 +4850,40 @@ class spell_gen_threshalisk_charge : public SpellScript } }; +// 37589 - Shriveling Gaze +enum ShrivelingGaze +{ + SPELL_SHRIVELING_GAZE = 37589, + SPELL_SHRIVELING_GAZE_REMOVAL = 30023, // Serverside - Gushing Wound Removal +}; + +class spell_gen_shriveling_gaze : public AuraScript +{ + PrepareAuraScript(spell_gen_shriveling_gaze); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_SHRIVELING_GAZE }); + } + + void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + ModStackAmount(20); + } + + void OnPeriodic(AuraEffect const* /*aurEff*/) + { + PreventDefaultAction(); + ModStackAmount(-1); + } + + void Register() override + { + OnEffectApply += AuraEffectApplyFn(spell_gen_shriveling_gaze::HandleApply, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL); + OnEffectPeriodic += AuraEffectPeriodicFn(spell_gen_shriveling_gaze::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } +}; + void AddSC_generic_spell_scripts() { RegisterSpellScript(spell_silithyst); @@ -4993,4 +5028,5 @@ void AddSC_generic_spell_scripts() RegisterSpellScript(spell_gen_basic_campfire); RegisterSpellScript(spell_freezing_circle); RegisterSpellScript(spell_gen_threshalisk_charge); + RegisterSpellScript(spell_gen_shriveling_gaze); }