Files
moonwell-core-vanilla/sql/migrations/20231223061017_world.sql
2023-12-23 08:20:10 +02:00

53 lines
5.3 KiB
SQL

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`='20231223061017');
IF v=0 THEN
INSERT INTO `migrations` VALUES ('20231223061017');
-- Add your query below.
-- Events list for Scarshield Portal
DELETE FROM `creature_ai_events` WHERE `creature_id`=9707;
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 (970701, 9707, 0, 11, 0, 0, 1, 0, 0, 0, 0, 970701, 0, 0, 'Scarshield Portal - Disable Attack and Movement 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 (970702, 9707, 0, 1, 0, 100, 1, 12000, 12000, 12000, 12000, 970702, 0, 0, 'Scarshield Portal - Summon Burning Felhound OOC');
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 (970703, 9707, 0, 1, 0, 10, 0, 20000, 20000, 0, 0, 970703, 0, 0, 'Scarshield Portal - Summon Burning Felguard OOC');
DELETE FROM `creature_ai_scripts` WHERE `id`=970701;
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
(970701, 0, 0, 18, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarshield Portal - Despawn Self in 30 Seconds'),
(970701, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarshield Portal - Disable Melee Attack'),
(970701, 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarshield Portal - Disable Combat Movement');
DELETE FROM `creature_ai_scripts` WHERE `id`=970702;
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
(970702, 0, 0, 15, 16002, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarshield Portal - Cast Spell Summon Burning Felhound');
DELETE FROM `creature_ai_scripts` WHERE `id`=970703;
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
(970703, 0, 0, 15, 16004, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarshield Portal - Cast Spell Summon Burning Felguard');
DELETE FROM `creature_ai_scripts` WHERE `id` IN (970704, 970705, 970706);
UPDATE `creature_template` SET `unit_flags`=33555200, `auras`='15127' WHERE `entry`=9707;
-- Events list for Burning Imp
DELETE FROM `creature_ai_events` WHERE `creature_id`=9708;
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 (970801, 9708, 0, 1, 0, 100, 0, 10000, 10000, 0, 0, 970801, 0, 0, 'Burning Imp - Despawn after 10 seconds OOC');
DELETE FROM `creature_ai_scripts` WHERE `id`=970801;
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
(970801, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Burning Imp - Despawn');
-- Events list for Burning Felhound
DELETE FROM `creature_ai_events` WHERE `creature_id`=10261;
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 (1026101, 10261, 0, 1, 0, 100, 0, 10000, 10000, 0, 0, 1026101, 0, 0, 'Burning Felhound - Despawn after 10 seconds OOC');
DELETE FROM `creature_ai_scripts` WHERE `id`=1026101;
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
(1026101, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Burning Felhound - Despawn');
DELETE FROM `creature_ai_scripts` WHERE `id` IN (1026102);
-- End of migration.
END IF;
END??
delimiter ;
CALL add_migration();
DROP PROCEDURE IF EXISTS add_migration;