From 018bbfc13d676ed351441c8f520676356e49145c Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Sun, 28 Apr 2019 22:43:25 +0200 Subject: [PATCH] DB/MH: improved damage handling for Baron Geddon's event --- .../custom/custom_2019_04_28_03_world.sql | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sql/updates/world/custom/custom_2019_04_28_03_world.sql diff --git a/sql/updates/world/custom/custom_2019_04_28_03_world.sql b/sql/updates/world/custom/custom_2019_04_28_03_world.sql new file mode 100644 index 00000000000..8c7b22733ed --- /dev/null +++ b/sql/updates/world/custom/custom_2019_04_28_03_world.sql @@ -0,0 +1,42 @@ +-- Creature Galrond of the Claw 40148 SAI +SET @ENTRY := 40148; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`= @ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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`, `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, 25, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 10, 384466, 0, 0, 0, 0, 0, 0, "On reset (e.g. after reaching home) - Self: Attack Creature Baron Geddon 40147 (384466) // "), +(@ENTRY, 0, 1, 2, 8, 0, 100, 0, 75072, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On spell Inferno Ping (75072) hit - Self: Talk 0 // "), +(@ENTRY, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: stop attacking // "), +(@ENTRY, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Set react state to REACT_PASSIVE // "), +(@ENTRY, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 5467.64, -2794.14, 1517.74, 0, " Linked - Self: Move to position (5467.64, -2794.14, 1517.74, 0) (point id 0) // "), +(@ENTRY, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 67, 0, 7000, 7000, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Trigger timed event #0 in 7000 - 7000 ms // "), +(@ENTRY, 0, 6, 7, 59, 0, 100, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On timed event 0 triggered - Self: Set react state to REACT_AGGRESSIVE // "), +(@ENTRY, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 10, 384466, 0, 0, 0, 0, 0, 0, " Linked - Self: Attack Creature Baron Geddon 40147 (384466) // "), +(@ENTRY, 0, 8, 0, 0, 0, 100, 0, 1000, 5000, 14000, 20000, 11, 74811, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, "When in combat and timer at the begining between 1000 and 5000 ms (and later repeats every 14000 and 20000 ms) - Self: Cast spell Swipe (74811) on Victim // "); + +-- Creature Telessra 40149 SAI +SET @ENTRY := 40149; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`= @ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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`, `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, 1, 8, 0, 100, 0, 75072, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On spell Inferno Ping (75072) hit - Self: Set react state to REACT_PASSIVE // "), +(@ENTRY, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 67, 0, 5000, 5000, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Trigger timed event #0 in 5000 - 5000 ms // "), +(@ENTRY, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: stop attacking // "), +(@ENTRY, 0, 3, 4, 59, 0, 100, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On timed event 0 triggered - Self: Set react state to REACT_AGGRESSIVE // "), +(@ENTRY, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 10, 384466, 0, 0, 0, 0, 0, 0, " Linked - Self: Attack Creature Baron Geddon 40147 (384466) // "); + +-- Creature Baron Geddon 40147 SAI +SET @ENTRY := 40147; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`= @ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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`, `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, 1, 63, 0, 100, 0, 0, 0, 0, 0, 103, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "When just created - Self: Set rooted // "), +(@ENTRY, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 42, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Set invible at 2 health or 0 percent health // "), +(@ENTRY, 0, 2, 3, 60, 0, 100, 0, 17000, 21000, 17000, 21000, 11, 74813, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Every 17000 and 21000 ms (for the first time, timer between 17000 and 21000 ms) - Self: Cast spell Inferno (74813) on Self // "), +(@ENTRY, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 75072, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, " Linked - Self: Cast spell Inferno Ping (75072) on Self // "); + +DELETE FROM `creature_sparring_template` WHERE `AttackerEntry` IN (40148, 40149, 40147); +INSERT INTO `creature_sparring_template` (`AttackerEntry`, `VictimEntry`, `HealthLimitPct`) VALUES +(40148, 40147, 85), +(40149, 40147, 85), +(40147, 40149, 85), +(40147, 40148, 85);