From 0bd7e9dd11b7ad803d76c301c69e4f27d4669527 Mon Sep 17 00:00:00 2001 From: WiZZy Date: Sun, 3 Jan 2021 12:44:16 +0200 Subject: [PATCH] fix(DB/Visual): The Sun Gate (#4100) --- .../rev_1609274862007339479.sql | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1609274862007339479.sql diff --git a/data/sql/updates/pending_db_world/rev_1609274862007339479.sql b/data/sql/updates/pending_db_world/rev_1609274862007339479.sql new file mode 100644 index 000000000..51fc8ae9a --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1609274862007339479.sql @@ -0,0 +1,55 @@ +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1609274862007339479'); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE (`entry` = 17886); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` IN (-63582, -63583, -63584, -63585)); +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 +(-63583, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 11, 31411, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '[DND]Sunhawk Portal Controller - On Respawn - Cast \'Stabilize Sun Gate I\''), +(-63584, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 11, 31412, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '[DND]Sunhawk Portal Controller - On Respawn - Cast \'Stabilize Sun Gate II\''), +(-63585, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 11, 31413, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '[DND]Sunhawk Portal Controller - On Respawn - Cast \'Stabilize Sun Gate III\''), +(-63582, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 11, 31414, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '[DND]Sunhawk Portal Controller - On Respawn - Cast \'Stabilize Sun Gate IV\''); + +UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI' WHERE `entry` IN (184850, 182026); + +DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (-12164, -12166, -12168, -12173) AND (`source_type` = 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 +(-12164, 1, 0, 1, 70, 0, 100, 0, 2, 0, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 10, 63584, 17886, 0, 0, 0, 0, 0, 0, 'Sunhawk Portal Controller - On Gameobject State Changed - Kill Target'), +(-12164, 1, 1, 0, 61, 0, 100, 0, 2, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunhawk Portal Controller - On Gameobject State Changed - Set Event Phase 1'), +(-12164, 1, 2, 0, 60, 1, 100, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunhawk Portal Controller - On Update - Despawn In 3000 ms (Phase 1)'), +(-12166, 1, 0, 1, 70, 0, 100, 0, 2, 0, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 10, 63583, 17886, 0, 0, 0, 0, 0, 0, 'Sunhawk Portal Controller - On Gameobject State Changed - Kill Target'), +(-12166, 1, 1, 0, 61, 0, 100, 0, 2, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunhawk Portal Controller - On Gameobject State Changed - Set Event Phase 1'), +(-12166, 1, 2, 0, 60, 1, 100, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunhawk Portal Controller - On Update - Despawn In 3000 ms (Phase 1)'), +(-12168, 1, 0, 1, 70, 0, 100, 0, 2, 0, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 10, 63582, 17886, 0, 0, 0, 0, 0, 0, 'Sunhawk Portal Controller - On Gameobject State Changed - Kill Target'), +(-12168, 1, 1, 0, 61, 0, 100, 0, 2, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunhawk Portal Controller - On Gameobject State Changed - Set Event Phase 1'), +(-12168, 1, 2, 0, 60, 1, 100, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunhawk Portal Controller - On Update - Despawn In 3000 ms (Phase 1)'), +(-12173, 1, 0, 1, 70, 0, 100, 0, 2, 0, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 10, 63585, 17886, 0, 0, 0, 0, 0, 0, 'Sunhawk Portal Controller - On Gameobject State Changed - Kill Target'), +(-12173, 1, 1, 0, 61, 0, 100, 0, 2, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunhawk Portal Controller - On Gameobject State Changed - Set Event Phase 1'), +(-12173, 1, 2, 0, 60, 1, 100, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunhawk Portal Controller - On Update - Despawn In 3000 ms (Phase 1)'); + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 182026 AND (`source_type` = 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 +(182026, 1, 0, 0, 60, 0, 100, 0, 2000, 2000, 2000, 2000, 0, 105, 16, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sun Gate - On Update - Add Gameobject Flags Not Selectable'), +(182026, 1, 1, 0, 60, 0, 100, 0, 2000, 2000, 2000, 2000, 0, 106, 16, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sun Gate - On Update - Remove Gameobject Flags Not Selectable'); + +UPDATE `creature` SET `position_x`=-2147.350098, `position_y`=-10741.099609, `position_z`=73.903397 WHERE `guid`=63583; +UPDATE `creature` SET `position_x`=-2128.939941, `position_y`=-10726.000000, `position_z`=66.335800 WHERE `guid`=63584; +UPDATE `creature` SET `position_x`=-2107.070068, `position_y`=-10703.000000, `position_z`=65.189400 WHERE `guid`=63585; +UPDATE `creature` SET `position_x`=-2098.620117, `position_y`=-10688.500000, `position_z`=65.218102 WHERE `guid`=63582; + +UPDATE `creature` SET `spawntimesecs` = 33 WHERE `id` = 17886; +UPDATE `gameobject` SET `spawntimesecs` = 30, `animprogress` = 100 WHERE `id` = 184850; +UPDATE `gameobject_template` SET `Data3` = 3000 WHERE (`entry` = 184850); + +DELETE FROM `creature` WHERE `guid` = 96886 and `id` = 17889; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`) VALUES +(96886, 17889, 530, 1, 1, 0, 0, -2143.43, -10692, 64.7658, 4.93928, 300, 0, 0, 42, 0, 0); + +UPDATE `conditions` SET `ConditionValue2`=17889, `ConditionValue3`=63610 WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=31411; +UPDATE `conditions` SET `ConditionValue2`=17889, `ConditionValue3`=96886 WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=31412; +UPDATE `conditions` SET `ConditionValue2`=17889, `ConditionValue3`=63611 WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=31413; +UPDATE `conditions` SET `ConditionValue2`=17889, `ConditionValue3`=63609 WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=31414; + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry` IN(182026); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22, 1, 182026, 1, 0, 30, 1, 184850, 60, 0, 0, 0, 0, '', 'Sun Gate - Only run SAI if gob in range'), +(22, 2, 182026, 1, 0, 30, 1, 184850, 60, 0, 1, 0, 0, '', 'Sun Gate - Only run SAI if no gob in range');