From e55c6e0ad461a355ea0bc369e27fe4ec2649400c Mon Sep 17 00:00:00 2001 From: ConorB <126167126+ConorB1745@users.noreply.github.com> Date: Sat, 12 Oct 2024 13:05:09 +0200 Subject: [PATCH] Fix(DB/SAI) Into The realm of Shadows issues (#20152) * fix(DB/SAI): Missing scripting from Dark Rider and DeathCharger Dark Rider of Acherus (id: 28768) was missing some on death scripting that controled the deathcharger (id: 28782). Use smart ai to make the deathcharger rooted in place, emote a message, remove not selectable unit flag to allow player to mount and apply 100% health to ensure deathcharger isn't at 50% health. Added the emote text to creature_text table for deathcharger. added NON_ATTACKABLE and NOT_SELECTABLE unitflags to deathcharger. Added SmartAI Script to deathcharger, so that when a passenger enters the horse unroots. Closes AzerothCore issue #20107 * fix(DB/SAI): remove redudent UPDATE * fix(DB): make sql queries comply with rules Added a delete before an insert and back ticks --- .../rev_1728239921994699100.sql | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1728239921994699100.sql diff --git a/data/sql/updates/pending_db_world/rev_1728239921994699100.sql b/data/sql/updates/pending_db_world/rev_1728239921994699100.sql new file mode 100644 index 000000000..07ceeae9a --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1728239921994699100.sql @@ -0,0 +1,21 @@ +UPDATE `creature_template` SET `unit_flags` = 33587202 WHERE (`entry` = 28782); + + +DELETE FROM `creature_text` WHERE (`CreatureID` = 28782) AND (`GroupID` = 0) AND (`ID` IN (0)); +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) +VALUES(28782, 0, 0, '%s rears up, beckoning you to ride it.', 16, 0, 100.0, 0, 0, 0, 29069, 0, 'Archerus Deathcharger'); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28768; +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28768) AND (`source_type` = 0) AND (`id` IN (6, 8, 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 +(28768, 0, 6, 8, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 19, 28782, 5, 0, 0, 0, 0, 0, 0, 'Dark Rider of Acherus - On Death - Enter Evade Mode'), +(28768, 0, 8, 9, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 0, 19, 28782, 5, 0, 0, 0, 0, 0, 0, 'Dark Rider of Acherus - On Death - Root In Place'), +(28768, 0, 9, 10, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 28782, 5, 0, 0, 0, 0, 0, 0, 'Dark Rider of Acherus - On Death - Emote Message'), +(28768, 0, 10, 11, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 19, 33554432, 0, 0, 0, 0, 0, 19, 28782, 5, 0, 0, 0, 0, 0, 0, 'Dark Rider of Acherus - On Death - Remove Not Selectable Unit Flag'), +(28768, 0, 11, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 142, 100, 0, 0, 0, 0, 0, 19, 28782, 5, 0, 0, 0, 0, 0, 0, 'Dark Rider of Acherus - On Death - Ensure Health Is Full When Revealed To Player'); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28782; + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28782) 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 +(28782, 0, 0, 0, 27, 0, 100, 512, 0, 0, 0, 0, 0, 0, 103, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Archerus DeathCharger - On Mount - Remove Root Effect');