Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2024-03-09 10:30:25 +08:00
15 changed files with 257 additions and 18 deletions

View File

@@ -0,0 +1,22 @@
-- DB update 2024_03_03_01 -> 2024_03_04_00
-- npc_test_locale translation fix for deputy Willem
-- First quest encounter for Human characters in Nortshire (Elwynn Forest)
-- Creature entry : 823
-- npc_text ID : 50016
-- No broadcastTextID currently assigned (currently at 0)
-- Setting useful variable for the SQL Script
SET @deputyWillemTextID = 50016;
SET @localeCode = 'frFR';
-- Delete existing locale before insert
-- Should be quite useless because this entry is still not translated as we can see on 2024-02-20
DELETE FROM npc_text_locale WHERE `ID` = @deputyWillemTextID AND `Locale` = @localeCode ;
-- Insert new values :
-- Translate in best effort because display in French client is weird
-- In fact Quests are translated but the gossip is still in english.
-- Better have a quite good translated string instead of an english one for player experience.
INSERT INTO npc_text_locale (`ID`, `Locale`, `Text0_0`)
VALUES (@deputyWillemTextID, @localeCode, 'Bien le bonjour, $c. Je devrais être à la recherche des gens de Hurlevent, mais bon nombre de gardes de Hurlevent combattent sur d\'autres terres. Me voilà donc nommé adjoint et proposant des primes alors que je devrais être de patrouille...');

View File

@@ -0,0 +1,28 @@
-- DB update 2024_03_04_00 -> 2024_03_04_01
--
DELETE FROM `spell_target_position` WHERE `ID` IN (34269, 34270, 34271, 34272, 34273, 34274, 34275, 34276, 34277, 34278, 34279, 34280, 34281, 34282, 34283, 34284, 34285, 34286, 34287, 34288, 34289, 34314, 34315, 34316);
INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES
(34269, 0, 550, 244.1, 49.9153, 20.1802, 0, 53441),
(34270, 0, 550, 260.572, 67.3991, 20.1802, 0, 53411),
(34271, 0, 550, 279.967, 83.4335, 20.1798, 0, 53411),
(34272, 0, 550, 306.56, 92.0271, 20.1798, 0, 53411),
(34273, 0, 550, 332.415, 86.6608, 20.3436, 0, 53411),
(34274, 0, 550, 358.834, 90.569, 20.032, 0, 53411),
(34275, 0, 550, 382.319, 83.0517, 20.1793, 0, 53411),
(34276, 0, 550, 403.761, 69.5173, 20.1793, 0, 53411),
(34277, 0, 550, 402.296, 44.3146, 20.18, 0, 53411),
(34278, 0, 550, 422.53, 26.9552, 20.18, 0, 53411),
(34279, 0, 550, 261.468, -73.6918, 20.1795, 0, 53411),
(34280, 0, 550, 249.358, -52.7987, 20.1795, 0, 53411),
(34281, 0, 550, 424.829, 1.01505, 20.18, 0, 53411),
(34282, 0, 550, 423.478, -23.9648, 20.18, 0, 53411),
(34283, 0, 550, 283.424, -85.9517, 20.1795, 0, 53411),
(34284, 0, 550, 404.622, -42.1397, 20.18, 0, 53411),
(34285, 0, 550, 309.55, -89.3632, 20.1795, 0, 53411),
(34286, 0, 550, 403.462, -67.8334, 20.18, 0, 53411),
(34287, 0, 550, 335.024, -83.21, 20.388, 0, 53411),
(34288, 0, 550, 384.251, -84.3709, 20.18, 0, 53411),
(34289, 0, 550, 359.997, -92.7042, 20.0127, 0, 53411),
(34314, 0, 550, 241.768, 24.8276, 20.3438, 0, 53411),
(34315, 0, 550, 239.111, -1.59108, 27.0491, 0, 53411),
(34316, 0, 550, 241.073, -27.0846, 20.1884, 0, 53411);

View File

@@ -0,0 +1,8 @@
-- DB update 2024_03_04_01 -> 2024_03_04_02
--
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (20039, 20045) 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`, `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
(20039, 0, 0, 0, 0, 0, 100, 0, 9700, 12200, 18050, 30950, 0, 0, 11, 37156, 0, 0, 0, 0, 0, 28, 45, 1, 1, 0, 0, 0, 0, 0, 'Phoenix-Hawk - In Combat - Cast Dive'),
(20039, 0, 1, 0, 0, 0, 100, 0, 6450, 9150, 16950, 29050, 0, 0, 11, 37159, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Phoenix-Hawk - In Combat - Cast Mana Burn'),
(20045, 0, 0, 0, 0, 0, 100, 0, 11900, 11900, 19300, 19300, 0, 0, 11, 37135, 128, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nether Scryer - In Combat - Cast \'Domination\''),
(20045, 0, 1, 0, 0, 0, 100, 0, 12400, 14900, 9800, 9800, 0, 0, 11, 37126, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Nether Scryer - In Combat - Cast \'Arcane Blast\'');

View File

@@ -0,0 +1,3 @@
-- DB update 2024_03_04_02 -> 2024_03_04_03
--
UPDATE `creature_template` SET `flags_extra` = `flags_extra`&~(1) WHERE `entry` IN (18832,18834,18835,18836);

View File

@@ -0,0 +1,8 @@
-- DB update 2024_03_04_03 -> 2024_03_04_04
-- Add some missing gameobject 'Anvil, Forge, Alchemy Lab' based on sniffed values
DELETE FROM `gameobject` WHERE (`id` IN (194466, 194467, 194468))
AND (`guid` IN (465, 466, 467));
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
(465, 194466, 530, 0, 0, 1, 1, -1737.48095703125, 5632.6103515625, 128.9701995849609375, 0, 0, 0, 0, 1, 120, 255, 1, "", 49345, NULL),
(466, 194467, 530, 0, 0, 1, 1, -1745.2545166015625, 5646.84228515625, 128.023193359375, 5.567600727081298828, 0, 0, -0.35020732879638671, 0.936672210693359375, 120, 255, 1, "", 49345, NULL),
(467, 194468, 530, 0, 0, 1, 1, -1747.6688232421875, 5648.66162109375, 128.023193359375, 4.049167633056640625, 0, 0, -0.89879322052001953, 0.438372820615768432, 120, 255, 1, "", 49345, NULL);

View File

@@ -0,0 +1,24 @@
-- DB update 2024_03_04_04 -> 2024_03_04_05
-- Update Quest 6002
-- Update SAI NPC Lunaclaw
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 12138) AND (`source_type` = 0) AND (`id` IN (5));
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
(12138, 0, 5, 0, 101, 0, 100, 0, 1, 10, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 10, 0, 0, 0, 0, 0, 0, 0, 'Lunaclaw - On Respawn - Attack Start Player');
-- Update Quest Flag
UPDATE `quest_template` SET `Flags` = 2 WHERE (`ID` = 6002);
-- Update Quest Request itens
DELETE FROM `quest_request_items` WHERE (`ID` = 6002);
INSERT INTO `quest_request_items` (`ID`, `EmoteOnComplete`, `EmoteOnIncomplete`, `CompletionText`, `VerifiedBuild`) VALUES
(6002, 1, 0, 'When you have faced the challenge that lies before you, your understanding of strength of body and strength of heart will be fully realized. Until that time, I cannot help you further.', 52237);
-- Update POi
UPDATE `quest_poi` SET `WorldMapAreaId` = 1639 WHERE (`QuestID` = 6002) AND (`id` = 0);
UPDATE `quest_poi` SET `WorldMapAreaId` = 1156 WHERE (`QuestID` = 6002) AND (`id` = 1);
-- Update Poi Points OK
DELETE FROM `quest_poi_points` WHERE `QuestID` = 6002;
INSERT INTO `quest_poi_points` (`QuestID`, `Idx1`, `Idx2`, `X`, `Y`, `VerifiedBuild`) VALUES
(6002, 0, 0, -1039, -282, 52237),
(6002, 1, 0, -2446, -1646, 52237);

View File

@@ -0,0 +1,3 @@
-- DB update 2024_03_04_05 -> 2024_03_06_00
--
UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask` &~ 1024 WHERE `entry` = 21362;

View File

@@ -0,0 +1,13 @@
-- DB update 2024_03_06_00 -> 2024_03_08_00
--
DELETE FROM `creature_text` WHERE `CreatureID` = 18805;
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
(18805, 0, 0, 'Tal anu\'men no sin\'dorei!', 14, 0, 100, 0, 0, 11134, 20849, 0, 'solarian SAY_AGGRO'),
(18805, 1, 0, 'You are hopelessly outmatched!', 14, 0, 100, 0, 0, 11139, 20854, 0, 'solarian SAY_SUMMON1'),
(18805, 1, 1, 'I will crush your delusions of grandeur!', 14, 0, 100, 0, 0, 11140, 20855, 0, 'solarian SAY_SUMMON2'),
(18805, 2, 0, 'Your soul belongs to the abyss!', 14, 0, 100, 0, 0, 11136, 20851, 0, 'solarian SAY_KILL1'),
(18805, 2, 1, 'By the blood of the Highborne!', 14, 0, 100, 0, 0, 11137, 20852, 0, 'solarian SAY_KILL2'),
(18805, 2, 2, 'For the Sunwell!', 14, 0, 100, 0, 0, 11138, 20853, 0, 'solarian SAY_KILL3'),
(18805, 3, 0, 'The warmth of the sun... awaits.', 14, 0, 100, 0, 0, 11135, 20850, 0, 'solarian SAY_DEATH'),
(18805, 4, 0, 'Enough of this! Now I call upon the fury of the cosmos itself.', 14, 0, 100, 0, 0, 0, 20372, 0, 'solarian SAY_VOID1'),
(18805, 4, 1, 'I become ONE... with the VOID!', 14, 0, 100, 0, 0, 0, 20373, 0, 'solarian SAY_VOID2');

View File

@@ -0,0 +1,27 @@
-- DB update 2024_03_08_00 -> 2024_03_08_01
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 22006);
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
(22006, 0, 0, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 78, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - On Respawn - Call Script Reset'),
(22006, 0, 1, 2, 25, 0, 100, 512, 0, 0, 0, 0, 0, 0, 53, 1, 220060, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - On Reset - Start Waypoint Movement'),
(22006, 0, 2, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - Linked - Set React State Passive'),
(22006, 0, 3, 0, 6, 4, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - On Just Died - Say Line 0 (Phase 3)'),
(22006, 0, 4, 0, 0, 4, 100, 0, 0, 0, 3000, 5000, 0, 0, 11, 12471, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - In Combat - Cast \'Shadow Bolt\' (Phase 3)'),
(22006, 0, 5, 0, 0, 4, 100, 0, 5000, 7000, 15000, 17000, 0, 0, 11, 15245, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - In Combat - Cast \'Shadow Bolt Volley\' (Phase 3)'),
(22006, 0, 6, 0, 0, 4, 100, 0, 9000, 12000, 18000, 24000, 0, 0, 11, 32709, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - In Combat - Cast \'Death Coil\' (Phase 3)'),
(22006, 0, 7, 0, 0, 4, 100, 0, 14000, 17000, 22000, 28000, 0, 0, 11, 27641, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - In Combat - Cast \'Fear\' (Phase 3)'),
(22006, 0, 8, 0, 17, 0, 100, 512, 0, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - On Summoned Unit - Store Targetlist'),
(22006, 0, 9, 10, 38, 0, 100, 513, 1, 1, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - On Data Set 1 1 - Set Event Phase 1 (No Repeat)'),
(22006, 0, 10, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 80, 2200600, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - Linked - Run Script'),
(22006, 0, 11, 0, 1, 1, 100, 0, 5000, 5000, 5000, 5000, 0, 0, 11, 38312, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - Out of Combat - Cast \'Fel Fireball\' (Phase 1)'),
(22006, 0, 12, 0, 0, 1, 100, 0, 5000, 5000, 5000, 5000, 0, 0, 11, 38312, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - In Combat - Cast \'Fel Fireball\' (Phase 1)'),
(22006, 0, 13, 14, 38, 0, 100, 513, 2, 2, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - On Data Set 2 2 - Set Event Phase 2'),
(22006, 0, 14, 15, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - Linked - Say Line 1'),
(22006, 0, 15, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 67, 1, 6000, 6000, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - Linked - Create Timed Event ID 1'),
(22006, 0, 16, 0, 59, 0, 100, 0, 1, 0, 0, 0, 0, 0, 69, 25, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, -3245.43, 288.623, 137.093, 1.72491, 'Shadowlord Deathwail - On Timed Event ID 1 - Move to Point 25'),
(22006, 0, 17, 18, 34, 0, 100, 512, 0, 25, 0, 0, 0, 0, 54, 600000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - On Point 25 Reached - Pause Waypoint Movement'),
(22006, 0, 18, 19, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - Linked - Say Line 2'),
(22006, 0, 19, 20, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - Linked - Set React State Aggressive'),
(22006, 0, 20, 21, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 22058, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - Linked - Despawn Creature \'Heart of Fury Visual Trigger\''),
(22006, 0, 21, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 41, 0, 300, 0, 0, 0, 0, 14, 25982, 185125, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - Linked - Despawn Gameobject \'Heart of Fury\''),
(22006, 0, 22, 0, 52, 0, 100, 513, 2, 0, 0, 0, 0, 0, 22, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowlord Deathwail - On Text Over - Set Event Phase 3 (No Repeat)');

View File

@@ -0,0 +1,24 @@
-- DB update 2024_03_08_01 -> 2024_03_08_02
-- Update gameobject 'Chair' with sniffed values
-- updated spawns
DELETE FROM `gameobject` WHERE (`id` IN (194360, 194361, 194362, 194363, 194364))
AND (`guid` IN (17806, 17807, 17808, 17809, 17810));
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
(17806, 194360, 603, 0, 0, 3, 1, 1954.6956787109375, 91.87249755859375, 239.6241607666015625, 5.989951133728027343, 0, 0, -0.14609241485595703, 0.989270925521850585, 7200, 255, 1, "", 47966, NULL),
(17807, 194361, 603, 0, 0, 3, 1, 1961.8349609375, 65.23160552978515625, 239.6471405029296875, 3.686115264892578125, 0, 0, -0.963165283203125, 0.268910109996795654, 7200, 255, 1, "", 47720, NULL),
(17808, 194362, 603, 0, 0, 3, 1, 1886.633544921875, 72.21144866943359375, 239.6241607666015625, 1.713893532752990722, 0, 0, 0.755846977233886718, 0.654748260974884033, 7200, 255, 1, "", 47966, NULL),
(17809, 194363, 603, 0, 0, 3, 1, 1944.32568359375, 106.1580963134765625, 239.6471405029296875, 3.686115264892578125, 0, 0, -0.963165283203125, 0.268910109996795654, 7200, 255, 1, "", 47966, NULL),
(17810, 194364, 603, 0, 0, 3, 1, 1899.227783203125, 45.58289337158203125, 239.6471405029296875, 1.417184114456176757, 0, 0, 0.650765419006347656, 0.759278833866119384, 7200, 255, 1, "", 47966, NULL);
-- new spawns
DELETE FROM `gameobject` WHERE (`id` IN (160415, 183751, 183752, 183753, 183754, 183755))
AND (`guid` IN (10857, 10858, 10859, 10860, 10861, 10862));
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
-- this spawn is out of bounds, makes no sense adding it, even if it shows in sniffs
-- (, 158579, 230, 0, 0, 3, 1, 1071.4451904296875, -542.276123046875, -81.8671722412109375, 1.570795774459838867, 0, 0, 0.707106590270996093, 0.707106947898864746, 7200, 255, 1, "", 46779, NULL),
(10857, 160415, 628, 0, 0, 3, 1, 1117.19189453125, -365.67437744140625, 18.84563636779785156, 0.968655109405517578, 0, 0, 0.465613365173339843, 0.884988248348236083, 7200, 255, 1, "", 50375, NULL),
(10858, 183751, 532, 0, 0, 1, 1, -11165.12890625, -1574.0458984375, 278.268157958984375, 1.659516334533691406, 0, 0, 0.737768173217773437, 0.675054192543029785, 7200, 255, 1, "", 50375, NULL),
(10859, 183752, 532, 0, 0, 1, 1, -11170.0029296875, -1576.1551513671875, 278.233856201171875, 3.196491718292236328, 0, 0, -0.99962329864501953, 0.027446011081337928, 7200, 255, 1, "", 50375, NULL),
(10860, 183753, 532, 0, 0, 1, 1, -11182.484375, -1585.8856201171875, 278.252532958984375, 5.610287666320800781, 0, 0, -0.33013725280761718, 0.943932950496673583, 7200, 255, 1, "", 50375, NULL),
(10861, 183754, 532, 0, 0, 1, 1, -11200.525390625, -1600.3330078125, 278.233856201171875, 4.619372367858886718, 0, 0, -0.73921680450439453, 0.673467516899108886, 7200, 255, 1, "", 50375, NULL),
(10862, 183755, 532, 0, 0, 1, 1, -11179.3544921875, -1583.925537109375, 278.233856201171875, 4.619372367858886718, 0, 0, -0.73921680450439453, 0.673467516899108886, 7200, 255, 1, "", 50375, NULL);

View File

@@ -634,6 +634,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
bool isTargetRooted = target->ToUnit()->HasUnitState(UNIT_STATE_ROOT);
// To prevent running back and forth when OOM, we must have more than 10% mana.
bool canCastSpell = me->GetPowerPct(POWER_MANA) > 10.0f && spellInfo->CalcPowerCost(me, spellInfo->GetSchoolMask()) < (int32)me->GetPower(POWER_MANA) && !me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED);
bool isSpellIgnoreLOS = spellInfo->HasAttribute(SPELL_ATTR2_IGNORE_LINE_OF_SIGHT);
// If target is rooted we move out of melee range before casting, but not further than spell max range.
if (isWithinLOSInMap && isWithinMeleeRange && isRangedAttack && isTargetRooted && canCastSpell)
@@ -651,7 +652,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
CAST_AI(SmartAI, me->AI())->SetCombatMove(true, std::max(spellMaxRange - NOMINAL_MELEE_RANGE, 0.0f));
continue;
}
else if (distanceToTarget < spellMinRange || !isWithinLOSInMap)
else if (distanceToTarget < spellMinRange || !(isWithinLOSInMap || isSpellIgnoreLOS))
{
failedSpellCast = true;
CAST_AI(SmartAI, me->AI())->SetCombatMove(true);

View File

@@ -4644,6 +4644,12 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});
// Magic Disruption (KT dagger)
ApplySpellFix({ 36478 }, [](SpellInfo* spellInfo)
{
spellInfo->ProcChance = 100;
});
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
{
SpellInfo* spellInfo = mSpellInfoMap[i];

View File

@@ -15,6 +15,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <cmath>
#include "CreatureScript.h"
#include "MoveSplineInit.h"
#include "ScriptedCreature.h"
@@ -85,6 +86,8 @@ enum qruseoftheAshtongue
QUEST_RUSE_OF_THE_ASHTONGUE = 10946,
};
const float INNER_CIRCLE_RADIUS = 60.0f;
struct boss_alar : public BossAI
{
@@ -109,6 +112,7 @@ struct boss_alar : public BossAI
_baseAttackOverride = false;
_spawnPhoenixes = false;
_platform = 0;
_noMelee = false;
_platformRoll = 0;
_noQuillTimes = 0;
_platformMoveRepeatTimer = 16s;
@@ -135,7 +139,7 @@ struct boss_alar : public BossAI
if (_noQuillTimes++ > 0)
{
me->SetOrientation(alarPoints[_platform].GetOrientation());
SpawnPhoenixes(1, me);
SpawnPhoenixes(1, me, false);
}
me->GetMotionMaster()->MovePoint(POINT_PLATFORM, alarPoints[_platform], false, true);
_platform = (_platform+1)%4;
@@ -191,6 +195,7 @@ struct boss_alar : public BossAI
ScheduleUniqueTimedEvent(16001ms, [&]{
me->SetHealth(me->GetMaxHealth());
me->SetReactState(REACT_AGGRESSIVE);
_noMelee = false;
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
_platform = POINT_MIDDLE;
me->GetMotionMaster()->MoveChase(me->GetVictim());
@@ -201,6 +206,7 @@ struct boss_alar : public BossAI
void PretendToDie(Creature* creature)
{
_noMelee = true;
scheduler.CancelAll();
creature->InterruptNonMeleeSpells(true);
creature->RemoveAllAuras();
@@ -229,11 +235,11 @@ struct boss_alar : public BossAI
me->SummonCreature(NPC_FLAME_PATCH, *target, TEMPSUMMON_TIMED_DESPAWN, 2 * MINUTE * IN_MILLISECONDS);
}
}, 30s);
ScheduleTimedEvent(30s, [&]
ScheduleTimedEvent(50s, [&]
{
me->GetMotionMaster()->MovePoint(POINT_DIVE, alarPoints[POINT_DIVE], false, true);
scheduler.DelayAll(15s);
}, 30s);
}, 50s);
ScheduleUniqueTimedEvent(10min, [&]
{
DoCastSelf(SPELL_BERSERK);
@@ -241,24 +247,33 @@ struct boss_alar : public BossAI
ScheduleMainSpellAttack(0s);
}
void SpawnPhoenixes(uint8 count, Unit* targetToSpawnAt)
void SpawnPhoenixes(uint8 count, Unit* targetToSpawnAt, bool onPosition)
{
if (targetToSpawnAt)
{
for (uint8 i = 0; i < count; ++i)
{
me->SummonCreature(NPC_EMBER_OF_ALAR, *targetToSpawnAt, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000);
if (onPosition)
{
Position spawnPosition = DeterminePhoenixPosition(targetToSpawnAt->GetPosition());
me->SummonCreature(NPC_EMBER_OF_ALAR, spawnPosition, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000);
}
else
{
me->SummonCreature(NPC_EMBER_OF_ALAR, *targetToSpawnAt, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000);
}
}
}
}
void DoDiveBomb()
{
_noMelee = true;
scheduler.Schedule(2s, [this](TaskContext)
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 10.0f, true))
{
SpawnPhoenixes(2, target);
SpawnPhoenixes(2, target, true);
}
}).Schedule(6s, [this](TaskContext)
{
@@ -267,6 +282,7 @@ struct boss_alar : public BossAI
}).Schedule(10s, [this](TaskContext)
{
me->GetMotionMaster()->MoveChase(me->GetVictim());
_noMelee = false;
});
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 90.0f, true))
{
@@ -341,10 +357,61 @@ struct boss_alar : public BossAI
}
}
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
{
return;
}
scheduler.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
{
return;
}
if (!_noMelee)
{
DoMeleeAttackIfReady();
}
}
Position DeterminePhoenixPosition(Position playerPosition)
{
// set finalPosition to playerPosition in case the fraction fails
Position finalPosition = playerPosition;
float playerXPosition = playerPosition.GetPositionX();
float playerYPosition = playerPosition.GetPositionY();
float centreXPosition = alarPoints[POINT_MIDDLE].GetPositionX();
float centreYPosition = alarPoints[POINT_MIDDLE].GetPositionY();
float deltaX = std::abs(playerXPosition-centreXPosition);
float deltaY = std::abs(playerYPosition-centreYPosition);
int8 signMultiplier[2] = {1, 1};
// if fraction has x position 0.0f we get nan as a result
if (float playerFraction = deltaX/deltaY)
{
// player angle based on delta X and delta Y
float playerAngle = std::atan(playerFraction);
float phoenixDeltaYPosition = std::cos(playerAngle)*INNER_CIRCLE_RADIUS;
float phoenixDeltaXPosition = std::sin(playerAngle)*INNER_CIRCLE_RADIUS;
// as calculations are absolute values we have to multiply in the end
// should be negative if player position was further down than centre
if (playerXPosition < centreXPosition)
signMultiplier[0] = -1;
if (playerYPosition < centreYPosition)
signMultiplier[1] = -1;
// phoenix position based on set distance
finalPosition = {centreXPosition+signMultiplier[0]*phoenixDeltaXPosition, centreYPosition+signMultiplier[1]*phoenixDeltaYPosition, 0.0f, 0.0f};
}
return finalPosition;
}
private:
bool _canAttackCooldown;
bool _baseAttackOverride;
bool _spawnPhoenixes;
bool _noMelee;
uint8 _platform;
uint8 _platformRoll;
uint8 _noQuillTimes;

View File

@@ -23,12 +23,10 @@
enum Yells
{
SAY_AGGRO = 0,
SAY_SUMMON1 = 1,
SAY_SUMMON2 = 2,
SAY_KILL = 3,
SAY_DEATH = 4,
SAY_VOIDA = 5,
SAY_VOIDB = 6
SAY_SUMMON = 1,
SAY_KILL = 2,
SAY_DEATH = 3,
SAY_VOID = 4
};
enum Spells
@@ -59,7 +57,13 @@ enum Misc
struct boss_high_astromancer_solarian : public BossAI
{
boss_high_astromancer_solarian(Creature* creature) : BossAI(creature, DATA_ASTROMANCER) { }
boss_high_astromancer_solarian(Creature* creature) : BossAI(creature, DATA_ASTROMANCER)
{
scheduler.SetValidator([this]
{
return !me->HasUnitState(UNIT_STATE_CASTING);
});
}
void Reset() override
{
@@ -68,6 +72,8 @@ struct boss_high_astromancer_solarian : public BossAI
me->SetReactState(REACT_AGGRESSIVE);
ScheduleHealthCheckEvent(20, [&]{
Talk(SAY_VOID);
me->InterruptNonMeleeSpells(false);
scheduler.CancelAll();
me->ResumeChasingVictim();
scheduler.Schedule(3s, [this](TaskContext context)
@@ -116,7 +122,7 @@ struct boss_high_astromancer_solarian : public BossAI
scheduler.Schedule(3650ms, [this](TaskContext context)
{
me->GetMotionMaster()->Clear();
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f, true, true, -SPELL_WRATH_OF_THE_ASTROMANCER))
{
DoCast(target, SPELL_ARCANE_MISSILES);
}
@@ -138,11 +144,11 @@ struct boss_high_astromancer_solarian : public BossAI
}).Schedule(52100ms, [this](TaskContext context)
{
me->SetReactState(REACT_PASSIVE);
Talk(SAY_SUMMON);
me->SetModelVisible(false);
scheduler.DelayAll(21s);
scheduler.Schedule(6s, [this](TaskContext)
{
Talk(SAY_SUMMON1);
summons.DoForAllSummons([&](WorldObject* summon)
{
if (Creature* light = summon->ToCreature())
@@ -164,7 +170,6 @@ struct boss_high_astromancer_solarian : public BossAI
}).Schedule(20s, [this](TaskContext)
{
me->SetReactState(REACT_AGGRESSIVE);
Talk(SAY_SUMMON2);
summons.DoForAllSummons([&](WorldObject* summon)
{
if (Creature* light = summon->ToCreature())

View File

@@ -963,7 +963,7 @@ struct npc_telonicus : public ScriptedAI
DoCastVictim(SPELL_BOMB);
}, 3600ms, 7100ms);
ScheduleTimedEvent(13250ms, [&]{
DoCastRandomTarget(SPELL_CONFLAGRATION, 0, 100.0f);
DoCastRandomTarget(SPELL_REMOTE_TOY, 0, 100.0f);
}, 15750ms);
}