From 4619124291b282870813410fccfc52fd2b17201b Mon Sep 17 00:00:00 2001 From: ratkosrb Date: Sat, 16 Sep 2023 13:03:08 +0300 Subject: [PATCH] Unsummon guardians when Isalien evades. --- sql/migrations/20230916100208_world.sql | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sql/migrations/20230916100208_world.sql diff --git a/sql/migrations/20230916100208_world.sql b/sql/migrations/20230916100208_world.sql new file mode 100644 index 00000000000..ac365cb3c58 --- /dev/null +++ b/sql/migrations/20230916100208_world.sql @@ -0,0 +1,29 @@ +DROP PROCEDURE IF EXISTS add_migration; +delimiter ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20230916100208'); +IF v=0 THEN +INSERT INTO `migrations` VALUES ('20230916100208'); +-- Add your query below. + + +-- Events list for Isalien +DELETE FROM `creature_ai_events` WHERE `creature_id`=16097; +INSERT INTO `creature_ai_events` (`id`, `creature_id`, `condition_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_script`, `action2_script`, `action3_script`, `comment`) VALUES (1609701, 16097, 0, 4, 0, 100, 0, 0, 0, 0, 0, 1609701, 0, 0, 'Isalien - Remove Auras on Aggro'); +INSERT INTO `creature_ai_events` (`id`, `creature_id`, `condition_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_script`, `action2_script`, `action3_script`, `comment`) VALUES (1609702, 16097, 0, 11, 0, 100, 1, 0, 0, 0, 0, 1609702, 0, 0, 'Isalien - Yell Text and Cast Immune All and Ghost Visual on Spawn'); +INSERT INTO `creature_ai_events` (`id`, `creature_id`, `condition_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_script`, `action2_script`, `action3_script`, `comment`) VALUES (1609703, 16097, 0, 2, 0, 100, 0, 90, 85, 0, 0, 1609703, 0, 0, 'Isalien - Cast Call Pet at 90% HP'); +INSERT INTO `creature_ai_events` (`id`, `creature_id`, `condition_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_script`, `action2_script`, `action3_script`, `comment`) VALUES (1609704, 16097, 0, 6, 0, 100, 0, 0, 0, 0, 0, 1609704, 0, 0, 'Isalien - Say Text on Death'); +INSERT INTO `creature_ai_events` (`id`, `creature_id`, `condition_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_script`, `action2_script`, `action3_script`, `comment`) VALUES (1609705, 16097, 0, 7, 0, 100, 0, 0, 0, 0, 0, 1609705, 0, 0, 'Isalien - Remove Guardians on Evade'); +DELETE FROM `creature_ai_scripts` WHERE `id`=1609705; +INSERT INTO `creature_ai_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(1609705, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Isalien - Remove Guardians'); + + +-- End of migration. +END IF; +END?? +delimiter ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration;