Merge branch 'azerothcore:master' into Playerbot
This commit is contained in:
@@ -15,8 +15,8 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# the result of the matrix will be the combination of all attributes, so we get os*compiler*modules builds
|
||||
os: [ubuntu-latest]
|
||||
compiler: [clang12]
|
||||
os: [ubuntu-20.04]
|
||||
compiler: [clang]
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: ${{ matrix.compiler }}
|
||||
env:
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
-- DB update 2022_12_09_00 -> 2022_12_10_00
|
||||
--
|
||||
UPDATE `creature_template` SET `unit_class` = 2 WHERE `entry` IN (19287, 19288, 19290);
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 19391;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 19391) AND (`source_type` = 0) AND (`id` IN (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`, `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
|
||||
(19391, 0, 0, 0, 0, 0, 100, 0, 3000, 6000, 10000, 15000, 0, 11, 3551, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Felguard Lieutenant - In Combat - Cast \'Skull Crack\'');
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 19288;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 19288) AND (`source_type` = 0) AND (`id` IN (0, 1, 2));
|
||||
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
|
||||
(19288, 0, 0, 0, 0, 0, 100, 0, 15000, 15000, 30000, 30000, 0, 11, 9081, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Dreadknight - In Combat - Cast \'Shadow Bolt Volley\''),
|
||||
(19288, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 5000, 10000, 0, 11, 16583, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Dreadknight - In Combat - Cast \'Shadow Shock\''),
|
||||
(19288, 0, 2, 0, 0, 0, 100, 0, 8000, 16000, 8000, 16000, 0, 11, 20825, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Dreadknight - In Combat - Cast \'Shadow Bolt\'');
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 19290;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 19290) AND (`source_type` = 0) AND (`id` IN (0, 1, 2));
|
||||
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
|
||||
(19290, 0, 0, 0, 0, 0, 100, 0, 5000, 10000, 30000, 30000, 0, 11, 12888, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Invading Anguisher - In Combat - Cast \'Cause Insanity\''),
|
||||
(19290, 0, 1, 0, 0, 0, 100, 0, 3000, 6000, 30000, 35000, 0, 11, 19279, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Invading Anguisher - In Combat - Cast \'Devouring Plague\''),
|
||||
(19290, 0, 2, 0, 0, 0, 100, 0, 5000, 5000, 20000, 25000, 0, 11, 11639, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Invading Anguisher - In Combat - Cast \'Shadow Word: Pain\'');
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 19286;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 19286) AND (`source_type` = 0) AND (`id` IN (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`, `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
|
||||
(19286, 0, 0, 0, 0, 0, 100, 0, 3000, 3000, 15000, 20000, 0, 11, 32901, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Invading Fel Stalker - In Combat - Cast \'Carnivorous Bite\'');
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 19287;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 19287) AND (`source_type` = 0) AND (`id` IN (0, 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
|
||||
(19287, 0, 0, 0, 0, 0, 100, 0, 3000, 6000, 12000, 24000, 0, 11, 11829, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Invading Voidwalker - In Combat - Cast \'Flamestrike\''),
|
||||
(19287, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 5000, 10000, 0, 11, 20825, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Invading Voidwalker - In Combat - Cast \'Shadow Bolt\'');
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 19406;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 19406) AND (`source_type` = 0) AND (`id` IN (0, 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
|
||||
(19406, 0, 0, 0, 0, 0, 100, 0, 2000, 6000, 4000, 8000, 0, 11, 11976, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Thunder Bluff Huntsman - In Combat - Cast \'Strike\''),
|
||||
(19406, 0, 1, 0, 0, 0, 100, 0, 8000, 12000, 8000, 12000, 0, 11, 6253, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Thunder Bluff Huntsman - In Combat - Cast \'Backhand\'');
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 19407;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 19407) AND (`source_type` = 0) AND (`id` IN (0, 1, 2));
|
||||
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
|
||||
(19407, 0, 0, 0, 2, 0, 100, 0, 30, 40, 0, 0, 0, 11, 13874, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Azuremyst Vindicator - Between 40-30% Health - Cast \'Divine Shield\''),
|
||||
(19407, 0, 1, 0, 0, 0, 100, 0, 3000, 6000, 12000, 16000, 0, 11, 13005, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azuremyst Vindicator - In Combat - Cast \'Hammer of Justice\''),
|
||||
(19407, 0, 2, 0, 0, 0, 100, 0, 1000, 1000, 30000, 30000, 0, 11, 33127, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azuremyst Vindicator - In Combat - Cast \'Seal of Command\'');
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 19320;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 19320) AND (`source_type` = 0) AND (`id` IN (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`, `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
|
||||
(19320, 0, 0, 0, 0, 0, 100, 0, 3000, 6000, 6000, 12000, 0, 11, 11972, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Argent Protector - In Combat - Cast \'Shield Bash\'');
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 19365;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 19365) AND (`source_type` = 0) AND (`id` IN (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`, `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
|
||||
(19365, 0, 0, 0, 0, 0, 100, 0, 3000, 3000, 3000, 3000, 0, 11, 6660, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Argent Bowman - In Combat - Cast \'Shoot\'');
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 19366;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 19366) AND (`source_type` = 0) AND (`id` IN (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`, `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
|
||||
(19366, 0, 0, 0, 0, 0, 100, 0, 3000, 3000, 3000, 3000, 0, 11, 10277, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Argent Hunter - In Combat - Cast \'Throw\'');
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 19285;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 19285) AND (`source_type` = 0) AND (`id` IN (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`, `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
|
||||
(19285, 0, 0, 0, 0, 0, 100, 0, 3000, 6000, 12000, 18000, 0, 11, 8873, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Invading Infernal - In Combat - Cast \'Flame Breath\'');
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 19284;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 19284);
|
||||
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
|
||||
(19284, 0, 0, 0, 0, 0, 100, 0, 3000, 6000, 15000, 20000, 0, 11, 11977, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Invading Felguard - In Combat - Cast \'Rend\'');
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID` = 19385;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(19385, 0, 0, 'Marshals... brothers and sisters of the sword. I\'d rather fight alongside you than an army of thousands. We are lions! You know what\'s waiting through these demons and beyond that Dark Portal? Immortality! Take it! ', 14, 0, 100, 0, 0, 0, 16545, 0, 'Lord Marshal Raynor - On Spawn'),
|
||||
(19385, 1, 0, 'Everyone fights. No one quits.', 12, 0, 100, 0, 0, 0, 16549, 0, 'Lord Marshal Raynor - On Spawn'),
|
||||
(19385, 1, 1, 'Let us therefore brace ourselves to our duty, and so bear ourselves, that if the Humans of Azeroth last for a thousand years, men will still say, \'This was their finest hour..', 12, 0, 100, 0, 0, 0, 16546, 0, 'Lord Marshal Raynor - Random'),
|
||||
(19385, 1, 2, 'This day we fight!! By all that you hold dear in these good lands, I bid you stand, heroes of Azeroth!', 12, 0, 100, 0, 0, 0, 16551, 0, 'Lord Marshal Raynor - Random'),
|
||||
(19385, 1, 3, 'Yes. Fight and you may die. Run and you will live, but for how long? The devils are upon us! And those not here, dying in their villages weeks from now, would they be willing to trade all the days from this day to that, for one chance to come here and stop these horrors from invading our world?', 12, 0, 100, 0, 0, 0, 16548, 0, 'Lord Marshal Raynor - Random'),
|
||||
(19385, 1, 4, 'Hold your ground! Hold your ground! Sons of the Alliance! Of the Horde! My brothers and sisters! I see in your eyes the same fear that would wither my own heart. A day may come when our courage fails, when we forsake our friends and break our fellowships... but it is not this day!', 12, 0, 100, 0, 0, 0, 16550, 0, 'Lord Marshal Raynor - Random'),
|
||||
(19385, 1, 5, 'We few, we happy few, we band of brothers and sisters. For those today that shed their blood with me. Shall be my kin; be they never so vile, This day shall gentle their conditions.', 12, 0, 100, 0, 0, 0, 16552, 0, 'Lord Marshal Raynor - Random'),
|
||||
(19385, 1, 6, 'And those in Azeroth now a-bed shall think themselves accursed they were not here, And hold their valor cheap whiles any speaks that fought with us upon this dark day.', 12, 0, 100, 0, 0, 0, 16553, 0, 'Lord Marshal Raynor - Random'),
|
||||
(19385, 1, 7, 'It is time for us as kingdoms and as individuals to set aside our long-standing feuds and unite. The tides of an unwinnable war are upon us, and we must seek refuge on higher ground, lest we be swept away by the flood of darkness.', 12, 0, 100, 0, 0, 0, 16547, 0, 'Lord Marshal Raynor - Random'),
|
||||
(19385, 2, 0, 'Argent Dawn! We go to gather more aid! Fight on, brothers and sisters. And know that you will not long fight alone!', 14, 0, 100, 0, 0, 0, 16934, 0, 'Lord Marshal Raynor - Despawn');
|
||||
@@ -0,0 +1,2 @@
|
||||
-- DB update 2022_12_10_00 -> 2022_12_11_00
|
||||
DELETE FROM `item_loot_template` WHERE `Entry` = 17969 AND `Item` = 6332;
|
||||
@@ -0,0 +1,63 @@
|
||||
-- DB update 2022_12_11_00 -> 2022_12_11_01
|
||||
--
|
||||
UPDATE `creature` SET `position_x`=193.68, `position_y`=-425.001, `position_z`=43.536, `orientation`=4.910, `MovementType`=2 WHERE `id1`=18105;
|
||||
|
||||
SET @CGUID := (SELECT `guid` FROM `creature` WHERE `id1`=18105);
|
||||
DELETE FROM `creature_addon` WHERE `guid`=@CGUID;
|
||||
INSERT INTO `creature_addon` VALUES
|
||||
(@CGUID,@CGUID*10,0,0,1,0,0,'');
|
||||
|
||||
DELETE FROM `waypoint_data` WHERE `id` IN (@CGUID*10,(@CGUID*10)+1);
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@CGUID*10,1,220.287480,-447.83450,43.72291,0,0,0,0,100,0),
|
||||
(@CGUID*10,2,217.265560,-424.75412,45.52847,0,0,0,0,100,0),
|
||||
(@CGUID*10,3,225.281620,-398.65262,45.47290,0,0,0,0,100,0),
|
||||
(@CGUID*10,4,253.491170,-397.89430,45.52849,0,0,0,0,100,0),
|
||||
(@CGUID*10,5,253.131480,-414.29672,44.77849,0,0,0,0,100,0),
|
||||
(@CGUID*10,6,234.916290,-424.61800,44.61180,0,0,0,0,100,0),
|
||||
(@CGUID*10,7,223.580960,-426.78760,44.61183,0,0,0,0,100,0),
|
||||
(@CGUID*10,8,204.304470,-431.26736,44.13958,0,0,0,0,100,0),
|
||||
(@CGUID*10,9,196.254750,-456.66520,42.61182,0,0,0,0,100,0),
|
||||
(@CGUID*10,10,223.04488,-479.07944,32.47294,0,0,0,0,100,0),
|
||||
(@CGUID*10,11,263.47906,-480.66202,46.80626,0,0,0,0,100,0),
|
||||
(@CGUID*10,12,278.39508,-477.34967,43.88961,0,0,0,0,100,0),
|
||||
(@CGUID*10,13,276.92447,-457.94210,37.05632,0,0,0,0,100,0),
|
||||
(@CGUID*10,14,276.92447,-457.94210,37.05632,0,0,0,0,100,0),
|
||||
(@CGUID*10,15,275.60797,-469.67816,33.47302,0,0,0,0,100,0),
|
||||
(@CGUID*10,16,276.92447,-457.94210,37.05631,0,0,0,0,100,0),
|
||||
(@CGUID*10,17,278.24097,-446.20605,40.63961,0,0,0,0,100,0),
|
||||
(@CGUID*10,18,260.68362,-421.50210,43.44514,0,0,0,0,100,0),
|
||||
(@CGUID*10,19,233.34468,-409.80292,45.11180,0,0,0,0,100,0),
|
||||
(@CGUID*10,20,193.74000,-423.40268,43.58399,0,0,0,0,100,0),
|
||||
|
||||
((@CGUID*10)+1,1,276.92447,-457.9421,37.05632,0,0,0,0,100,0),
|
||||
((@CGUID*10)+1,2,230.84842,-473.81586,44.384487,0,0,0,0,100,0),
|
||||
((@CGUID*10)+1,3,223.15588,-474.34158,46.36878,0,0,0,0,100,0),
|
||||
((@CGUID*10)+1,4,214.68163,-479.58606,52.51196,0,0,0,0,100,0),
|
||||
((@CGUID*10)+1,5,200.88074,-483.32407,58.438652,0,0,0,0,100,0),
|
||||
((@CGUID*10)+1,6,185.70932,-485.64243,64.15632,0,0,0,0,100,0),
|
||||
((@CGUID*10)+1,7,175.2845,-486.21573,67.86781,0,0,0,0,100,0),
|
||||
((@CGUID*10)+1,8,160.93648,-476.7256,74.70425,0,0,0,0,100,0),
|
||||
((@CGUID*10)+1,9,158.37117,-472.06967,74.63962,0,0,0,0,100,0),
|
||||
((@CGUID*10)+1,10,159.37047,-467.53186,75.40111,0,0,0,0,100,0),
|
||||
((@CGUID*10)+1,11,180.78477,-471.30957,77.03179,0,0,0,0,100,0),
|
||||
((@CGUID*10)+1,12,189.26646,-471.74365,77.766594,0,0,0,0,100,0),
|
||||
((@CGUID*10)+1,13,200.31303,-472.0223,79.02495,0,0,0,0,100,0),
|
||||
((@CGUID*10)+1,14,212.294,-480.27985,80.729095,0,0,0,0,100,0),
|
||||
((@CGUID*10)+1,15,222.19577,-476.2322,81.27319,0,0,0,0,100,0),
|
||||
((@CGUID*10)+1,16,233.52731,-471.28235,81.37284,0,0,0,0,100,0),
|
||||
((@CGUID*10)+1,17,239.5655,-468.65033,81.37284,0,0,0,0,100,0),
|
||||
((@CGUID*10)+1,18,248.33444,-465.86627,81.37284,0,0,0,0,100,0),
|
||||
((@CGUID*10)+1,19,260.44455,-457.9094,81.37284,0,0,0,0,100,0),
|
||||
((@CGUID*10)+1,20,256.2785,-458.73138,81.37284,3.543018341064453125,0,0,0,100,0);
|
||||
|
||||
DELETE FROM `areatrigger_scripts` WHERE `entry`=4302;
|
||||
INSERT INTO `areatrigger_scripts` VALUES
|
||||
(4302,'at_underbog_ghazan');
|
||||
|
||||
DELETE FROM `spelldifficulty_dbc` WHERE `ID`=34267;
|
||||
INSERT INTO `spelldifficulty_dbc` VALUES
|
||||
(34267,34267,38737,0,0);
|
||||
|
||||
UPDATE `creature_template` SET `AiName`='', `ScriptName`='boss_ghazan' WHERE `entry`=18105;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=18105;
|
||||
@@ -0,0 +1,28 @@
|
||||
-- DB update 2022_12_11_01 -> 2022_12_11_02
|
||||
--
|
||||
UPDATE `creature` SET `MovementType`=2 WHERE `id1`=17882;
|
||||
|
||||
SET @CGUID := (SELECT `guid` FROM `creature` WHERE `id1`=17882);
|
||||
DELETE FROM `creature_addon` WHERE `guid`=@CGUID;
|
||||
INSERT INTO `creature_addon` VALUES
|
||||
(@CGUID,@CGUID*10,0,0,1,0,0,'');
|
||||
|
||||
DELETE FROM `waypoint_data` WHERE `id` IN (@CGUID*10);
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@CGUID*10,1,143.12927,24.530138,26.791546,0,0,0,0,100,0),
|
||||
(@CGUID*10,2,147.65775,5.377345,26.791546,0,0,0,0,100,0),
|
||||
(@CGUID*10,3,137.54929,3.156878,26.791546,NULL,15000,0,@CGUID*10,100,@CGUID),
|
||||
(@CGUID*10,4,147.90135,15.377421,26.796476,0,0,0,0,100,0),
|
||||
(@CGUID*10,5,151.38458,20.670511,26.857647,NULL,15000,0,@CGUID*10,100,@CGUID),
|
||||
(@CGUID*10,6,143.12927,24.530138,26.791546,0,0,0,0,100,0),
|
||||
(@CGUID*10,7,141.65916,32.419727,26.831083,NULL,15000,0,@CGUID*10,100,@CGUID),
|
||||
(@CGUID*10,8,163.50163,11.745237,26.72663,0,0,0,0,100,0),
|
||||
(@CGUID*10,9,168.98875,8.392987,26.64813,NULL,15000,0,@CGUID*10,100,@CGUID),
|
||||
(@CGUID*10,10,147.65775,5.377345,26.791546,0,0,0,0,100,0),
|
||||
(@CGUID*10,11,137.54929,3.156878,26.791546,NULL,15000,0,@CGUID*10,100,@CGUID),
|
||||
(@CGUID*10,12,147.90135,15.377421,26.796476,0,0,0,0,100,0),
|
||||
(@CGUID*10,13,151.38458,20.670511,26.857647,NULL,15000,0,@CGUID*10,100,@CGUID);
|
||||
|
||||
DELETE FROM `waypoint_scripts` WHERE `id`=@CGUID*10;
|
||||
INSERT INTO `waypoint_scripts` VALUES
|
||||
(@CGUID*10,2,1,7,0,0,0,0,0,0,@CGUID);
|
||||
@@ -0,0 +1,6 @@
|
||||
-- DB update 2022_12_11_02 -> 2022_12_11_03
|
||||
-- Fix issue 13914
|
||||
DELETE FROM `quest_greeting_locale` WHERE `locale` IN ('esES', 'esMX') AND `ID` = 5638;
|
||||
INSERT INTO `quest_greeting_locale` (`ID`, `type`, `locale`, `Greeting`) VALUES
|
||||
(5638, 0, 'esES', 'Tengo muchas cosas que hacer por aquí en Desolace, $N. Roetten quiere que recojamos algunos componentes para uno de nuestros clientes y buscar alguno de esos objetos perdidos.$b$bViéndote que estás aquí para ayudar. ¿Por qué no empezamos?'),
|
||||
(5638, 0, 'esMX', 'Tengo muchas cosas que hacer por aquí en Desolace, $N. Roetten quiere que recojamos algunos componentes para uno de nuestros clientes y buscar alguno de esos objetos perdidos.$b$bViéndote que estás aquí para ayudar. ¿Por qué no empezamos?');
|
||||
@@ -0,0 +1,5 @@
|
||||
-- DB update 2022_12_11_03 -> 2022_12_11_04
|
||||
-- fix pr13832
|
||||
-- https://github.com/azerothcore/azerothcore-wotlk/commit/c791e2080e287e052fcaf717e3106977c822d28f
|
||||
DELETE FROM `creature_loot_template` WHERE `Entry` IN (17917, 20627) AND (`Item` IN (13926));
|
||||
UPDATE `creature_template` SET `lootid` = 0 WHERE (`entry` IN (17917, 20627));
|
||||
@@ -0,0 +1,8 @@
|
||||
-- DB update 2022_12_11_04 -> 2022_12_11_05
|
||||
--
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 19386;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 19386) AND (`source_type` = 0) AND (`id` IN (0, 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
|
||||
(19386, 0, 0, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 11, 9128, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Stormwind Marshal - On Aggro - Cast \'Battle Shout\''),
|
||||
(19386, 0, 1, 0, 0, 0, 100, 0, 3000, 6000, 3000, 6000, 0, 11, 25710, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Stormwind Marshal - In Combat - Cast \'Heroic Strike\'');
|
||||
@@ -0,0 +1,4 @@
|
||||
-- DB update 2022_12_11_05 -> 2022_12_11_06
|
||||
--
|
||||
UPDATE `creature_text` SET `text`='The shield is nearly gone! All that I have worked for is in danger!', `Sound`=10439, `BroadcastTextId`=16795 WHERE `CreatureID`=15608 AND `GroupId`=2;
|
||||
UPDATE `creature_text` SET `text`='Champions! My shield grows weak!', `Sound`=10437, `BroadcastTextId`=16792 WHERE `CreatureID`=15608 AND `GroupId`=4;
|
||||
@@ -0,0 +1,25 @@
|
||||
-- DB update 2022_12_11_06 -> 2022_12_11_07
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 17000;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 17000) AND (`id` IN (0, 1, 2, 3, 4, 5, 6));
|
||||
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
|
||||
(17000, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 11, 24240, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Aggonis - On Just Summoned - Cast \'Spawn - Red Lightning\''),
|
||||
(17000, 0, 1, 0, 54, 0, 100, 1, 0, 0, 0, 0, 0, 80, 1700000, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Aggonis - On Just Summoned - Run Script (No Repeat)'),
|
||||
(17000, 0, 2, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 18, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Aggonis - On Just Summoned - Set Flags Not Attackable'),
|
||||
(17000, 0, 3, 0, 60, 0, 100, 0, 7000, 7000, 0, 0, 0, 19, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Aggonis - On Update - Remove Flags Not Attackable'),
|
||||
(17000, 0, 4, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Aggonis - On Just Summoned - Set Flags Immune To Players'),
|
||||
(17000, 0, 5, 0, 60, 0, 100, 0, 7000, 7000, 0, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Aggonis - On Update - Remove Flags Immune To Players'),
|
||||
(17000, 0, 6, 0, 60, 0, 100, 0, 7000, 7000, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 17, 0, 20, 0, 0, 0, 0, 0, 0, 'Aggonis - On Update - Start Attacking');
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 1700000) AND (`source_type` = 9) AND (`id` IN (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`, `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
|
||||
(1700000, 9, 0, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Aggonis - Actionlist - Say Line 0');
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID` = 17000 AND `GroupID` = 0;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(17000, 0, 0, "Fools! You seek to abjure my father's presence? Death awaits you, mortals!", 12, 0, 100, 0, 0, 0, 0, 0, 'Aggonis');
|
||||
|
||||
DELETE FROM `creature_text_locale` WHERE `CreatureID` = 17000 AND `GroupID` IN (0) AND `Locale` IN ('esES','esMX');
|
||||
INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES
|
||||
(17000 , 0, 0, 'esES',"¡Estúpidos! ¿Queréis repudiar la presencia de mi padre? ¡La muerte os espera, mortales!"),
|
||||
(17000 , 0, 0, 'esMX',"¡Estúpidos! ¿Queréis repudiar la presencia de mi padre? ¡La muerte os espera, mortales!");
|
||||
@@ -0,0 +1,3 @@
|
||||
-- DB update 2022_12_11_07 -> 2022_12_11_08
|
||||
--
|
||||
UPDATE `smart_scripts` SET `event_param5`=1 WHERE `entryorguid`=21126 AND `source_type`=0 AND `id` IN (5,6);
|
||||
@@ -0,0 +1,38 @@
|
||||
-- DB update 2022_12_11_08 -> 2022_12_11_09
|
||||
--
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE (`entry` = 20061);
|
||||
UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`|1|64|1024 WHERE `entry` = 18044;
|
||||
|
||||
DELETE FROM `creature` WHERE `id1`=20061;
|
||||
DELETE FROM `creature_template_movement` WHERE `CreatureId`=20061;
|
||||
INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`) VALUES
|
||||
(20061, 1, 1, 0, 1);
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (20061);
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=20061 AND `source_type`=0;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=2006100 AND `source_type`=9;
|
||||
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
|
||||
(20061,0,0,0,54,0,100,0,0,0,0,0,0,80,2006100,2,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Just summoned - Action list"),
|
||||
(2006100,9,0,0,0,0,100,0,0,0,0,0,0,11,34872,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Action list - cast spell"),
|
||||
(2006100,9,1,0,0,0,100,0,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0,3.15,"Frostbite Invisible Stalker - Action list - Set Orientation"),
|
||||
(2006100,9,2,0,0,0,100,0,1000,1000,0,0,0,11,34740,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Action list - cast spell"),
|
||||
(2006100,9,3,0,0,0,100,0,0,0,0,0,0,11,34746,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Action list - cast spell"),
|
||||
(2006100,9,4,0,0,0,100,0,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0,2.3624,"Frostbite Invisible Stalker - Action list - Set Orientation"),
|
||||
(2006100,9,5,0,0,0,100,0,1000,1000,0,0,0,11,34740,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Action list - cast spell"),
|
||||
(2006100,9,6,0,0,0,100,0,0,0,0,0,0,11,34746,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Action list - cast spell"),
|
||||
(2006100,9,7,0,0,0,100,0,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0,1.575,"Frostbite Invisible Stalker - Action list - Set Orientation"),
|
||||
(2006100,9,8,0,0,0,100,0,1000,1000,0,0,0,11,34740,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Action list - cast spell"),
|
||||
(2006100,9,9,0,0,0,100,0,0,0,0,0,0,11,34746,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Action list - cast spell"),
|
||||
(2006100,9,10,0,0,0,100,0,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0.7875,"Frostbite Invisible Stalker - Action list - Set Orientation"),
|
||||
(2006100,9,11,0,0,0,100,0,1000,1000,0,0,0,11,34740,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Action list - cast spell"),
|
||||
(2006100,9,12,0,0,0,100,0,0,0,0,0,0,11,34746,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Action list - cast spell"),
|
||||
(2006100,9,13,0,0,0,100,0,1000,1000,0,0,0,11,34779,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Frostbite Invisible Stalker - Just Action list - cast spell");
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName` ='spell_freezing_circle';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(34779,'spell_freezing_circle');
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 18088) AND (`source_type` = 0) AND (`id` IN (0, 1, 2));
|
||||
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
|
||||
(18088, 0, 0, 0, 0, 0, 100, 0, 0, 0, 2400, 3800, 0, 11, 34447, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodscale Enchantress - In Combat - Cast \'Arcane Missiles\''),
|
||||
(18088, 0, 1, 2, 0, 0, 100, 0, 6000, 8000, 16000, 22000, 0, 11, 33245, 35, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodscale Enchantress - In Combat - Cast \'Ice Barrier\''),
|
||||
(18088, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 11, 34787, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodscale Enchantress - In Combat - Cast \'Freezing Circle\'');
|
||||
@@ -0,0 +1,69 @@
|
||||
-- DB update 2022_12_11_09 -> 2022_12_12_00
|
||||
SET @CGUID := 248650;
|
||||
SET @OGUID := 105000;
|
||||
|
||||
DELETE FROM `creature` WHERE `guid` IN (@CGUID, @CGUID+1, @CGUID+2, @CGUID+3, @CGUID+4);
|
||||
INSERT INTO `creature` (`guid`, `id1`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES
|
||||
(@CGUID, 14686, 129, 722, 722, 1, 1, 0, 2583.18359375, 695.8612060546875, 56.80325698852539062, 1.867502331733703613, 7200, 0, 0, 8744, 4568, 0, 0, 0, 0, 46248), -- Lady Falther'ess
|
||||
(@CGUID+1, 14690, 429, 2557, 2557, 1, 1, 0, -112.775787353515625, 583.8232421875, -3.47887182235717773, 5.602506637573242187, 7200, 0, 0, 24420, 4868, 0, 0, 0, 0, 46248), -- Revanchion
|
||||
(@CGUID+2, 14693, 189, 796, 796, 1, 1, 0, 1797.8409423828125, 1233.681884765625, 18.31528472900390625, 1.58285677433013916, 7200, 0, 0, 7104, 5610, 0, 0, 0, 0, 46248), -- Scorn
|
||||
(@CGUID+3, 14682, 33, 209, 209, 1, 1, 0, -225.131271362304687, 2302.951416015625, 94.75986480712890625, 6.021385669708251953, 7200, 0, 0, 4689, 0, 0, 0, 0, 0, 46248), -- Sever
|
||||
(@CGUID+4, 14684, 329, 2017, 2017, 1, 1, 0, 3733.270751953125, -3480.114013671875, 131.0400848388671875, 3.054326057434082031, 7200, 0, 0, 14652, 14604, 0, 0, 0, 0, 46248); -- Balzaphon
|
||||
|
||||
DELETE FROM `game_event_creature` WHERE `eventEntry` = 17 AND `guid` IN (@CGUID, @CGUID+1, @CGUID+2, @CGUID+3, @CGUID+4);
|
||||
INSERT INTO `game_event_creature` (`eventEntry`, `guid`) VALUES
|
||||
(17, @CGUID),
|
||||
(17, @CGUID+1),
|
||||
(17, @CGUID+2),
|
||||
(17, @CGUID+3),
|
||||
(17, @CGUID+4);
|
||||
|
||||
DELETE FROM `gameobject` WHERE `guid` IN (@OGUID, @OGUID+1, @OGUID+2, @OGUID+3, @OGUID+4, @OGUID+5, @OGUID+6, @OGUID+7, @OGUID+8, @OGUID+9, @OGUID+10, @OGUID+11, @OGUID+12, @OGUID+13, @OGUID+14, @OGUID+15, @OGUID+16, @OGUID+17, @OGUID+18, @OGUID+19, @OGUID+20, @OGUID+21);
|
||||
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`) VALUES
|
||||
(@OGUID, 181154, 0, 139, 2268, 1, 1, 2101.685791015625, -4930.03271484375, 168.280731201171875, 1.047197580337524414, 0, 0, 0.5, 0.866025388240814208, 120, 255, 1, 46248),
|
||||
(@OGUID+1, 181154, 0, 139, 0, 1, 1, 1766.673583984375, -3033.34375, 132.804443359375, 5.183629035949707031, 0, 0, -0.52249813079833984, 0.852640450000762939, 120, 255, 1, 46248),
|
||||
(@OGUID+2, 181154, 0, 46, 250, 1, 1, -7733.71533203125, -2432.741455078125, 190.785552978515625, 2.67034769058227539, 0, 0, 0.972369194030761718, 0.233448356389999389, 120, 255, 1, 46248),
|
||||
(@OGUID+3, 181154, 0, 46, 0, 1, 1, -8232.78125, -1099.85595703125, 201.48846435546875, 5.183629035949707031, 0, 0, -0.52249813079833984, 0.852640450000762939, 120, 255, 1, 46248),
|
||||
(@OGUID+4, 181154, 1, 16, 878, 1, 1, 3299.553955078125, -4301.30029296875, 177.8075714111328125, 5.811946868896484375, 0, 0, -0.2334451675415039, 0.972369968891143798, 120, 255, 1, 46248),
|
||||
(@OGUID+5, 181154, 1, 16, 1221, 1, 1, 3544.9775390625, -5610.2587890625, 67.1126861572265625, 2.827429771423339843, 0, 0, 0.987688064575195312, 0.156436234712600708, 120, 255, 1, 46248),
|
||||
(@OGUID+6, 181172, 0, 1537, 1537, 1, 1, -5122.8037109375, -725, 505.466796875, 0.034906249493360519, 0, 0, 0.017452239990234375, 0.999847710132598876, 120, 255, 1, 46248), -- Ironforge
|
||||
(@OGUID+7, 181172, 0, 85, 159, 1, 1, 1869.017333984375, 266.873260498046875, 114.8150634765625, 0.541050612926483154, 0, 0, 0.267237663269042968, 0.96363067626953125, 120, 255, 1, 46248), -- Undercity
|
||||
(@OGUID+8, 181172, 530, 3430, 3430, 1, 1, 9291.169921875, -7293.32373046875, 133.3386993408203125, 3.124123096466064453, 0, 0, 0.99996185302734375, 0.008734640665352344, 120, 255, 1, 46248), -- Silvermoon City
|
||||
(@OGUID+9, 181172, 1, 1637, 1637, 1, 1, 1085.60595703125, -4346.095703125, 88.066192626953125, 3.804818391799926757, 0, 0, -0.94551849365234375, 0.325568377971649169, 120, 255, 1, 46248), -- Orgrimmar
|
||||
(@OGUID+10, 181172, 1, 1638, 1638, 1, 1, -1511.828125, 101.7222213745117187, 108.5687103271484375, 1.832594871520996093, 0, 0, 0.793353080749511718, 0.608761727809906005, 120, 255, 1, 46248), -- Thunder Bluff
|
||||
(@OGUID+11, 181172, 530, 3524, 0, 1, 1, -4077.8564453125, -12036.9033203125, 125.0732421875, 3.560472726821899414, 0, 0, -0.97814750671386718, 0.207912087440490722, 120, 255, 1, 46248), -- Exodar
|
||||
(@OGUID+12, 181172, 1, 1657, 0, 1, 1, 9972.625, 1993.2760009765625, 1406.1517333984375, 4.345870018005371093, 0, 0, -0.82412624359130859, 0.566406130790710449, 120, 255, 1, 46248), -- Darnassus
|
||||
(@OGUID+13, 181172, 0, 1519, 1519, 1, 1, -9159.76953125, 345.552093505859375, 156.4009552001953125, 3.560472726821899414, 0, 0, -0.97814750671386718, 0.207912087440490722, 120, 255, 1, 46248), -- Stormwind
|
||||
(@OGUID+14, 181215, 1, 440, 0, 1, 1, -7399.953125, -3733.060791015625, 61.05036163330078125, 5.811946868896484375, 0, 0, -0.2334451675415039, 0.972369968891143798, 120, 255, 1, 46248),
|
||||
(@OGUID+15, 181215, 1, 440, 1939, 1, 1, -8333.6806640625, -3966.395751953125, 77.8482666015625, 1.378809213638305664, 0, 0, 0.636077880859375, 0.771624863147735595, 120, 255, 1, 46248),
|
||||
(@OGUID+16, 181215, 1, 440, 983, 1, 1, -8633.2119140625, -2499.8212890625, 114.0166397094726562, 2.827429771423339843, 0, 0, 0.987688064575195312, 0.156436234712600708, 120, 255, 1, 46248),
|
||||
(@OGUID+17, 181223, 0, 4, 1438, 1, 1, -11402.095703125, -3316.55029296875, 111.1883392333984375, 4.468043327331542968, 0, 0, -0.7880105972290039, 0.615661680698394775, 120, 255, 1, 46248),
|
||||
(@OGUID+18, 181223, 1, 618, 0, 1, 1, 7755.751953125, -4030.913330078125, 786.49627685546875, 0.471238493919372558, 0, 0, 0.233445167541503906, 0.972369968891143798, 120, 255, 1, 46248),
|
||||
(@OGUID+19, 181223, 1, 618, 0, 1, 1, 6646.68603515625, -3442.364501953125, 792.91644287109375, 4.869470596313476562, 0, 0, -0.64944744110107421, 0.760406434535980224, 120, 255, 1, 46248),
|
||||
(@OGUID+20, 181373, 1, 618, 2250, 1, 1, 6184.28125, -4913.3193359375, 807.67633056640625, 6.09120035171508789, 0, 0, -0.09584522247314453, 0.995396256446838378, 120, 255, 1, 46248),
|
||||
(@OGUID+21, 181374, 0, 4, 1438, 1, 1, -11233.9111328125, -2841.7744140625, 185.6030731201171875, 4.45059061050415039, 0, 0, -0.79335308074951171, 0.608761727809906005, 120, 255, 1, 46248);
|
||||
|
||||
DELETE FROM `game_event_gameobject` WHERE `eventEntry` = 17 AND `guid` IN (@OGUID, @OGUID+1, @OGUID+2, @OGUID+3, @OGUID+4, @OGUID+5, @OGUID+6, @OGUID+7, @OGUID+8, @OGUID+9, @OGUID+10, @OGUID+11, @OGUID+12, @OGUID+13, @OGUID+14, @OGUID+15, @OGUID+16, @OGUID+17, @OGUID+18, @OGUID+19, @OGUID+20, @OGUID+21);
|
||||
INSERT INTO `game_event_gameobject` (`eventEntry`, `guid`) VALUES
|
||||
(17, @OGUID),
|
||||
(17, @OGUID+1),
|
||||
(17, @OGUID+2),
|
||||
(17, @OGUID+3),
|
||||
(17, @OGUID+4),
|
||||
(17, @OGUID+5),
|
||||
(17, @OGUID+6),
|
||||
(17, @OGUID+7),
|
||||
(17, @OGUID+8),
|
||||
(17, @OGUID+9),
|
||||
(17, @OGUID+10),
|
||||
(17, @OGUID+11),
|
||||
(17, @OGUID+12),
|
||||
(17, @OGUID+13),
|
||||
(17, @OGUID+14),
|
||||
(17, @OGUID+15),
|
||||
(17, @OGUID+16),
|
||||
(17, @OGUID+17),
|
||||
(17, @OGUID+18),
|
||||
(17, @OGUID+19),
|
||||
(17, @OGUID+20),
|
||||
(17, @OGUID+21);
|
||||
@@ -0,0 +1,4 @@
|
||||
-- DB update 2022_12_12_00 -> 2022_12_12_01
|
||||
--
|
||||
UPDATE `spell_script_names` SET `spell_id`=64579 WHERE `spell_id`=64568 AND `ScriptName`='spell_gen_proc_above_75';
|
||||
UPDATE `spell_script_names` SET `spell_id`=64441 WHERE `spell_id`=64440 AND `ScriptName`='spell_gen_proc_above_75';
|
||||
@@ -2483,6 +2483,15 @@ Rate.Pet.LevelXP = 0.05
|
||||
|
||||
WaterBreath.Timer = 180000
|
||||
|
||||
#
|
||||
# EnableLowLevelRegenBoost
|
||||
# Description: Greatly increase Health and Mana regen rates for players under level 15 (Added in patch 3.3)
|
||||
# Default: 1 - Enabled
|
||||
# 0 - Disabled
|
||||
#
|
||||
|
||||
EnableLowLevelRegenBoost = 1
|
||||
|
||||
#
|
||||
# SkillGain.Crafting
|
||||
# SkillGain.Defense
|
||||
|
||||
@@ -3511,16 +3511,21 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
|
||||
break;
|
||||
}
|
||||
case SMART_EVENT_FRIENDLY_MISSING_BUFF:
|
||||
{
|
||||
if (e.event.missingBuff.onlyInCombat && !me->IsEngaged())
|
||||
{
|
||||
std::vector<Creature*> creatures;
|
||||
DoFindFriendlyMissingBuff(creatures, float(e.event.missingBuff.radius), e.event.missingBuff.spell);
|
||||
|
||||
if (creatures.empty())
|
||||
return;
|
||||
|
||||
ProcessTimedAction(e, e.event.missingBuff.repeatMin, e.event.missingBuff.repeatMax, Acore::Containers::SelectRandomContainerElement(creatures));
|
||||
break;
|
||||
return;
|
||||
}
|
||||
|
||||
std::vector<Creature*> creatures;
|
||||
DoFindFriendlyMissingBuff(creatures, float(e.event.missingBuff.radius), e.event.missingBuff.spell);
|
||||
|
||||
if (creatures.empty())
|
||||
return;
|
||||
|
||||
ProcessTimedAction(e, e.event.missingBuff.repeatMin, e.event.missingBuff.repeatMax, Acore::Containers::SelectRandomContainerElement(creatures));
|
||||
break;
|
||||
}
|
||||
case SMART_EVENT_HAS_AURA:
|
||||
{
|
||||
if (!me)
|
||||
|
||||
@@ -131,7 +131,7 @@ enum SMART_EVENT
|
||||
SMART_EVENT_VICTIM_CASTING = 13, // RepeatMin, RepeatMax, spellid
|
||||
SMART_EVENT_FRIENDLY_HEALTH = 14, // HPDeficit, Radius, RepeatMin, RepeatMax
|
||||
SMART_EVENT_FRIENDLY_IS_CC = 15, // Radius, RepeatMin, RepeatMax
|
||||
SMART_EVENT_FRIENDLY_MISSING_BUFF = 16, // SpellId, Radius, RepeatMin, RepeatMax
|
||||
SMART_EVENT_FRIENDLY_MISSING_BUFF = 16, // SpellId, Radius, RepeatMin, RepeatMax, onlyInCombat
|
||||
SMART_EVENT_SUMMONED_UNIT = 17, // CreatureId(0 all), CooldownMin, CooldownMax
|
||||
SMART_EVENT_TARGET_MANA_PCT = 18, // ManaMin%, ManaMax%, RepeatMin, RepeatMax
|
||||
SMART_EVENT_ACCEPTED_QUEST = 19, // QuestID (0 = any), CooldownMin, CooldownMax
|
||||
@@ -301,6 +301,7 @@ struct SmartEvent
|
||||
uint32 radius;
|
||||
uint32 repeatMin;
|
||||
uint32 repeatMax;
|
||||
uint32 onlyInCombat;
|
||||
} missingBuff;
|
||||
|
||||
struct
|
||||
|
||||
@@ -1850,7 +1850,7 @@ void Player::Regenerate(Powers power)
|
||||
bool recentCast = IsUnderLastManaUseEffect();
|
||||
float ManaIncreaseRate = sWorld->getRate(RATE_POWER_MANA);
|
||||
|
||||
if (getLevel() < 15)
|
||||
if (sWorld->getBoolConfig(CONFIG_LOW_LEVEL_REGEN_BOOST) && getLevel() < 15)
|
||||
ManaIncreaseRate = sWorld->getRate(RATE_POWER_MANA) * (2.066f - (getLevel() * 0.066f));
|
||||
|
||||
if (recentCast) // Trinity Updates Mana in intervals of 2s, which is correct
|
||||
@@ -1960,7 +1960,7 @@ void Player::RegenerateHealth()
|
||||
|
||||
float HealthIncreaseRate = sWorld->getRate(RATE_HEALTH);
|
||||
|
||||
if (getLevel() < 15)
|
||||
if (sWorld->getBoolConfig(CONFIG_LOW_LEVEL_REGEN_BOOST) && getLevel() < 15)
|
||||
HealthIncreaseRate = sWorld->getRate(RATE_HEALTH) * (2.066f - (getLevel() * 0.066f));
|
||||
|
||||
float addvalue = 0.0f;
|
||||
|
||||
@@ -6793,7 +6793,7 @@ bool Player::Satisfy(DungeonProgressionRequirements const* ar, uint32 target_map
|
||||
{
|
||||
Player* checkPlayer = this;
|
||||
std::vector<const ProgressionRequirement*>* missingAchievements = &missingPlayerAchievements;
|
||||
if(achievementRequirement->checkLeaderOnly)
|
||||
if (achievementRequirement->checkLeaderOnly)
|
||||
{
|
||||
checkPlayer = partyLeader;
|
||||
missingAchievements = &missingLeaderAchievements;
|
||||
@@ -6859,15 +6859,20 @@ bool Player::Satisfy(DungeonProgressionRequirements const* ar, uint32 target_map
|
||||
//Just print out the requirements are not met
|
||||
ChatHandler(GetSession()).SendSysMessage(LANG_ACCESS_REQUIREMENT_NOT_MET);
|
||||
}
|
||||
else if(requirementPrintMode == 1)
|
||||
else if (requirementPrintMode == 1)
|
||||
{
|
||||
//Blizzlike method of printing out the requirements
|
||||
if (missingLeaderQuests.size() && !missingLeaderQuests[0]->note.empty())
|
||||
if (missingPlayerQuests.size() && !missingPlayerQuests[0]->note.empty())
|
||||
{
|
||||
ChatHandler(GetSession()).PSendSysMessage("%s", missingPlayerQuests[0]->note.c_str());
|
||||
}
|
||||
else if (missingLeaderQuests.size() && !missingLeaderQuests[0]->note.empty())
|
||||
{
|
||||
ChatHandler(GetSession()).PSendSysMessage("%s", missingLeaderQuests[0]->note.c_str());
|
||||
}
|
||||
else if (mapDiff->hasErrorMessage)
|
||||
{ // if (missingAchievement) covered by this case
|
||||
{
|
||||
// if (missingAchievement) covered by this case
|
||||
SendTransferAborted(target_map, TRANSFER_ABORT_DIFFICULTY, target_difficulty);
|
||||
}
|
||||
else if (missingPlayerItems.size())
|
||||
|
||||
@@ -530,7 +530,7 @@ void Unit::Update(uint32 p_time)
|
||||
|
||||
ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, IsAlive() ? HealthBelowPct(20) : false);
|
||||
ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, IsAlive() ? HealthBelowPct(35) : false);
|
||||
ModifyAuraState(AURA_STATE_HEALTH_ABOVE_75_PERCENT, IsAlive() ? HealthBelowPct(75) : false);
|
||||
ModifyAuraState(AURA_STATE_HEALTH_ABOVE_75_PERCENT, IsAlive() ? HealthAbovePct(75) : false);
|
||||
|
||||
UpdateSplineMovement(p_time);
|
||||
GetMotionMaster()->UpdateMotion(p_time);
|
||||
@@ -16887,11 +16887,11 @@ void Unit::RestoreDisplayId()
|
||||
AuraEffect* handledAura = nullptr;
|
||||
AuraEffect* handledAuraForced = nullptr;
|
||||
// try to receive model from transform auras
|
||||
Unit::AuraEffectList const& transforms = GetAuraEffectsByType(SPELL_AURA_TRANSFORM);
|
||||
AuraEffectList const& transforms = GetAuraEffectsByType(SPELL_AURA_TRANSFORM);
|
||||
if (!transforms.empty())
|
||||
{
|
||||
// iterate over already applied transform auras - from newest to oldest
|
||||
for (Unit::AuraEffectList::const_reverse_iterator i = transforms.rbegin(); i != transforms.rend(); ++i)
|
||||
for (auto i = transforms.rbegin(); i != transforms.rend(); ++i)
|
||||
{
|
||||
if (AuraApplication const* aurApp = (*i)->GetBase()->GetApplicationOfTarget(GetGUID()))
|
||||
{
|
||||
@@ -16916,19 +16916,33 @@ void Unit::RestoreDisplayId()
|
||||
handledAura = *i;
|
||||
}
|
||||
|
||||
AuraEffectList const& shapeshiftAura = GetAuraEffectsByType(SPELL_AURA_MOD_SHAPESHIFT);
|
||||
|
||||
// xinef: order of execution is important!
|
||||
// first forced transform auras, then shapeshifts, then normal transform
|
||||
// transform aura was found
|
||||
if (handledAuraForced)
|
||||
{
|
||||
handledAuraForced->HandleEffect(this, AURA_EFFECT_HANDLE_SEND_FOR_CLIENT, true);
|
||||
// we've found shapeshift
|
||||
else if (uint32 modelId = GetModelForForm(GetShapeshiftForm()))
|
||||
SetDisplayId(modelId);
|
||||
return;
|
||||
}
|
||||
else if (!shapeshiftAura.empty()) // we've found shapeshift
|
||||
{
|
||||
// only one such aura possible at a time
|
||||
if (uint32 modelId = GetModelForForm(GetShapeshiftForm(), shapeshiftAura.front()->GetId()))
|
||||
{
|
||||
SetDisplayId(modelId);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (handledAura)
|
||||
{
|
||||
handledAura->HandleEffect(this, AURA_EFFECT_HANDLE_SEND_FOR_CLIENT, true);
|
||||
return;
|
||||
}
|
||||
|
||||
// no auras found - set modelid to default
|
||||
else
|
||||
SetDisplayId(GetNativeDisplayId());
|
||||
SetDisplayId(GetNativeDisplayId());
|
||||
}
|
||||
|
||||
void Unit::AddComboPoints(Unit* target, int8 count)
|
||||
@@ -19284,8 +19298,19 @@ uint32 Unit::GetCombatRatingDamageReduction(CombatRating cr, float rate, float c
|
||||
return CalculatePct(damage, percent);
|
||||
}
|
||||
|
||||
uint32 Unit::GetModelForForm(ShapeshiftForm form) const
|
||||
uint32 Unit::GetModelForForm(ShapeshiftForm form, uint32 spellId) const
|
||||
{
|
||||
// Hardcoded cases
|
||||
switch (spellId)
|
||||
{
|
||||
case 7090: // Bear form
|
||||
return 29414;
|
||||
case 35200: // Roc form
|
||||
return 4877;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
switch (form)
|
||||
|
||||
@@ -2303,7 +2303,7 @@ public:
|
||||
void SendPetAIReaction(ObjectGuid guid);
|
||||
///----------End of Pet responses methods----------
|
||||
|
||||
void propagateSpeedChange() { GetMotionMaster()->PropagateSpeedChange(); }
|
||||
void propagateSpeedChange() { GetMotionMaster()->propagateSpeedChange(); }
|
||||
|
||||
// reactive attacks
|
||||
void ClearAllReactives();
|
||||
@@ -2334,7 +2334,7 @@ public:
|
||||
void CastPetAura(PetAura const* aura);
|
||||
bool IsPetAura(Aura const* aura);
|
||||
|
||||
[[nodiscard]] uint32 GetModelForForm(ShapeshiftForm form) const;
|
||||
[[nodiscard]] uint32 GetModelForForm(ShapeshiftForm form, uint32 spellId) const;
|
||||
uint32 GetModelForTotem(PlayerTotemType totemType);
|
||||
|
||||
// Redirect Threat
|
||||
|
||||
@@ -791,7 +791,7 @@ void MotionMaster::MoveRotate(uint32 time, RotateDirection direction)
|
||||
Mutate(new RotateMovementGenerator(time, direction), MOTION_SLOT_ACTIVE);
|
||||
}
|
||||
|
||||
void MotionMaster::PropagateSpeedChange()
|
||||
void MotionMaster::propagateSpeedChange()
|
||||
{
|
||||
/*Impl::container_type::iterator it = Impl::c.begin();
|
||||
for (; it != end(); ++it)
|
||||
@@ -801,7 +801,7 @@ void MotionMaster::PropagateSpeedChange()
|
||||
for (int i = 0; i <= _top; ++i)
|
||||
{
|
||||
if (Impl[i])
|
||||
Impl[i]->UnitSpeedChanged();
|
||||
Impl[i]->unitSpeedChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ public:
|
||||
[[nodiscard]] MovementGeneratorType GetMotionSlotType(int slot) const;
|
||||
[[nodiscard]] uint32 GetCurrentSplineId() const; // Xinef: Escort system
|
||||
|
||||
void PropagateSpeedChange();
|
||||
void propagateSpeedChange();
|
||||
void ReinitializeMovement();
|
||||
|
||||
bool GetDestination(float& x, float& y, float& z);
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
|
||||
virtual uint32 GetSplineId() const { return 0; } // Xinef: Escort system
|
||||
|
||||
virtual void UnitSpeedChanged() { }
|
||||
virtual void unitSpeedChanged() { }
|
||||
|
||||
// timer in ms
|
||||
virtual void Pause(uint32 /* timer = 0*/) {}
|
||||
|
||||
@@ -54,9 +54,9 @@ void ConfusedMovementGenerator<T>::DoInitialize(T* unit)
|
||||
float new_z = unit->GetMapHeight(wanderX, wanderY, z);
|
||||
if (new_z <= INVALID_HEIGHT || std::fabs(z - new_z) > 3.0f) // pussywizard
|
||||
{
|
||||
_waypoints[idx][0] = idx > 0 ? _waypoints[idx - 1][0] : x;
|
||||
_waypoints[idx][1] = idx > 0 ? _waypoints[idx - 1][1] : y;
|
||||
_waypoints[idx][2] = idx > 0 ? _waypoints[idx - 1][2] : z;
|
||||
i_waypoints[idx][0] = idx > 0 ? i_waypoints[idx - 1][0] : x;
|
||||
i_waypoints[idx][1] = idx > 0 ? i_waypoints[idx - 1][1] : y;
|
||||
i_waypoints[idx][2] = idx > 0 ? i_waypoints[idx - 1][2] : z;
|
||||
continue;
|
||||
}
|
||||
else if (unit->IsWithinLOS(wanderX, wanderY, z))
|
||||
@@ -66,32 +66,32 @@ void ConfusedMovementGenerator<T>::DoInitialize(T* unit)
|
||||
if ((is_water && !is_water_ok) || (!is_water && !is_land_ok))
|
||||
{
|
||||
//! Cannot use coordinates outside our InhabitType. Use the current or previous position.
|
||||
_waypoints[idx][0] = idx > 0 ? _waypoints[idx - 1][0] : x;
|
||||
_waypoints[idx][1] = idx > 0 ? _waypoints[idx - 1][1] : y;
|
||||
_waypoints[idx][2] = idx > 0 ? _waypoints[idx - 1][2] : z;
|
||||
i_waypoints[idx][0] = idx > 0 ? i_waypoints[idx - 1][0] : x;
|
||||
i_waypoints[idx][1] = idx > 0 ? i_waypoints[idx - 1][1] : y;
|
||||
i_waypoints[idx][2] = idx > 0 ? i_waypoints[idx - 1][2] : z;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//! Trying to access path outside line of sight. Skip this by using the current or previous position.
|
||||
_waypoints[idx][0] = idx > 0 ? _waypoints[idx - 1][0] : x;
|
||||
_waypoints[idx][1] = idx > 0 ? _waypoints[idx - 1][1] : y;
|
||||
_waypoints[idx][2] = idx > 0 ? _waypoints[idx - 1][2] : z;
|
||||
i_waypoints[idx][0] = idx > 0 ? i_waypoints[idx - 1][0] : x;
|
||||
i_waypoints[idx][1] = idx > 0 ? i_waypoints[idx - 1][1] : y;
|
||||
i_waypoints[idx][2] = idx > 0 ? i_waypoints[idx - 1][2] : z;
|
||||
continue;
|
||||
}
|
||||
|
||||
//unit->UpdateAllowedPositionZ(wanderX, wanderY, z);
|
||||
|
||||
//! Positions are fine - apply them to this waypoint
|
||||
_waypoints[idx][0] = wanderX;
|
||||
_waypoints[idx][1] = wanderY;
|
||||
_waypoints[idx][2] = new_z;
|
||||
i_waypoints[idx][0] = wanderX;
|
||||
i_waypoints[idx][1] = wanderY;
|
||||
i_waypoints[idx][2] = new_z;
|
||||
}
|
||||
|
||||
// Xinef: Call movement immediately to broadcast movement packet
|
||||
// Xinef: Initial timer is set to 1 so update with 1
|
||||
_nextMove = urand(1, MAX_CONF_WAYPOINTS);
|
||||
i_nextMove = urand(1, MAX_CONF_WAYPOINTS);
|
||||
DoUpdate(unit, 1);
|
||||
|
||||
unit->SetUnitFlag(UNIT_FLAG_CONFUSED);
|
||||
@@ -127,30 +127,30 @@ bool ConfusedMovementGenerator<T>::DoUpdate(T* unit, uint32 diff)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (_nextMoveTime.Passed())
|
||||
if (i_nextMoveTime.Passed())
|
||||
{
|
||||
// currently moving, update location
|
||||
unit->AddUnitState(UNIT_STATE_CONFUSED_MOVE);
|
||||
|
||||
if (unit->movespline->Finalized())
|
||||
{
|
||||
_nextMove = urand(1, MAX_CONF_WAYPOINTS);
|
||||
_nextMoveTime.Reset(urand(600, 1200)); // Guessed
|
||||
i_nextMove = urand(1, MAX_CONF_WAYPOINTS);
|
||||
i_nextMoveTime.Reset(urand(600, 1200)); // Guessed
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// waiting for next move
|
||||
_nextMoveTime.Update(diff);
|
||||
if (_nextMoveTime.Passed())
|
||||
i_nextMoveTime.Update(diff);
|
||||
if (i_nextMoveTime.Passed())
|
||||
{
|
||||
// start moving
|
||||
unit->AddUnitState(UNIT_STATE_CONFUSED_MOVE);
|
||||
|
||||
ASSERT(_nextMove <= MAX_CONF_WAYPOINTS);
|
||||
float x = _waypoints[_nextMove][0];
|
||||
float y = _waypoints[_nextMove][1];
|
||||
float z = _waypoints[_nextMove][2];
|
||||
ASSERT(i_nextMove <= MAX_CONF_WAYPOINTS);
|
||||
float x = i_waypoints[i_nextMove][0];
|
||||
float y = i_waypoints[i_nextMove][1];
|
||||
float z = i_waypoints[i_nextMove][2];
|
||||
Movement::MoveSplineInit init(unit);
|
||||
init.MoveTo(x, y, z, true);
|
||||
init.Launch();
|
||||
|
||||
@@ -27,7 +27,7 @@ template<class T>
|
||||
class ConfusedMovementGenerator : public MovementGeneratorMedium< T, ConfusedMovementGenerator<T> >
|
||||
{
|
||||
public:
|
||||
explicit ConfusedMovementGenerator() : _nextMoveTime(1) {}
|
||||
explicit ConfusedMovementGenerator() : i_nextMoveTime(1) {}
|
||||
|
||||
void DoInitialize(T*);
|
||||
void DoFinalize(T*);
|
||||
@@ -37,8 +37,8 @@ public:
|
||||
MovementGeneratorType GetMovementGeneratorType() { return CONFUSED_MOTION_TYPE; }
|
||||
private:
|
||||
void _InitSpecific(T*, bool&, bool&);
|
||||
TimeTracker _nextMoveTime;
|
||||
float _waypoints[MAX_CONF_WAYPOINTS + 1][3];
|
||||
uint32 _nextMove;
|
||||
TimeTracker i_nextMoveTime;
|
||||
float i_waypoints[MAX_CONF_WAYPOINTS + 1][3];
|
||||
uint32 i_nextMove;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "MoveSpline.h"
|
||||
#include "MoveSplineInit.h"
|
||||
#include "Player.h"
|
||||
#include "Unit.h"
|
||||
#include "World.h"
|
||||
|
||||
template<class T>
|
||||
@@ -32,13 +31,13 @@ void EscortMovementGenerator<T>::DoInitialize(T* unit)
|
||||
unit->StopMoving();
|
||||
|
||||
unit->AddUnitState(UNIT_STATE_ROAMING | UNIT_STATE_ROAMING_MOVE);
|
||||
_recalculateSpeed = false;
|
||||
i_recalculateSpeed = false;
|
||||
Movement::MoveSplineInit init(unit);
|
||||
|
||||
if (_precomputedPath.size() == 2) // xinef: simple case, just call move to
|
||||
init.MoveTo(_precomputedPath[1].x, _precomputedPath[1].y, _precomputedPath[1].z, true);
|
||||
else if (_precomputedPath.size())
|
||||
init.MovebyPath(_precomputedPath);
|
||||
if (m_precomputedPath.size() == 2) // xinef: simple case, just call move to
|
||||
init.MoveTo(m_precomputedPath[1].x, m_precomputedPath[1].y, m_precomputedPath[1].z, true);
|
||||
else if (m_precomputedPath.size())
|
||||
init.MovebyPath(m_precomputedPath);
|
||||
|
||||
init.Launch();
|
||||
|
||||
@@ -61,26 +60,26 @@ bool EscortMovementGenerator<T>::DoUpdate(T* unit, uint32 /*diff*/)
|
||||
|
||||
bool arrived = unit->movespline->Finalized();
|
||||
|
||||
if (_recalculateSpeed && !arrived)
|
||||
if (i_recalculateSpeed && !arrived)
|
||||
{
|
||||
_recalculateSpeed = false;
|
||||
i_recalculateSpeed = false;
|
||||
Movement::MoveSplineInit init(unit);
|
||||
|
||||
// xinef: speed changed during path execution, calculate remaining path and launch it once more
|
||||
if (_precomputedPath.size())
|
||||
if (m_precomputedPath.size())
|
||||
{
|
||||
uint32 offset = std::min(uint32(unit->movespline->_currentSplineIdx()), uint32(_precomputedPath.size()));
|
||||
Movement::PointsArray::iterator offsetItr = _precomputedPath.begin();
|
||||
uint32 offset = std::min(uint32(unit->movespline->_currentSplineIdx()), uint32(m_precomputedPath.size()));
|
||||
Movement::PointsArray::iterator offsetItr = m_precomputedPath.begin();
|
||||
std::advance(offsetItr, offset);
|
||||
_precomputedPath.erase(_precomputedPath.begin(), offsetItr);
|
||||
m_precomputedPath.erase(m_precomputedPath.begin(), offsetItr);
|
||||
|
||||
// restore 0 element (current position)
|
||||
_precomputedPath.insert(_precomputedPath.begin(), G3D::Vector3(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ()));
|
||||
m_precomputedPath.insert(m_precomputedPath.begin(), G3D::Vector3(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ()));
|
||||
|
||||
if (_precomputedPath.size() > 2)
|
||||
init.MovebyPath(_precomputedPath);
|
||||
else if (_precomputedPath.size() == 2)
|
||||
init.MoveTo(_precomputedPath[1].x, _precomputedPath[1].y, _precomputedPath[1].z, true);
|
||||
if (m_precomputedPath.size() > 2)
|
||||
init.MovebyPath(m_precomputedPath);
|
||||
else if (m_precomputedPath.size() == 2)
|
||||
init.MoveTo(m_precomputedPath[1].x, m_precomputedPath[1].y, m_precomputedPath[1].z, true);
|
||||
}
|
||||
|
||||
init.Launch();
|
||||
|
||||
@@ -24,10 +24,10 @@ template<class T>
|
||||
class EscortMovementGenerator : public MovementGeneratorMedium< T, EscortMovementGenerator<T> >
|
||||
{
|
||||
public:
|
||||
EscortMovementGenerator(Movement::PointsArray* _path = nullptr) : _recalculateSpeed(false)
|
||||
EscortMovementGenerator(Movement::PointsArray* _path = nullptr) : i_recalculateSpeed(false)
|
||||
{
|
||||
if (_path)
|
||||
_precomputedPath = *_path;
|
||||
m_precomputedPath = *_path;
|
||||
}
|
||||
|
||||
void DoInitialize(T*);
|
||||
@@ -35,15 +35,15 @@ public:
|
||||
void DoReset(T*);
|
||||
bool DoUpdate(T*, uint32);
|
||||
|
||||
void unitSpeedChanged() { _recalculateSpeed = true; }
|
||||
void unitSpeedChanged() { i_recalculateSpeed = true; }
|
||||
|
||||
MovementGeneratorType GetMovementGeneratorType() { return ESCORT_MOTION_TYPE; }
|
||||
|
||||
uint32 GetSplineId() const { return _splineId; }
|
||||
|
||||
private:
|
||||
bool _recalculateSpeed;
|
||||
Movement::PointsArray _precomputedPath;
|
||||
bool i_recalculateSpeed;
|
||||
Movement::PointsArray m_precomputedPath;
|
||||
|
||||
uint32 _splineId;
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@ void HomeMovementGenerator<Creature>::DoInitialize(Creature* owner)
|
||||
void HomeMovementGenerator<Creature>::DoFinalize(Creature* owner)
|
||||
{
|
||||
owner->ClearUnitState(UNIT_STATE_EVADE);
|
||||
if (_arrived)
|
||||
if (arrived)
|
||||
{
|
||||
// Xinef: npc run by default
|
||||
//owner->SetWalk(true);
|
||||
@@ -68,15 +68,15 @@ void HomeMovementGenerator<Creature>::_setTargetLocation(Creature* owner)
|
||||
init.SetWalk(false);
|
||||
init.Launch();
|
||||
|
||||
_arrived = false;
|
||||
arrived = false;
|
||||
|
||||
owner->ClearUnitState(uint32(UNIT_STATE_ALL_STATE & ~(UNIT_STATE_POSSESSED | UNIT_STATE_EVADE | UNIT_STATE_IGNORE_PATHFINDING | UNIT_STATE_NO_ENVIRONMENT_UPD)));
|
||||
}
|
||||
|
||||
bool HomeMovementGenerator<Creature>::DoUpdate(Creature* owner, const uint32 /*time_diff*/)
|
||||
{
|
||||
_arrived = owner->movespline->Finalized();
|
||||
if (_arrived)
|
||||
arrived = owner->movespline->Finalized();
|
||||
if (arrived)
|
||||
return false;
|
||||
|
||||
if (i_recalculateTravel)
|
||||
|
||||
@@ -29,7 +29,7 @@ template <>
|
||||
class HomeMovementGenerator<Creature> : public MovementGeneratorMedium< Creature, HomeMovementGenerator<Creature> >
|
||||
{
|
||||
public:
|
||||
HomeMovementGenerator() : _arrived(false), i_recalculateTravel(false) {}
|
||||
HomeMovementGenerator() : arrived(false), i_recalculateTravel(false) {}
|
||||
~HomeMovementGenerator() {}
|
||||
|
||||
void DoInitialize(Creature*);
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
|
||||
private:
|
||||
void _setTargetLocation(Creature*);
|
||||
bool _arrived : 1;
|
||||
bool arrived : 1;
|
||||
bool i_recalculateTravel : 1;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -99,10 +99,10 @@ void DistractMovementGenerator::Finalize(Unit* owner)
|
||||
|
||||
bool DistractMovementGenerator::Update(Unit* owner, uint32 time_diff)
|
||||
{
|
||||
if (owner->IsInCombat() || time_diff > _timer)
|
||||
if (owner->IsInCombat() || time_diff > m_timer)
|
||||
return false;
|
||||
|
||||
_timer -= time_diff;
|
||||
m_timer -= time_diff;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ private:
|
||||
class DistractMovementGenerator : public MovementGenerator
|
||||
{
|
||||
public:
|
||||
explicit DistractMovementGenerator(uint32 timer) : _timer(timer) {}
|
||||
explicit DistractMovementGenerator(uint32 timer) : m_timer(timer) {}
|
||||
|
||||
void Initialize(Unit*) override;
|
||||
void Finalize(Unit*) override;
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
MovementGeneratorType GetMovementGeneratorType() override { return DISTRACT_MOTION_TYPE; }
|
||||
|
||||
private:
|
||||
uint32 _timer;
|
||||
uint32 m_timer;
|
||||
};
|
||||
|
||||
class AssistanceDistractMovementGenerator : public DistractMovementGenerator
|
||||
|
||||
@@ -33,7 +33,7 @@ void PointMovementGenerator<T>::DoInitialize(T* unit)
|
||||
{
|
||||
// the next line is to ensure that a new spline is created in DoUpdate() once the unit is no longer rooted/stunned
|
||||
// todo: rename this flag to something more appropriate since it is set to true even without speed change now.
|
||||
_recalculateSpeed = true;
|
||||
i_recalculateSpeed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -46,48 +46,48 @@ void PointMovementGenerator<T>::DoInitialize(T* unit)
|
||||
unit->AddUnitState(UNIT_STATE_CHARGING);
|
||||
}
|
||||
|
||||
_recalculateSpeed = false;
|
||||
i_recalculateSpeed = false;
|
||||
Movement::MoveSplineInit init(unit);
|
||||
if (_precomputedPath.size() > 2) // pussywizard: for charge
|
||||
init.MovebyPath(_precomputedPath);
|
||||
if (m_precomputedPath.size() > 2) // pussywizard: for charge
|
||||
init.MovebyPath(m_precomputedPath);
|
||||
else if (_generatePath)
|
||||
{
|
||||
PathGenerator path(unit);
|
||||
bool result = path.CalculatePath(_x, _y, _z, _forceDestination);
|
||||
bool result = path.CalculatePath(i_x, i_y, i_z, _forceDestination);
|
||||
if (result && !(path.GetPathType() & PATHFIND_NOPATH) && path.GetPath().size() > 2)
|
||||
{
|
||||
_precomputedPath = path.GetPath();
|
||||
init.MovebyPath(_precomputedPath);
|
||||
m_precomputedPath = path.GetPath();
|
||||
init.MovebyPath(m_precomputedPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Xinef: fix strange client visual bug, moving on z coordinate only switches orientation by 180 degrees (visual only)
|
||||
if (G3D::fuzzyEq(unit->GetPositionX(), _x) && G3D::fuzzyEq(unit->GetPositionY(), _y))
|
||||
if (G3D::fuzzyEq(unit->GetPositionX(), i_x) && G3D::fuzzyEq(unit->GetPositionY(), i_y))
|
||||
{
|
||||
_x += 0.2f * cos(unit->GetOrientation());
|
||||
_y += 0.2f * std::sin(unit->GetOrientation());
|
||||
i_x += 0.2f * cos(unit->GetOrientation());
|
||||
i_y += 0.2f * std::sin(unit->GetOrientation());
|
||||
}
|
||||
|
||||
init.MoveTo(_x, _y, _z, true);
|
||||
init.MoveTo(i_x, i_y, i_z, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Xinef: fix strange client visual bug, moving on z coordinate only switches orientation by 180 degrees (visual only)
|
||||
if (G3D::fuzzyEq(unit->GetPositionX(), _x) && G3D::fuzzyEq(unit->GetPositionY(), _y))
|
||||
if (G3D::fuzzyEq(unit->GetPositionX(), i_x) && G3D::fuzzyEq(unit->GetPositionY(), i_y))
|
||||
{
|
||||
_x += 0.2f * cos(unit->GetOrientation());
|
||||
_y += 0.2f * std::sin(unit->GetOrientation());
|
||||
i_x += 0.2f * cos(unit->GetOrientation());
|
||||
i_y += 0.2f * std::sin(unit->GetOrientation());
|
||||
}
|
||||
|
||||
init.MoveTo(_x, _y, _z, true);
|
||||
init.MoveTo(i_x, i_y, i_z, true);
|
||||
}
|
||||
if (speed > 0.0f)
|
||||
init.SetVelocity(speed);
|
||||
|
||||
if (_orientation > 0.0f)
|
||||
if (i_orientation > 0.0f)
|
||||
{
|
||||
init.SetFacing(_orientation);
|
||||
init.SetFacing(i_orientation);
|
||||
}
|
||||
|
||||
init.Launch();
|
||||
@@ -117,35 +117,35 @@ bool PointMovementGenerator<T>::DoUpdate(T* unit, uint32 /*diff*/)
|
||||
|
||||
unit->AddUnitState(UNIT_STATE_ROAMING_MOVE);
|
||||
|
||||
if (id != EVENT_CHARGE_PREPATH && _recalculateSpeed && !unit->movespline->Finalized())
|
||||
if (id != EVENT_CHARGE_PREPATH && i_recalculateSpeed && !unit->movespline->Finalized())
|
||||
{
|
||||
_recalculateSpeed = false;
|
||||
i_recalculateSpeed = false;
|
||||
Movement::MoveSplineInit init(unit);
|
||||
|
||||
// xinef: speed changed during path execution, calculate remaining path and launch it once more
|
||||
if (_precomputedPath.size())
|
||||
if (m_precomputedPath.size())
|
||||
{
|
||||
uint32 offset = std::min(uint32(unit->movespline->_currentSplineIdx()), uint32(_precomputedPath.size()));
|
||||
Movement::PointsArray::iterator offsetItr = _precomputedPath.begin();
|
||||
uint32 offset = std::min(uint32(unit->movespline->_currentSplineIdx()), uint32(m_precomputedPath.size()));
|
||||
Movement::PointsArray::iterator offsetItr = m_precomputedPath.begin();
|
||||
std::advance(offsetItr, offset);
|
||||
_precomputedPath.erase(_precomputedPath.begin(), offsetItr);
|
||||
m_precomputedPath.erase(m_precomputedPath.begin(), offsetItr);
|
||||
|
||||
// restore 0 element (current position)
|
||||
_precomputedPath.insert(_precomputedPath.begin(), G3D::Vector3(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ()));
|
||||
m_precomputedPath.insert(m_precomputedPath.begin(), G3D::Vector3(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ()));
|
||||
|
||||
if (_precomputedPath.size() > 2)
|
||||
init.MovebyPath(_precomputedPath);
|
||||
else if (_precomputedPath.size() == 2)
|
||||
init.MoveTo(_precomputedPath[1].x, _precomputedPath[1].y, _precomputedPath[1].z, true);
|
||||
if (m_precomputedPath.size() > 2)
|
||||
init.MovebyPath(m_precomputedPath);
|
||||
else if (m_precomputedPath.size() == 2)
|
||||
init.MoveTo(m_precomputedPath[1].x, m_precomputedPath[1].y, m_precomputedPath[1].z, true);
|
||||
}
|
||||
else
|
||||
init.MoveTo(_x, _y, _z, true);
|
||||
init.MoveTo(i_x, i_y, i_z, true);
|
||||
if (speed > 0.0f) // Default value for point motion type is 0.0, if 0.0 spline will use GetSpeed on unit
|
||||
init.SetVelocity(speed);
|
||||
|
||||
if (_orientation > 0.0f)
|
||||
if (i_orientation > 0.0f)
|
||||
{
|
||||
init.SetFacing(_orientation);
|
||||
init.SetFacing(i_orientation);
|
||||
}
|
||||
|
||||
init.Launch();
|
||||
@@ -247,5 +247,5 @@ void EffectMovementGenerator::Finalize(Unit* unit)
|
||||
//}
|
||||
|
||||
if (unit->ToCreature()->AI())
|
||||
unit->ToCreature()->AI()->MovementInform(EFFECT_MOTION_TYPE, _Id);
|
||||
unit->ToCreature()->AI()->MovementInform(EFFECT_MOTION_TYPE, m_Id);
|
||||
}
|
||||
|
||||
@@ -27,11 +27,11 @@ class PointMovementGenerator : public MovementGeneratorMedium< T, PointMovementG
|
||||
public:
|
||||
PointMovementGenerator(uint32 _id, float _x, float _y, float _z, float _speed = 0.0f, float orientation = 0.0f, const Movement::PointsArray* _path = nullptr,
|
||||
bool generatePath = false, bool forceDestination = false, ObjectGuid chargeTargetGUID = ObjectGuid::Empty)
|
||||
: id(_id), _x(_x), _y(_y), _z(_z), speed(_speed), _orientation(orientation), _generatePath(generatePath), _forceDestination(forceDestination),
|
||||
: id(_id), i_x(_x), i_y(_y), i_z(_z), speed(_speed), i_orientation(orientation), _generatePath(generatePath), _forceDestination(forceDestination),
|
||||
_chargeTargetGUID(chargeTargetGUID)
|
||||
{
|
||||
if (_path)
|
||||
_precomputedPath = *_path;
|
||||
m_precomputedPath = *_path;
|
||||
}
|
||||
|
||||
void DoInitialize(T*);
|
||||
@@ -41,18 +41,18 @@ public:
|
||||
|
||||
void MovementInform(T*);
|
||||
|
||||
void unitSpeedChanged() { _recalculateSpeed = true; }
|
||||
void unitSpeedChanged() { i_recalculateSpeed = true; }
|
||||
|
||||
MovementGeneratorType GetMovementGeneratorType() { return POINT_MOTION_TYPE; }
|
||||
|
||||
bool GetDestination(float& x, float& y, float& z) const { x = _x; y = _y; z = _z; return true; }
|
||||
bool GetDestination(float& x, float& y, float& z) const { x = i_x; y = i_y; z = i_z; return true; }
|
||||
private:
|
||||
uint32 id;
|
||||
float _x, _y, _z;
|
||||
float i_x, i_y, i_z;
|
||||
float speed;
|
||||
float _orientation;
|
||||
bool _recalculateSpeed;
|
||||
Movement::PointsArray _precomputedPath;
|
||||
float i_orientation;
|
||||
bool i_recalculateSpeed;
|
||||
Movement::PointsArray m_precomputedPath;
|
||||
bool _generatePath;
|
||||
bool _forceDestination;
|
||||
ObjectGuid _chargeTargetGUID;
|
||||
@@ -72,14 +72,14 @@ public:
|
||||
class EffectMovementGenerator : public MovementGenerator
|
||||
{
|
||||
public:
|
||||
explicit EffectMovementGenerator(uint32 Id) : _Id(Id) {}
|
||||
explicit EffectMovementGenerator(uint32 Id) : m_Id(Id) {}
|
||||
void Initialize(Unit*) override {}
|
||||
void Finalize(Unit*) override;
|
||||
void Reset(Unit*) override {}
|
||||
bool Update(Unit*, uint32) override;
|
||||
MovementGeneratorType GetMovementGeneratorType() override { return EFFECT_MOTION_TYPE; }
|
||||
private:
|
||||
uint32 _Id;
|
||||
uint32 m_Id;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,7 +36,7 @@ RandomMovementGenerator<Creature>::~RandomMovementGenerator()
|
||||
}
|
||||
|
||||
template<>
|
||||
void RandomMovementGenerator<Creature>::SetRandomLocation(Creature* creature)
|
||||
void RandomMovementGenerator<Creature>::_setRandomLocation(Creature* creature)
|
||||
{
|
||||
if (creature->_moveState != MAP_OBJECT_CELL_MOVE_NONE)
|
||||
return;
|
||||
@@ -292,7 +292,7 @@ bool RandomMovementGenerator<Creature>::DoUpdate(Creature* creature, const uint3
|
||||
{
|
||||
_nextMoveTime.Update(diff);
|
||||
if (_nextMoveTime.Passed())
|
||||
SetRandomLocation(creature);
|
||||
_setRandomLocation(creature);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
}
|
||||
~RandomMovementGenerator();
|
||||
|
||||
void SetRandomLocation(T*);
|
||||
void _setRandomLocation(T*);
|
||||
void DoInitialize(T*);
|
||||
void DoFinalize(T*);
|
||||
void DoReset(T*);
|
||||
|
||||
@@ -115,6 +115,10 @@ bool ChaseMovementGenerator<T>::DoUpdate(T* owner, uint32 time_diff)
|
||||
if (owner->IsWithinMeleeRange(this->i_target.getTarget()))
|
||||
{
|
||||
owner->Attack(this->i_target.getTarget(), true);
|
||||
if (Creature* cOwner2 = owner->ToCreature())
|
||||
{
|
||||
cOwner2->SetCannotReachTarget();
|
||||
}
|
||||
}
|
||||
else if (i_path && i_path->GetPathType() & PATHFIND_INCOMPLETE)
|
||||
{
|
||||
@@ -134,7 +138,14 @@ bool ChaseMovementGenerator<T>::DoUpdate(T* owner, uint32 time_diff)
|
||||
_lastTargetPosition = i_target->GetPosition();
|
||||
|
||||
if (PositionOkay(owner, target, maxRange, angle) && !owner->HasUnitState(UNIT_STATE_CHASE_MOVE))
|
||||
{
|
||||
if (Creature* cOwner2 = owner->ToCreature())
|
||||
{
|
||||
cOwner2->SetCannotReachTarget();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
float tarX, tarY, tarZ;
|
||||
target->GetPosition(tarX, tarY, tarZ);
|
||||
@@ -207,15 +218,15 @@ bool ChaseMovementGenerator<T>::DoUpdate(T* owner, uint32 time_diff)
|
||||
{
|
||||
switch (cOwner->GetMovementTemplate().GetChase())
|
||||
{
|
||||
case CreatureChaseMovementType::CanWalk:
|
||||
if (owner->IsWalking())
|
||||
case CreatureChaseMovementType::CanWalk:
|
||||
if (owner->IsWalking())
|
||||
walk = true;
|
||||
break;
|
||||
case CreatureChaseMovementType::AlwaysWalk:
|
||||
walk = true;
|
||||
break;
|
||||
case CreatureChaseMovementType::AlwaysWalk:
|
||||
walk = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,22 +75,22 @@ void WaypointMovementGenerator<Creature>::OnArrived(Creature* creature)
|
||||
creature->ClearUnitState(UNIT_STATE_ROAMING_MOVE);
|
||||
m_isArrivalDone = true;
|
||||
|
||||
if (i_path->at(_currentNode)->event_id && urand(0, 99) < i_path->at(_currentNode)->event_chance)
|
||||
if (i_path->at(i_currentNode)->event_id && urand(0, 99) < i_path->at(i_currentNode)->event_chance)
|
||||
{
|
||||
LOG_DEBUG("maps.script", "Creature movement start script {} at point {} for {}.",
|
||||
i_path->at(_currentNode)->event_id, _currentNode, creature->GetGUID().ToString());
|
||||
i_path->at(i_currentNode)->event_id, i_currentNode, creature->GetGUID().ToString());
|
||||
creature->ClearUnitState(UNIT_STATE_ROAMING_MOVE);
|
||||
creature->GetMap()->ScriptsStart(sWaypointScripts, i_path->at(_currentNode)->event_id, creature, nullptr);
|
||||
creature->GetMap()->ScriptsStart(sWaypointScripts, i_path->at(i_currentNode)->event_id, creature, nullptr);
|
||||
}
|
||||
|
||||
// Inform script
|
||||
MovementInform(creature);
|
||||
creature->UpdateWaypointID(_currentNode);
|
||||
creature->UpdateWaypointID(i_currentNode);
|
||||
|
||||
if (i_path->at(_currentNode)->delay)
|
||||
if (i_path->at(i_currentNode)->delay)
|
||||
{
|
||||
creature->ClearUnitState(UNIT_STATE_ROAMING_MOVE);
|
||||
Stop(i_path->at(_currentNode)->delay);
|
||||
Stop(i_path->at(i_currentNode)->delay);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,11 +111,11 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature* creature)
|
||||
if (m_isArrivalDone)
|
||||
{
|
||||
// Xinef: not true... update this at every waypoint!
|
||||
//if ((_currentNode == i_path->size() - 1) && !repeating) // If that's our last waypoint
|
||||
//if ((i_currentNode == i_path->size() - 1) && !repeating) // If that's our last waypoint
|
||||
{
|
||||
float x = i_path->at(_currentNode)->x;
|
||||
float y = i_path->at(_currentNode)->y;
|
||||
float z = i_path->at(_currentNode)->z;
|
||||
float x = i_path->at(i_currentNode)->x;
|
||||
float y = i_path->at(i_currentNode)->y;
|
||||
float z = i_path->at(i_currentNode)->z;
|
||||
float o = creature->GetOrientation();
|
||||
|
||||
if (!transportPath)
|
||||
@@ -136,14 +136,14 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature* creature)
|
||||
}
|
||||
|
||||
// Xinef: moved the upper IF here
|
||||
if ((_currentNode == i_path->size() - 1) && !repeating) // If that's our last waypoint
|
||||
if ((i_currentNode == i_path->size() - 1) && !repeating) // If that's our last waypoint
|
||||
{
|
||||
creature->AI()->PathEndReached(path_id);
|
||||
creature->GetMotionMaster()->Initialize();
|
||||
return false;
|
||||
}
|
||||
|
||||
_currentNode = (_currentNode + 1) % i_path->size();
|
||||
i_currentNode = (i_currentNode + 1) % i_path->size();
|
||||
}
|
||||
|
||||
// xinef: do not initialize motion if we got stunned in movementinform
|
||||
@@ -152,7 +152,7 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature* creature)
|
||||
return true;
|
||||
}
|
||||
|
||||
WaypointData const* node = i_path->at(_currentNode);
|
||||
WaypointData const* node = i_path->at(i_currentNode);
|
||||
|
||||
m_isArrivalDone = false;
|
||||
|
||||
@@ -238,7 +238,7 @@ bool WaypointMovementGenerator<Creature>::DoUpdate(Creature* creature, uint32 di
|
||||
bool finished = creature->movespline->Finalized();
|
||||
// xinef: code to detect pre-empetively if we should start movement to next waypoint
|
||||
// xinef: do not start pre-empetive movement if current node has delay or we are ending waypoint movement
|
||||
//if (!finished && !i_path->at(_currentNode)->delay && ((_currentNode != i_path->size() - 1) || repeating))
|
||||
//if (!finished && !i_path->at(i_currentNode)->delay && ((i_currentNode != i_path->size() - 1) || repeating))
|
||||
// finished = (creature->movespline->_Spline().length(creature->movespline->_currentSplineIdx() + 1) - creature->movespline->timePassed()) < 200;
|
||||
|
||||
if (finished)
|
||||
@@ -254,13 +254,13 @@ bool WaypointMovementGenerator<Creature>::DoUpdate(Creature* creature, uint32 di
|
||||
void WaypointMovementGenerator<Creature>::MovementInform(Creature* creature)
|
||||
{
|
||||
if (creature->AI())
|
||||
creature->AI()->MovementInform(WAYPOINT_MOTION_TYPE, _currentNode);
|
||||
creature->AI()->MovementInform(WAYPOINT_MOTION_TYPE, i_currentNode);
|
||||
|
||||
if (Unit* owner = creature->GetCharmerOrOwner())
|
||||
{
|
||||
if (UnitAI* AI = owner->GetAI())
|
||||
{
|
||||
AI->SummonMovementInform(creature, WAYPOINT_MOTION_TYPE, _currentNode);
|
||||
AI->SummonMovementInform(creature, WAYPOINT_MOTION_TYPE, i_currentNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -269,13 +269,13 @@ void WaypointMovementGenerator<Creature>::MovementInform(Creature* creature)
|
||||
|
||||
uint32 FlightPathMovementGenerator::GetPathAtMapEnd() const
|
||||
{
|
||||
if (_currentNode >= i_path.size())
|
||||
if (i_currentNode >= i_path.size())
|
||||
{
|
||||
return i_path.size();
|
||||
}
|
||||
|
||||
uint32 curMapId = i_path[_currentNode]->mapid;
|
||||
for (uint32 i = _currentNode; i < i_path.size(); ++i)
|
||||
uint32 curMapId = i_path[i_currentNode]->mapid;
|
||||
for (uint32 i = i_currentNode; i < i_path.size(); ++i)
|
||||
{
|
||||
if (i_path[i]->mapid != curMapId)
|
||||
{
|
||||
@@ -401,15 +401,15 @@ bool FlightPathMovementGenerator::DoUpdate(Player* player, uint32 /*diff*/)
|
||||
{
|
||||
// skipping the first spline path point because it's our starting point and not a taxi path point
|
||||
uint32 pointId = player->movespline->currentPathIdx() <= 0 ? 0 : player->movespline->currentPathIdx() - 1;
|
||||
if (pointId > _currentNode && _currentNode < i_path.size() - 1)
|
||||
if (pointId > i_currentNode && i_currentNode < i_path.size() - 1)
|
||||
{
|
||||
bool departureEvent = true;
|
||||
do
|
||||
{
|
||||
ASSERT(_currentNode < i_path.size(), "Point Id: {}\n{}", pointId, player->GetGUID().ToString().c_str());
|
||||
ASSERT(i_currentNode < i_path.size(), "Point Id: {}\n{}", pointId, player->GetGUID().ToString().c_str());
|
||||
|
||||
DoEventIfAny(player, i_path[_currentNode], departureEvent);
|
||||
while (!_pointsForPathSwitch.empty() && _pointsForPathSwitch.front().PathIndex <= _currentNode)
|
||||
DoEventIfAny(player, i_path[i_currentNode], departureEvent);
|
||||
while (!_pointsForPathSwitch.empty() && _pointsForPathSwitch.front().PathIndex <= i_currentNode)
|
||||
{
|
||||
_pointsForPathSwitch.pop_front();
|
||||
player->m_taxi.NextTaxiDestination();
|
||||
@@ -420,37 +420,37 @@ bool FlightPathMovementGenerator::DoUpdate(Player* player, uint32 /*diff*/)
|
||||
}
|
||||
}
|
||||
|
||||
if (pointId == _currentNode)
|
||||
if (pointId == i_currentNode)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (_currentNode == _preloadTargetNode)
|
||||
if (i_currentNode == _preloadTargetNode)
|
||||
{
|
||||
PreloadEndGrid();
|
||||
}
|
||||
|
||||
_currentNode += departureEvent ? 1 : 0;
|
||||
i_currentNode += departureEvent ? 1 : 0;
|
||||
departureEvent = !departureEvent;
|
||||
} while (_currentNode < i_path.size() - 1);
|
||||
} while (i_currentNode < i_path.size() - 1);
|
||||
}
|
||||
|
||||
return _currentNode < (i_path.size() - 1);
|
||||
return i_currentNode < (i_path.size() - 1);
|
||||
}
|
||||
|
||||
void FlightPathMovementGenerator::SetCurrentNodeAfterTeleport()
|
||||
{
|
||||
if (i_path.empty() || _currentNode >= i_path.size())
|
||||
if (i_path.empty() || i_currentNode >= i_path.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 map0 = i_path[_currentNode]->mapid;
|
||||
for (size_t i = _currentNode + 1; i < i_path.size(); ++i)
|
||||
uint32 map0 = i_path[i_currentNode]->mapid;
|
||||
for (size_t i = i_currentNode + 1; i < i_path.size(); ++i)
|
||||
{
|
||||
if (i_path[i]->mapid != map0)
|
||||
{
|
||||
_currentNode = i;
|
||||
i_currentNode = i;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -467,7 +467,7 @@ void FlightPathMovementGenerator::DoEventIfAny(Player* player, TaxiPathNodeEntry
|
||||
|
||||
bool FlightPathMovementGenerator::GetResetPos(Player*, float& x, float& y, float& z)
|
||||
{
|
||||
TaxiPathNodeEntry const* node = i_path[_currentNode];
|
||||
TaxiPathNodeEntry const* node = i_path[i_currentNode];
|
||||
x = node->x;
|
||||
y = node->y;
|
||||
z = node->z;
|
||||
|
||||
@@ -35,15 +35,15 @@ template<class T, class P>
|
||||
class PathMovementBase
|
||||
{
|
||||
public:
|
||||
PathMovementBase() : i_path(), _currentNode(0) {}
|
||||
PathMovementBase(P path) : i_path(path), _currentNode(0) {}
|
||||
PathMovementBase() : i_path(), i_currentNode(0) {}
|
||||
PathMovementBase(P path) : i_path(path), i_currentNode(0) {}
|
||||
virtual ~PathMovementBase() {};
|
||||
|
||||
uint32 GetCurrentNode() const { return _currentNode; }
|
||||
uint32 GetCurrentNode() const { return i_currentNode; }
|
||||
|
||||
protected:
|
||||
P i_path;
|
||||
uint32 _currentNode;
|
||||
uint32 i_currentNode;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
@@ -104,7 +104,7 @@ class FlightPathMovementGenerator : public MovementGeneratorMedium< Player, Flig
|
||||
public:
|
||||
explicit FlightPathMovementGenerator(uint32 startNode = 0)
|
||||
{
|
||||
_currentNode = startNode;
|
||||
i_currentNode = startNode;
|
||||
_endGridX = 0.0f;
|
||||
_endGridY = 0.0f;
|
||||
_endMapId = 0;
|
||||
@@ -119,9 +119,9 @@ class FlightPathMovementGenerator : public MovementGeneratorMedium< Player, Flig
|
||||
|
||||
TaxiPathNodeList const& GetPath() { return i_path; }
|
||||
uint32 GetPathAtMapEnd() const;
|
||||
bool HasArrived() const { return (_currentNode >= i_path.size()); }
|
||||
bool HasArrived() const { return (i_currentNode >= i_path.size()); }
|
||||
void SetCurrentNodeAfterTeleport();
|
||||
void SkipCurrentNode() { ++_currentNode; }
|
||||
void SkipCurrentNode() { ++i_currentNode; }
|
||||
void DoEventIfAny(Player* player, TaxiPathNodeEntry const* node, bool departure);
|
||||
|
||||
bool GetResetPos(Player*, float& x, float& y, float& z);
|
||||
|
||||
@@ -1896,7 +1896,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
|
||||
LOG_ERROR("spells.aura.effect", "Auras: Unknown Shapeshift Type: {}", GetMiscValue());
|
||||
}
|
||||
|
||||
modelid = target->GetModelForForm(form);
|
||||
modelid = target->GetModelForForm(form, GetId());
|
||||
|
||||
if (apply)
|
||||
{
|
||||
@@ -2135,7 +2135,7 @@ void AuraEffect::HandleAuraTransform(AuraApplication const* aurApp, uint8 mode,
|
||||
if (apply)
|
||||
{
|
||||
// update active transform spell only when transform or shapeshift not set or not overwriting negative by positive case
|
||||
if (GetSpellInfo()->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES) || !target->GetModelForForm(target->GetShapeshiftForm()) || !GetSpellInfo()->IsPositive())
|
||||
if (GetSpellInfo()->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES) || !target->GetModelForForm(target->GetShapeshiftForm(), GetId()) || !GetSpellInfo()->IsPositive())
|
||||
{
|
||||
// special case (spell specific functionality)
|
||||
if (GetMiscValue() == 0)
|
||||
|
||||
@@ -176,6 +176,7 @@ enum WorldBoolConfigs
|
||||
CONFIG_LEAVE_GROUP_ON_LOGOUT,
|
||||
CONFIG_VMAP_BLIZZLIKE_PVP_LOS,
|
||||
CONFIG_OBJECT_SPARKLES,
|
||||
CONFIG_LOW_LEVEL_REGEN_BOOST,
|
||||
CONFIG_OBJECT_QUEST_MARKERS,
|
||||
BOOL_CONFIG_VALUE_COUNT
|
||||
};
|
||||
|
||||
@@ -943,6 +943,8 @@ void World::LoadConfigSettings(bool reload)
|
||||
|
||||
m_bool_configs[CONFIG_OBJECT_SPARKLES] = sConfigMgr->GetOption<bool>("Visibility.ObjectSparkles", true);
|
||||
|
||||
m_bool_configs[CONFIG_LOW_LEVEL_REGEN_BOOST] = sConfigMgr->GetOption<bool>("EnableLowLevelRegenBoost", true);
|
||||
|
||||
m_bool_configs[CONFIG_OBJECT_QUEST_MARKERS] = sConfigMgr->GetOption<bool>("Visibility.ObjectQuestMarkers", true);
|
||||
|
||||
m_int_configs[CONFIG_MAIL_DELIVERY_DELAY] = sConfigMgr->GetOption<int32>("MailDeliveryDelay", HOUR);
|
||||
|
||||
@@ -23,11 +23,7 @@
|
||||
|
||||
enum medivhSays
|
||||
{
|
||||
SAY_WEAK75 = 0,
|
||||
SAY_WEAK50 = 1,
|
||||
SAY_WEAK25 = 2,
|
||||
SAY_ENTER = 3,
|
||||
SAY_INTRO = 4,
|
||||
SAY_ENTER = 0,
|
||||
SAY_DEATH = 5,
|
||||
SAY_WIN = 6,
|
||||
SAY_ORCS_ENTER = 7,
|
||||
@@ -211,7 +207,7 @@ public:
|
||||
case EVENT_CHECK_HEALTH_75:
|
||||
if (instance && instance->GetData(DATA_SHIELD_PERCENT) <= eventId * 25)
|
||||
{
|
||||
Talk(eventId - 1);
|
||||
Talk(eventId + 1);
|
||||
break;
|
||||
}
|
||||
events.ScheduleEvent(eventId, 500);
|
||||
|
||||
@@ -1562,7 +1562,7 @@ public:
|
||||
for (uint8 i = 3; i < PATH_WP_COUNT - 1; ++i)
|
||||
path.push_back(G3D::Vector3(PathWaypoints[i].GetPositionX(), PathWaypoints[i].GetPositionY(), PathWaypoints[i].GetPositionZ()));
|
||||
me->GetMotionMaster()->MoveSplinePath(&path);
|
||||
me->GetMotionMaster()->PropagateSpeedChange();
|
||||
me->GetMotionMaster()->propagateSpeedChange();
|
||||
events.ScheduleEvent(EVENT_LK_SUMMON, 1000);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1297,48 +1297,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class npc_frostbite_invisible_stalker : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_frostbite_invisible_stalker() : CreatureScript("npc_frostbite_invisible_stalker") { }
|
||||
|
||||
struct npc_frostbite_invisible_stalkerAI: public NullCreatureAI
|
||||
{
|
||||
npc_frostbite_invisible_stalkerAI(Creature* creature) : NullCreatureAI(creature)
|
||||
{
|
||||
timer = 3500;
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
me->SetOrientation(i * M_PI / 3);
|
||||
me->CastSpell(me, 34740, true);
|
||||
me->CastSpell(me, 34746, true);
|
||||
}
|
||||
}
|
||||
|
||||
uint16 timer;
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (timer)
|
||||
{
|
||||
if (timer <= diff)
|
||||
{
|
||||
int32 dmg = 2200;
|
||||
me->CastCustomSpell(me, 34779, 0, &dmg, 0, true);
|
||||
timer = 0;
|
||||
}
|
||||
else
|
||||
timer -= diff;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetPitOfSaronAI<npc_frostbite_invisible_stalkerAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_pos_empowered_blizzard : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -1574,7 +1532,6 @@ void AddSC_pit_of_saron()
|
||||
new npc_pos_martin_or_gorkun_second();
|
||||
new npc_pos_freed_slave();
|
||||
new npc_pos_leader_second();
|
||||
new npc_frostbite_invisible_stalker();
|
||||
|
||||
new spell_pos_empowered_blizzard();
|
||||
new spell_pos_slave_trigger_closest();
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
/*
|
||||
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by the
|
||||
* Free Software Foundation; either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
#include "the_underbog.h"
|
||||
|
||||
enum eBlackStalker
|
||||
{
|
||||
SPELL_ACID_BREATH = 34268,
|
||||
SPELL_ACID_SPIT = 34290,
|
||||
SPELL_TAIL_SWEEP = 34267,
|
||||
SPELL_ENRAGE = 15716,
|
||||
|
||||
EVENT_ACID_BREATH = 1,
|
||||
EVENT_ACID_SPIT = 2,
|
||||
EVENT_TAIL_SWEEP = 3,
|
||||
|
||||
ACTION_MOVE_TO_PLATFORM = 1
|
||||
};
|
||||
|
||||
struct boss_ghazan : public ScriptedAI
|
||||
{
|
||||
boss_ghazan(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
}
|
||||
|
||||
void InitializeAI() override
|
||||
{
|
||||
_movedToPlatform = false;
|
||||
_reachedPlatform = false;
|
||||
Reset();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
events.Reset();
|
||||
_enraged = false;
|
||||
if (!_reachedPlatform)
|
||||
{
|
||||
_movedToPlatform = false;
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit*) override
|
||||
{
|
||||
events.ScheduleEvent(EVENT_ACID_BREATH, 3s);
|
||||
events.ScheduleEvent(EVENT_ACID_SPIT, 1s);
|
||||
events.ScheduleEvent(EVENT_TAIL_SWEEP, DUNGEON_MODE<Milliseconds>(5900ms, 10s));
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*type*/, SpellSchoolMask /*school*/) override
|
||||
{
|
||||
if (!_enraged && me->HealthBelowPctDamaged(20, damage))
|
||||
{
|
||||
_enraged = true;
|
||||
DoCastSelf(SPELL_ENRAGE);
|
||||
}
|
||||
}
|
||||
|
||||
void DoAction(int32 type) override
|
||||
{
|
||||
if (type == ACTION_MOVE_TO_PLATFORM && !_movedToPlatform)
|
||||
{
|
||||
_movedToPlatform = true;
|
||||
me->GetMotionMaster()->MovePath((me->GetSpawnId() * 10) + 1, false);
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 pointId) override
|
||||
{
|
||||
if (!_movedToPlatform || type != WAYPOINT_MOTION_TYPE || pointId != 19)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_reachedPlatform = true;
|
||||
me->SetHomePosition(me->GetPosition());
|
||||
|
||||
me->m_Events.AddEventAtOffset([this]()
|
||||
{
|
||||
me->StopMoving();
|
||||
me->GetMotionMaster()->MoveRandom(12.f);
|
||||
}, 1ms);
|
||||
}
|
||||
|
||||
void JustReachedHome() override
|
||||
{
|
||||
if (_reachedPlatform)
|
||||
{
|
||||
me->GetMotionMaster()->MoveRandom(12.f);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_ACID_BREATH:
|
||||
DoCastVictim(SPELL_ACID_BREATH);
|
||||
events.Repeat(7s, 9s);
|
||||
break;
|
||||
case EVENT_ACID_SPIT:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random))
|
||||
{
|
||||
DoCast(target, SPELL_ACID_SPIT);
|
||||
}
|
||||
events.Repeat(7s, 9s);
|
||||
break;
|
||||
case EVENT_TAIL_SWEEP:
|
||||
DoCastVictim(SPELL_TAIL_SWEEP);
|
||||
events.Repeat(7s, 9s);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
bool _enraged;
|
||||
bool _movedToPlatform;
|
||||
bool _reachedPlatform;
|
||||
};
|
||||
|
||||
class at_underbog_ghazan : public OnlyOnceAreaTriggerScript
|
||||
{
|
||||
public:
|
||||
at_underbog_ghazan() : OnlyOnceAreaTriggerScript("at_underbog_ghazan") {}
|
||||
|
||||
bool _OnTrigger(Player* player, const AreaTrigger* /*at*/) override
|
||||
{
|
||||
if (InstanceScript* instance = player->GetInstanceScript())
|
||||
{
|
||||
if (Creature* ghazan = ObjectAccessor::GetCreature(*player, instance->GetGuidData(NPC_GHAZAN)))
|
||||
{
|
||||
ghazan->AI()->DoAction(ACTION_MOVE_TO_PLATFORM);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_ghazan()
|
||||
{
|
||||
RegisterUnderbogCreatureAI(boss_ghazan);
|
||||
new at_underbog_ghazan();
|
||||
}
|
||||
@@ -15,13 +15,6 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
This placeholder for the instance is needed for dungeon finding to be able
|
||||
to give credit after the boss defined in lastEncounterDungeon is killed.
|
||||
Without it, the party doing random dungeon won't get satchel of spoils and
|
||||
gets instead the deserter debuff.
|
||||
*/
|
||||
|
||||
#include "InstanceScript.h"
|
||||
#include "Map.h"
|
||||
#include "ScriptMgr.h"
|
||||
@@ -40,6 +33,36 @@ public:
|
||||
struct instance_the_underbog_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_the_underbog_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
{
|
||||
InstanceScript::OnCreatureCreate(creature);
|
||||
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case NPC_GHAZAN:
|
||||
_ghazanGUID = creature->GetGUID();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ObjectGuid GetGuidData(uint32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case NPC_GHAZAN:
|
||||
return _ghazanGUID;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
private:
|
||||
ObjectGuid _ghazanGUID;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -22,10 +22,17 @@
|
||||
|
||||
#define TheUnderbogScriptName "instance_the_underbog"
|
||||
|
||||
enum NPCs
|
||||
{
|
||||
NPC_GHAZAN = 18105
|
||||
};
|
||||
|
||||
template <class AI, class T>
|
||||
inline AI* GetTheUnderbogAI(T* obj)
|
||||
{
|
||||
return GetInstanceAI<AI>(obj, TheUnderbogScriptName);
|
||||
}
|
||||
|
||||
#define RegisterUnderbogCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetTheUnderbogAI)
|
||||
|
||||
#endif // the_underbog_h__
|
||||
|
||||
@@ -51,6 +51,7 @@ void AddSC_boss_mekgineer_steamrigger();
|
||||
void AddSC_boss_warlord_kalithresh();
|
||||
void AddSC_instance_steam_vault();
|
||||
void AddSC_boss_the_black_stalker(); //CR Underbog
|
||||
void AddSC_boss_ghazan();
|
||||
void AddSC_instance_the_underbog();
|
||||
void AddSC_boss_ahune();
|
||||
void AddSC_instance_the_slave_pens();
|
||||
@@ -144,6 +145,7 @@ void AddOutlandScripts()
|
||||
AddSC_boss_warlord_kalithresh();
|
||||
AddSC_instance_steam_vault();
|
||||
AddSC_boss_the_black_stalker(); //CR Underbog
|
||||
AddSC_boss_ghazan();
|
||||
AddSC_instance_the_underbog();
|
||||
AddSC_boss_ahune();
|
||||
AddSC_instance_the_slave_pens();
|
||||
|
||||
@@ -850,18 +850,24 @@ class spell_gen_fixate_aura : public AuraScript
|
||||
|
||||
/* 64440 - Blade Warding
|
||||
64568 - Blood Reserve */
|
||||
class spell_gen_proc_above_75 : public AuraScript
|
||||
class spell_gen_proc_above_75 : public SpellScript
|
||||
{
|
||||
PrepareAuraScript(spell_gen_proc_above_75);
|
||||
PrepareSpellScript(spell_gen_proc_above_75);
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
SpellCastResult CheckLevel()
|
||||
{
|
||||
return eventInfo.GetActor() && eventInfo.GetActor()->getLevel() >= 75;
|
||||
Unit* caster = GetCaster();
|
||||
if (caster->getLevel() < 75)
|
||||
{
|
||||
return SPELL_FAILED_LOWLEVEL;
|
||||
}
|
||||
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_gen_proc_above_75::CheckProc);
|
||||
OnCheckCast += SpellCheckCastFn(spell_gen_proc_above_75::CheckLevel);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -4594,6 +4600,49 @@ class spell_gen_basic_campfire : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// 34779 - Freezing Circle
|
||||
enum FreezingCircleSpells
|
||||
{
|
||||
SPELL_FREEZING_CIRCLE_PIT_OF_SARON_NORMAL = 69574,
|
||||
SPELL_FREEZING_CIRCLE_PIT_OF_SARON_HEROIC = 70276,
|
||||
SPELL_FREEZING_CIRCLE = 34787,
|
||||
};
|
||||
|
||||
class spell_freezing_circle : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_freezing_circle);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
SPELL_FREEZING_CIRCLE_PIT_OF_SARON_NORMAL,
|
||||
SPELL_FREEZING_CIRCLE_PIT_OF_SARON_HEROIC,
|
||||
SPELL_FREEZING_CIRCLE
|
||||
});
|
||||
}
|
||||
|
||||
void HandleDamage(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
uint32 spellId = 0;
|
||||
Map* map = caster->GetMap();
|
||||
|
||||
if (map->IsDungeon())
|
||||
spellId = map->IsHeroic() ? SPELL_FREEZING_CIRCLE_PIT_OF_SARON_HEROIC : SPELL_FREEZING_CIRCLE_PIT_OF_SARON_NORMAL;
|
||||
else
|
||||
spellId = SPELL_FREEZING_CIRCLE;
|
||||
|
||||
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId))
|
||||
SetHitDamage(spellInfo->Effects[EFFECT_0].CalcValue());
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_freezing_circle::HandleDamage, EFFECT_1, SPELL_EFFECT_SCHOOL_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_silithyst);
|
||||
@@ -4732,4 +4781,5 @@ void AddSC_generic_spell_scripts()
|
||||
RegisterSpellScriptWithArgs(spell_gen_apply_aura_after_expiration, "spell_itch_aq20", SPELL_HIVEZARA_CATALYST, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
RegisterSpellScriptWithArgs(spell_gen_apply_aura_after_expiration, "spell_itch_aq40", SPELL_VEKNISS_CATALYST, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
RegisterSpellScript(spell_gen_basic_campfire);
|
||||
RegisterSpellScript(spell_freezing_circle);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user