Scripts/Hyjal: Rewrite first 4 boss scripts (#31453)

(cherry picked from commit 38b1977e9078614127e3dd3b295681d16ea4c383)
This commit is contained in:
offl
2026-06-29 12:56:11 +02:00
committed by Shauren
parent ac285efd29
commit e67e0f9080
9 changed files with 1156 additions and 746 deletions
@@ -0,0 +1,455 @@
--
UPDATE `creature_template` SET `speed_walk` = 1.6, `speed_run` = 2.28571, `BaseAttackTime` = 2000 WHERE `entry` = 17767;
UPDATE `creature_template` SET `speed_walk` = 1.6, `speed_run` = 1.71429, `BaseAttackTime` = 2000 WHERE `entry` = 17808;
UPDATE `creature_template` SET `speed_walk` = 1, `speed_run` = 0.857143, `BaseAttackTime` = 2500 WHERE `entry` = 17818;
UPDATE `creature_template` SET `speed_walk` = 2.4, `speed_run` = 1.71429, `BaseAttackTime` = 2000 WHERE `entry` = 17888;
UPDATE `creature_template` SET `speed_walk` = 2.4, `speed_run` = 2.14286, `BaseAttackTime` = 2000 WHERE `entry` = 17842;
UPDATE `creature_template` SET `speed_walk` = 1, `speed_run` = 0.857143 WHERE `entry` = 17864;
DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_anetheron_sleep', 'spell_azgalor_doom');
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(31298, 'spell_anetheron_sleep'),
(31347, 'spell_azgalor_doom');
DELETE FROM `creature_text` WHERE `CreatureID` IN (17767,17808,17888,17842);
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
(17767,0,0,"The Legion's final conquest has begun! Once again the subjugation of this world is within our grasp. Let none survive!",14,0,100,0,0,11022,18221,0,"Rage Winterchill - SAY_INTRO"),
(17767,1,0,"Crumble and rot!",14,0,100,0,0,11023,18222,0,"Rage Winterchill - SAY_DECAY_1"),
(17767,1,1,"Ashes to ashes, dust to dust!",14,0,100,0,0,11055,18223,0,"Rage Winterchill - SAY_DECAY_2"),
(17767,2,0,"Succumb to the icy chill... of death.",14,0,100,0,0,11024,18224,0,"Rage Winterchill - SAY_NOVA_1"),
(17767,2,1,"It will be much colder in your grave.",14,0,100,0,0,11058,18225,0,"Rage Winterchill - SAY_NOVA_2"),
(17767,3,0,"All life must perish!",14,0,100,0,0,11025,18226,0,"Rage Winterchill - SAY_SLAY_1"),
(17767,3,1,"Your world is ours now!",14,0,100,0,0,11056,18227,0,"Rage Winterchill - SAY_SLAY_2"),
(17767,3,2,"Victory to the Legion!",14,0,100,0,0,11057,18228,0,"Rage Winterchill - SAY_SLAY_3"),
(17767,4,0,"You have won this battle, but not... the... war.",14,0,100,0,0,11026,18220,0,"Rage Winterchill - SAY_DEATH"),
(17808,0,0,"You are defenders of a doomed world! Flee here, and perhaps you will prolong your pathetic lives!",14,0,100,0,0,10977,18230,0,"Anetheron - SAY_INTRO"),
(17808,1,0,"You look tired....",14,0,100,0,0,10978,18231,0,"Anetheron - SAY_SLEEP_1"),
(17808,1,1,"Sweet dreams.",14,0,100,0,0,11545,18232,0,"Anetheron - SAY_SLEEP_2"),
(17808,2,0,"The swarm is eager to feed.",14,0,100,0,0,10979,18233,0,"Anetheron - SAY_SWARM_1"),
(17808,2,1,"Pestilence upon you!",14,0,100,0,0,11037,18234,0,"Anetheron - SAY_SWARM_2"),
(17808,3,0,"Let fire rain from above!",14,0,100,0,0,10980,18235,0,"Anetheron - SAY_INFERNO_1"),
(17808,3,1,"Earth and sky shall burn!",14,0,100,0,0,11036,18236,0,"Anetheron - SAY_INFERNO_2"),
(17808,4,0,"Your hopes are lost!",14,0,100,0,0,10981,18237,0,"Anetheron - SAY_SLAY_1"),
(17808,4,1,"Scream for me.",14,0,100,0,0,11038,18238,0,"Anetheron - SAY_SLAY_2"),
(17808,4,2,"Pity, no time for a slow death!",14,0,100,0,0,11039,18239,0,"Anetheron - SAY_SLAY_3"),
(17808,5,0,"The clock... is still... ticking.",14,0,100,0,0,10982,18229,0,"Anetheron - SAY_DEATH"),
(17888,0,0,"Cry for mercy! Your meaningless lives will soon be forfeit!",14,0,100,0,0,11015,18240,0,"Kazrogal - SAY_INTRO"),
(17888,1,0,"Your death will be a painful one.",14,0,100,0,0,11016,18241,0,"Kazrogal - SAY_MARK_1"),
(17888,1,1,"You... are marked.",14,0,100,0,0,11052,18242,0,"Kazrogal - SAY_MARK_2"),
(17888,2,0,"Shaza-kiel!",14,0,100,0,0,11017,18243,0,"Kazrogal - SAY_SLAY_1"),
(17888,2,1,"You are nothing!",14,0,100,0,0,11053,18244,0,"Kazrogal - SAY_SLAY_2"),
(17888,2,2,"Miserable nuisance!",14,0,100,0,0,11054,18245,0,"Kazrogal - SAY_SLAY_3"),
(17842,0,0,"Abandon all hope! The Legion has returned to finish what was begun so many years ago. This time, there will be no escape!",14,0,100,0,0,10999,18247,0,"Azgalor - SAY_INTRO"),
(17842,1,0,"Suffer, you despicable insect!",14,0,100,0,0,11000,18251,0,"Azgalor - SAY_DOOM_1"),
(17842,1,1,"Just a taste... of what awaits you.",14,0,100,0,0,11046,18252,0,"Azgalor - SAY_DOOM_2"),
(17842,2,0,"Reesh, hokta!",14,0,100,0,0,11001,18253,0,"Azgalor - SAY_SLAY_1"),
(17842,2,1,"No one is going to save you.",14,0,100,0,0,11047,18254,0,"Azgalor - SAY_SLAY_2"),
(17842,2,2,"Don't fight it.",14,0,100,0,0,11048,18255,0,"Azgalor - SAY_SLAY_3"),
(17842,3,0,"Your time is almost... up.",14,0,100,0,0,11002,18248,0,"Azgalor - SAY_DEATH");
DELETE FROM `waypoint_path_node` WHERE `PathId` IN (142466,142738,143106,142138);
DELETE FROM `waypoint_path` WHERE `PathId` IN (142466,142738,143106,142138);
DELETE FROM `waypoint_path` WHERE `PathId` BETWEEN 53400 AND 53412;
INSERT INTO `waypoint_path` (`PathId`, `MoveType`, `Flags`, `Velocity`, `Comment`) VALUES
(53400, 1, 0, NULL, 'Migrated from refactor'),
(53401, 1, 0, NULL, 'Migrated from refactor'),
(53402, 1, 0, NULL, 'Migrated from refactor'),
(53403, 0, 0, NULL, 'Migrated from refactor'),
(53404, 0, 0, NULL, 'Migrated from refactor'),
(53405, 0, 0, NULL, 'Migrated from refactor'),
(53406, 1, 0, NULL, 'Migrated from refactor'),
(53407, 1, 0, NULL, 'Migrated from refactor'),
(53408, 1, 0, NULL, 'Migrated from refactor'),
(53409, 0, 0, NULL, 'Migrated from refactor'),
(53410, 0, 0, NULL, 'Migrated from refactor'),
(53411, 1, 0, NULL, 'Migrated from refactor'),
(53412, 0, 0, NULL, 'Migrated from refactor');
DELETE FROM `waypoint_path_node` WHERE `PathId` BETWEEN 53400 AND 53412;
INSERT INTO `waypoint_path_node` (`PathId`, `NodeId`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `Delay`) VALUES
(53400,1,4899.013,-1568.5143,1333.7539,NULL,0),
(53400,2,4895.4277,-1590.8092,1332.0581,NULL,0),
(53400,3,4896.3594,-1608.7734,1330.3589,NULL,0),
(53400,4,4896.902,-1626.4156,1325.7756,NULL,0),
(53400,5,4898.7827,-1643.9562,1322.4677,NULL,0),
(53400,6,4905.4478,-1667.2998,1320.8079,NULL,0),
(53400,7,4917.0723,-1678.6937,1324.125,NULL,0),
(53400,8,4930.0024,-1688.5887,1330.6844,NULL,0),
(53400,9,4946.3384,-1695.8247,1337.4321,NULL,0),
(53400,10,4963.5435,-1698.3932,1340.348,NULL,0),
(53400,11,4975.788,-1711.2136,1339.3091,NULL,0),
(53400,12,4985.0093,-1720.7201,1336.5997,NULL,0),
(53400,13,5007.493,-1740.4618,1326.7266,NULL,0),
(53400,14,5016.9443,-1749.0211,1322.3903,NULL,0),
(53401,1,4905.356,-1557.7439,1332.1576,NULL,0),
(53401,2,4901.935,-1576.6415,1332.7456,NULL,0),
(53401,3,4898.2646,-1595.9999,1331.3639,NULL,0),
(53401,4,4898.5874,-1619.1588,1328.4226,NULL,0),
(53401,5,4905.5566,-1645.4225,1324.7345,NULL,0),
(53401,6,4911.504,-1659.2622,1322.0311,NULL,0),
(53401,7,4922.8374,-1675.6334,1325.3477,NULL,0),
(53401,8,4933.7256,-1687.7668,1331.5618,NULL,0),
(53401,9,4951.112,-1691.7296,1337.625,NULL,0),
(53401,10,4966.0347,-1693.6628,1340.4731,NULL,0),
(53401,11,4978.3486,-1707.7675,1339.018,NULL,0),
(53401,12,4996.694,-1721.572,1332.9572,NULL,0),
(53401,13,5013.205,-1729.1337,1326.7311,NULL,0),
(53401,14,5024.1514,-1743.2828,1322.644,NULL,0),
(53402,1,4912.507,-1554.8761,1330.112,NULL,0),
(53402,2,4906.32,-1575.0999,1332.1853,NULL,0),
(53402,3,4903.5605,-1593.3805,1331.5122,NULL,0),
(53402,4,4902.4185,-1618.6987,1329.2092,NULL,0),
(53402,5,4909.0903,-1644.3761,1325.9421,NULL,0),
(53402,6,4927.3647,-1665.5762,1324.3373,NULL,0),
(53402,7,4935.9062,-1678.7903,1330.0665,NULL,0),
(53402,8,4944.057,-1689.1742,1335.3041,NULL,0),
(53402,9,4954.9106,-1690.6743,1338.822,NULL,0),
(53402,10,4966.013,-1692.9121,1340.5206,NULL,0),
(53402,11,4974.324,-1695.6461,1340.7998,NULL,0),
(53402,12,4982.889,-1704.425,1339.9037,NULL,0),
(53402,13,4993.569,-1715.8959,1335.0872,NULL,0),
(53402,14,5008.3184,-1728.438,1328.1224,NULL,0),
(53402,15,5024.3223,-1743.6403,1322.6418,NULL,0),
(53403,1,5040.8823,-1739.3463,1321.0178,NULL,0),
(53403,2,5049.84,-1727.2213,1320.6362,NULL,0),
(53403,3,5065.362,-1729.1849,1325.4052,NULL,0),
(53403,4,5073.5938,-1733.7819,1327.9532,NULL,0),
(53403,5,5073.69,-1748.98,1328.4124,NULL,0),
(53403,6,5081.6455,-1757.6251,1327.6125,NULL,0),
(53403,7,5090.2153,-1746.2799,1329.4159,NULL,0),
(53403,8,5098.849,-1743.6261,1329.9194,NULL,0),
(53403,9,5110.326,-1744.3123,1331.8342,NULL,0),
(53403,10,5126.926,-1751.5873,1335.071,NULL,0),
(53403,11,5140.555,-1751.1836,1334.7582,NULL,0),
(53403,12,5148.2764,-1771.5848,1336.1473,NULL,0),
(53403,13,5168.8477,-1770.1842,1338.1666,NULL,0),
(53403,14,5184.3774,-1762.5963,1340.6674,NULL,0),
(53403,15,5183.5244,-1783.2174,1340.389,NULL,0),
(53403,16,5170.168,-1792.5239,1338.1348,NULL,0),
(53403,17,5160.3525,-1806.5145,1338.7048,NULL,0),
(53403,18,5147.3994,-1815.1638,1338.2115,NULL,0),
(53403,19,5135.8887,-1819.9883,1337.875,NULL,0),
(53403,20,5116.687,-1830.0474,1333.5437,NULL,0),
(53403,21,5105.4844,-1834.3359,1331.4532,NULL,0),
(53403,22,5090.777,-1835.07,1327.5358,NULL,0),
(53403,23,5087.5376,-1816.1041,1324.8286,NULL,0),
(53403,24,5064.8945,-1794.3627,1321.3605,NULL,0),
(53403,25,5051.826,-1782.5173,1322.4979,NULL,0),
(53403,26,5042.6665,-1775.2366,1323.1747,NULL,0),
(53403,27,5033.6685,-1768.1617,1323.9828,NULL,0),
(53403,28,5024.7646,-1756.1022,1322.9534,NULL,0),
(53404,1,5036.9863,-1763.0171,1324.196,NULL,0),
(53404,2,5051.2954,-1777.903,1322.4426,NULL,0),
(53404,3,5067.457,-1793.0005,1321.1865,NULL,0),
(53404,4,5082.547,-1813.8169,1325.229,NULL,0),
(53404,5,5098.916,-1827.3698,1328.5408,NULL,0),
(53404,6,5091.4033,-1844.0017,1328.865,NULL,0),
(53404,7,5077.985,-1855.918,1330.4878,NULL,0),
(53404,8,5066.3843,-1864.4537,1330.9604,NULL,0),
(53404,9,5058.0044,-1871.4723,1330.9235,NULL,0),
(53404,10,5045.224,-1881.6198,1331.2219,NULL,0),
(53404,11,5032.2256,-1890.5438,1328.8651,NULL,0),
(53404,12,5000.72,-1892.6333,1325.5928,NULL,0),
(53404,13,4986.086,-1888.0851,1322.851,NULL,0),
(53404,14,4969.1865,-1880.2368,1320.9674,NULL,0),
(53404,15,4984.005,-1855.8842,1320.4905,NULL,0),
(53404,16,4997.5825,-1851.2489,1321.2733,NULL,0),
(53404,17,5010.9634,-1830.5931,1321.7004,NULL,0),
(53404,18,5028.895,-1833.8156,1322.4952,NULL,0),
(53404,19,5024.8853,-1812.1683,1321.7678,NULL,0),
(53404,20,5032.1426,-1797.3307,1321.6145,NULL,0),
(53404,21,5030.104,-1778.1888,1321.8259,NULL,0),
(53404,22,5017.017,-1763.2999,1322.1216,NULL,0),
(53404,23,5018.9844,-1754.1285,1322.2491,NULL,0),
(53404,24,5024.4463,-1745.1969,1322.6123,NULL,0),
(53405,1,5036.9634,-1742.235,1321.3152,NULL,0),
(53405,2,5048.819,-1730.6917,1320.5092,NULL,0),
(53405,3,5060.9507,-1727.3306,1323.117,NULL,0),
(53405,4,5071.99,-1732.041,1327.7458,NULL,0),
(53405,5,5076.8667,-1741.8024,1328.5428,NULL,0),
(53405,6,5082.6704,-1755.4508,1327.9109,NULL,0),
(53405,7,5094.8096,-1744.481,1329.8301,NULL,0),
(53405,8,5109.4644,-1746.4827,1331.4923,NULL,0),
(53405,9,5119.843,-1750.732,1334.3992,NULL,0),
(53405,10,5142.3438,-1757.0756,1334.9603,NULL,0),
(53405,11,5159.5527,-1766.8685,1337.0886,NULL,0),
(53405,12,5174.628,-1770.3353,1337.7468,NULL,0),
(53405,13,5188.039,-1775.5183,1341.6293,NULL,0),
(53405,14,5172.9077,-1787.0996,1339.0956,NULL,0),
(53405,15,5150.3965,-1799.5151,1337.1096,NULL,0),
(53405,16,5137.506,-1814.4193,1337.2407,NULL,0),
(53405,17,5112.44,-1831.6606,1332.9121,NULL,0),
(53405,18,5095.6055,-1829.2695,1327.6632,NULL,0),
(53405,19,5084.147,-1816.944,1325.9128,NULL,0),
(53405,20,5085.2036,-1836.5128,1327.6608,NULL,0),
(53405,21,5079.987,-1849.4807,1329.4143,NULL,0),
(53405,22,5067.5874,-1862.1454,1330.7286,NULL,0),
(53405,23,5054.1387,-1877.3336,1331.4028,NULL,0),
(53405,24,5041.738,-1887.9905,1330.3396,NULL,0),
(53405,25,5026.8555,-1889.8066,1328.1511,NULL,0),
(53405,26,5012.642,-1890.9236,1326.7332,NULL,0),
(53405,27,4995.358,-1889.8551,1324.5093,NULL,0),
(53405,28,4972.7437,-1887.0488,1321.2725,NULL,0),
(53405,29,4958.0835,-1887.875,1324.491,NULL,0),
(53405,30,4950.395,-1887.5818,1326.5721,NULL,0),
(53405,31,4962.209,-1879.3326,1322.1217,NULL,0),
(53405,32,4973.0728,-1870.87,1321.0916,NULL,0),
(53405,33,4986.8228,-1857.5287,1320.7638,NULL,0),
(53405,34,5002.705,-1842.5645,1321.5165,NULL,0),
(53405,35,5016.539,-1822.6658,1321.8262,NULL,0),
(53405,36,5006.326,-1805.9287,1325.0543,NULL,0),
(53405,37,5025.7793,-1791.8652,1321.9037,NULL,0),
(53405,38,5048.309,-1790.4752,1321.4747,NULL,0),
(53405,39,5034.3013,-1778.5393,1322.1279,NULL,0),
(53405,40,5025.7065,-1767.6727,1322.3359,NULL,0),
(53406,1,5489.001,-2408.0374,1462.4382,NULL,0),
(53406,2,5496.3516,-2417.7957,1463.5728,NULL,0),
(53406,3,5508.016,-2434.1086,1465.8058,NULL,0),
(53406,4,5520.9272,-2452.966,1467.9775,NULL,0),
(53406,5,5532.4673,-2469.0972,1471.0629,NULL,0),
(53406,6,5538.8794,-2484.6975,1472.8125,NULL,0),
(53406,7,5542.228,-2504.583,1474.7062,NULL,0),
(53406,8,5544.1943,-2518.1658,1476.2385,NULL,0),
(53406,9,5543.414,-2532.1462,1477.8403,NULL,0),
(53406,10,5541.602,-2548.3125,1479.124,NULL,0),
(53406,11,5539.7065,-2566.289,1479.5859,NULL,0),
(53406,12,5538.3584,-2586.2449,1480.2434,NULL,0),
(53406,13,5536.168,-2614.9753,1481.0753,NULL,0),
(53406,14,5526.987,-2629.458,1482.3492,NULL,0),
(53407,1,5505.1313,-2412.8228,1464.7963,NULL,0),
(53407,2,5508.9287,-2425.5154,1465.0233,NULL,0),
(53407,3,5515.898,-2439.3828,1466.8087,NULL,0),
(53407,4,5520.83,-2448.0742,1467.7144,NULL,0),
(53407,5,5529.913,-2455.678,1468.8508,NULL,0),
(53407,6,5539.6553,-2462.6702,1470.1555,NULL,0),
(53407,7,5544.354,-2475.4788,1471.8378,NULL,0),
(53407,8,5547.019,-2490.7827,1473.488,NULL,0),
(53407,9,5553.027,-2506.7349,1475.2065,NULL,0),
(53407,10,5555.9307,-2520.341,1476.6785,NULL,0),
(53407,11,5552.3213,-2531.7793,1477.6876,NULL,0),
(53407,12,5550.154,-2547.3293,1478.4451,NULL,0),
(53407,13,5547.8896,-2572.1597,1479.0669,NULL,0),
(53407,14,5545.49,-2599.0547,1480.0295,NULL,0),
(53407,15,5544.612,-2614.3767,1480.5232,NULL,0),
(53407,16,5539.0337,-2632.818,1480.8608,NULL,0),
(53408,1,5518.3037,-2400.597,1466.8492,NULL,0),
(53408,2,5527.5967,-2409.1858,1468.7676,NULL,0),
(53408,3,5535.3145,-2422.0715,1470.3575,NULL,0),
(53408,4,5545.852,-2452.0334,1471.0311,NULL,0),
(53408,5,5555.303,-2483.8545,1474.3467,NULL,0),
(53408,6,5560.874,-2498.6453,1476.1173,NULL,0),
(53408,7,5564.8145,-2513.1172,1477.7604,NULL,0),
(53408,8,5562.932,-2539.0774,1480.762,NULL,0),
(53408,9,5560.0225,-2558.4626,1480.3805,NULL,0),
(53408,10,5557.0625,-2579.365,1481.1226,NULL,0),
(53408,11,5554.618,-2610.5325,1482.8214,NULL,0),
(53408,12,5548.197,-2632.0112,1482.8678,NULL,0),
(53409,1,5527.2466,-2652.405,1479.9614,NULL,0),
(53409,2,5524.6973,-2662.2053,1479.2505,NULL,0),
(53409,3,5525.4443,-2676.5356,1478.5315,NULL,0),
(53409,4,5532.674,-2701.005,1478.9833,NULL,0),
(53409,5,5533.311,-2714.4526,1480.9232,NULL,0),
(53409,6,5523.3853,-2735.5725,1484.2266,NULL,0),
(53409,7,5506.166,-2749.2395,1486.8292,NULL,0),
(53409,8,5482.4634,-2761.2205,1489.4114,NULL,0),
(53409,9,5460.8804,-2772.1824,1493.2781,NULL,0),
(53409,10,5438.692,-2789.125,1497.3811,NULL,0),
(53409,11,5421.501,-2812.5176,1503.2144,NULL,0),
(53409,12,5414.5376,-2826.3247,1506.4531,NULL,0),
(53409,13,5413.6997,-2838.2449,1509.0342,NULL,0),
(53409,14,5416.8,-2863.0488,1514.5923,NULL,0),
(53409,15,5418.9614,-2884.162,1519.9419,NULL,0),
(53409,16,5415.55,-2899.0007,1523.2181,NULL,0),
(53409,17,5407.479,-2916.3518,1526.3264,NULL,0),
(53409,18,5396.5786,-2923.0688,1528.0256,NULL,0),
(53409,19,5381.2188,-2930.678,1529.043,NULL,0),
(53409,20,5365.907,-2936.9365,1530.6816,NULL,0),
(53409,21,5329.409,-2954.647,1534.9066,NULL,0),
(53409,22,5286.5693,-2974.859,1540.2617,NULL,0),
(53409,23,5272.2627,-2986.726,1544.0474,NULL,0),
(53409,24,5261.2944,-3006.1926,1549.0981,NULL,0),
(53409,25,5254.3,-3035.2554,1555.6816,NULL,0),
(53409,26,5252.576,-3071.5354,1562.3926,NULL,0),
(53409,27,5256.0547,-3097.2812,1569.3075,NULL,0),
(53409,28,5270.7017,-3127.9146,1577.349,NULL,0),
(53409,29,5285.6714,-3134.7817,1581.3932,NULL,0),
(53409,30,5307.5996,-3133.8494,1587.1412,NULL,0),
(53409,31,5324.1426,-3127.4465,1586.9525,NULL,0),
(53409,32,5347.4434,-3135.7256,1586.0203,NULL,0),
(53409,33,5361.625,-3145.2058,1585.8694,NULL,0),
(53409,34,5374.8394,-3155.3123,1585.5886,NULL,0),
(53409,35,5361.625,-3145.2058,1585.8694,NULL,0),
(53409,36,5347.4434,-3135.7256,1586.0203,NULL,0),
(53409,37,5324.1426,-3127.4465,1586.9525,NULL,0),
(53409,38,5307.5996,-3133.8494,1587.1412,NULL,0),
(53409,39,5285.6714,-3134.7817,1581.3932,NULL,0),
(53409,40,5270.7017,-3127.9146,1577.349,NULL,0),
(53409,41,5256.0596,-3097.3687,1569.3184,NULL,0),
(53409,42,5252.581,-3071.623,1562.3523,NULL,0),
(53409,43,5254.3,-3035.2554,1555.6816,NULL,0),
(53409,44,5261.2944,-3006.1926,1549.0981,NULL,0),
(53409,45,5272.2627,-2986.726,1544.0474,NULL,0),
(53409,46,5286.5693,-2974.859,1540.2617,NULL,0),
(53409,47,5329.409,-2954.647,1534.9066,NULL,0),
(53409,48,5365.907,-2936.9365,1530.6816,NULL,0),
(53409,49,5381.2188,-2930.678,1529.043,NULL,0),
(53409,50,5396.459,-2923.1406,1528.0612,NULL,0),
(53409,51,5407.479,-2916.3518,1526.3264,NULL,0),
(53409,52,5415.55,-2899.0007,1523.2181,NULL,0),
(53409,53,5418.9614,-2884.162,1519.9419,NULL,0),
(53409,54,5416.7974,-2863.0688,1514.5718,NULL,0),
(53409,55,5413.6963,-2838.2637,1508.9664,NULL,0),
(53409,56,5414.5376,-2826.3247,1506.4531,NULL,0),
(53409,57,5421.494,-2812.5195,1503.071,NULL,0),
(53409,58,5438.692,-2789.125,1497.3811,NULL,0),
(53409,59,5460.8804,-2772.1824,1493.2781,NULL,0),
(53409,60,5482.4634,-2761.2205,1489.4114,NULL,0),
(53409,61,5506.166,-2749.2395,1486.8292,NULL,0),
(53409,62,5523.3853,-2735.5725,1484.2266,NULL,0),
(53409,63,5533.311,-2714.4526,1480.9232,NULL,0),
(53409,64,5532.674,-2701.005,1478.9833,NULL,0),
(53409,65,5525.4443,-2676.5356,1478.5315,NULL,0),
(53409,66,5524.6973,-2662.2053,1479.2505,NULL,0),
(53409,67,5527.2466,-2652.405,1479.9614,NULL,0),
(53409,68,5531.0767,-2645.1294,1480.3168,NULL,0),
(53410,1,5513.326,-2649.0442,1480.793,NULL,0),
(53410,2,5502.4956,-2662.746,1480.6007,NULL,0),
(53410,3,5491.9185,-2673.2422,1480.7413,NULL,0),
(53410,4,5479.5166,-2684.8633,1480.9069,NULL,0),
(53410,5,5473.725,-2698.8745,1484.2593,NULL,0),
(53410,6,5470.121,-2728.6406,1484.6632,NULL,0),
(53410,7,5456.105,-2748.048,1488.5063,NULL,0),
(53410,8,5438.5117,-2766.6514,1493.1613,NULL,0),
(53410,9,5423.1533,-2782.2441,1497.3673,NULL,0),
(53410,10,5407.1543,-2801.299,1502.4226,NULL,0),
(53410,11,5397.096,-2814.7493,1507.3513,NULL,0),
(53410,12,5387.2993,-2820.4336,1510.7043,NULL,0),
(53410,13,5368.398,-2818.9314,1509.815,NULL,0),
(53410,14,5357.9756,-2809.1746,1511.1284,NULL,0),
(53410,15,5340.5103,-2803.5176,1507.6373,NULL,0),
(53410,16,5324.0825,-2815.6045,1512.1277,NULL,0),
(53410,17,5315.2363,-2847.9407,1513.5405,NULL,0),
(53410,18,5313.994,-2864.0457,1518.0806,NULL,0),
(53410,19,5315.9097,-2879.7422,1519.6567,NULL,0),
(53410,20,5317.8584,-2893.0686,1522.0153,NULL,0),
(53410,21,5322.159,-2911.9075,1524.9114,NULL,0),
(53410,22,5329.2954,-2928.971,1529.5258,NULL,0),
(53410,23,5335.5703,-2941.4941,1533.3491,NULL,0),
(53410,24,5353.701,-2956.6487,1536.4133,NULL,0),
(53410,25,5375.2173,-2970.2007,1539.1909,NULL,0),
(53410,26,5390.1704,-2985.2278,1542.5879,NULL,0),
(53410,27,5404.325,-2986.852,1545.903,NULL,0),
(53410,28,5410.812,-2988.4602,1546.9102,NULL,0),
(53410,29,5416.0864,-2988.8455,1547.3687,NULL,0),
(53410,30,5427.3813,-2985.5708,1545.671,NULL,0),
(53410,31,5441.4116,-2982.5269,1542.8755,NULL,0),
(53410,32,5464.1396,-2976.889,1539.6415,NULL,0),
(53410,33,5482.6045,-2974.366,1538.6628,NULL,0),
(53410,34,5495.6724,-2970.649,1537.6798,NULL,0),
(53410,35,5483.363,-2960.5027,1538.39,NULL,0),
(53410,36,5473.9214,-2952.3403,1538.1418,NULL,0),
(53410,37,5463.3965,-2938.9922,1536.2316,NULL,0),
(53410,38,5452.2856,-2925.1692,1532.5256,NULL,0),
(53410,39,5441.611,-2915.3157,1529.3428,NULL,0),
(53410,40,5429.291,-2904.0898,1525.7705,NULL,0),
(53410,41,5430.6636,-2889.3176,1523.1362,NULL,0),
(53410,42,5438.55,-2871.3032,1518.7125,NULL,0),
(53410,43,5452.9688,-2857.457,1514.0188,NULL,0),
(53410,44,5479.5825,-2835.0903,1505.1285,NULL,0),
(53410,45,5489.249,-2821.8665,1502.442,NULL,0),
(53410,46,5497.4165,-2806.28,1499.8845,NULL,0),
(53410,47,5502.6196,-2796.0725,1499.8988,NULL,0),
(53410,48,5512.1533,-2778.1536,1495.1101,NULL,0),
(53410,49,5528.4365,-2766.1711,1493.053,NULL,0),
(53410,50,5542.2056,-2756.8625,1492.0212,NULL,0),
(53410,51,5555.5176,-2745.1785,1491.1101,NULL,0),
(53410,52,5565.463,-2729.097,1488.6785,NULL,0),
(53410,53,5574.218,-2710.327,1487.6228,NULL,0),
(53410,54,5582.651,-2688.477,1488.5991,NULL,0),
(53410,55,5588.701,-2672.9111,1488.1399,NULL,0),
(53410,56,5584.229,-2660.341,1488.8636,NULL,0),
(53410,57,5577.057,-2651.0566,1488.666,NULL,0),
(53410,58,5567.4277,-2642.5566,1486.6902,NULL,0),
(53410,59,5551.3076,-2637.1445,1484.2322,NULL,0),
(53410,60,5529.2163,-2639.4797,1480.9241,NULL,0),
(53411,1,5568.778,-2645.6055,1486.9862,NULL,0),
(53411,2,5584.9697,-2660.7166,1488.8943,NULL,0),
(53411,3,5589.07,-2675.5715,1488.4685,NULL,0),
(53411,4,5586.555,-2700.6943,1491.797,NULL,0),
(53411,5,5585.324,-2715.9377,1492.3906,NULL,0),
(53411,6,5583.584,-2737.8516,1492.2336,NULL,0),
(53411,7,5578.492,-2756.6133,1494.9377,NULL,0),
(53411,8,5571.506,-2760.035,1494.7231,NULL,0),
(53411,9,5551.664,-2765.3132,1495.0864,NULL,0),
(53411,10,5538.9116,-2778.416,1495.5771,NULL,0),
(53411,11,5520.1265,-2790.365,1497.8389,NULL,0),
(53411,12,5509.284,-2798.237,1499.7949,NULL,0),
(53411,13,5499.019,-2807.908,1499.7987,NULL,0),
(53411,14,5496.225,-2817.7764,1501.4862,NULL,0),
(53411,15,5497.596,-2828.4814,1502.4352,NULL,0),
(53411,16,5501.622,-2845.3489,1506.0148,NULL,0),
(53411,17,5510.1943,-2853.306,1506.7236,NULL,0),
(53411,18,5522.693,-2856.1985,1506.4766,NULL,0),
(53411,19,5540.6934,-2855.918,1506.6383,NULL,0),
(53411,20,5555.453,-2855.1829,1507.7351,NULL,0),
(53411,21,5578.8203,-2853.4954,1508.4988,NULL,0),
(53411,22,5600.924,-2865.9172,1510.0449,NULL,0),
(53411,23,5611.5435,-2858.2832,1510.0449,NULL,0),
(53411,24,5609.9824,-2846.4702,1508.4711,NULL,0),
(53411,25,5604.1978,-2835.6584,1506.0844,NULL,0),
(53411,26,5604.235,-2820.8938,1502.7279,NULL,0),
(53411,27,5599.551,-2804.6838,1499.9973,NULL,0),
(53411,28,5588.5654,-2793.886,1497.8118,NULL,0),
(53411,29,5576.909,-2792.0662,1496.1624,NULL,0),
(53411,30,5564.8228,-2788.3489,1495.9127,NULL,0),
(53411,31,5553.541,-2782.4219,1496.4569,NULL,0),
(53411,32,5543.0117,-2773.559,1495.3135,NULL,0),
(53411,33,5533.3296,-2765.0774,1492.9589,NULL,0),
(53411,34,5519.7197,-2749.5457,1487.0782,NULL,0),
(53411,35,5515.1313,-2742.8567,1485.7285,NULL,0),
(53411,36,5515.746,-2729.4307,1484.2761,NULL,0),
(53411,37,5519.233,-2696.7622,1480.7529,NULL,0),
(53411,38,5524.063,-2662.2192,1479.2719,NULL,0),
(53411,39,5529.2163,-2648.1167,1480.1172,NULL,0),
(53411,40,5536.944,-2639.985,1480.5801,NULL,0),
(53411,41,5546.701,-2637.048,1482.9175,NULL,0),
(53411,42,5557.5415,-2636.9978,1485.0974,NULL,0),
(53412,1,5532.7236,-2457.3237,1469.1919,NULL,0),
(53412,2,5539.676,-2464.6082,1470.3188,NULL,0),
(53412,3,5544.0605,-2473.5918,1471.5969,NULL,0),
(53412,4,5545.5415,-2484.1462,1472.698,NULL,0),
(53412,5,5548.466,-2493.9016,1473.9652,NULL,0),
(53412,6,5550.698,-2500.9626,1474.5732,NULL,0),
(53412,7,5553.463,-2510.5525,1475.7313,NULL,0),
(53412,8,5554.3345,-2520.8079,1476.6929,NULL,0),
(53412,9,5552.836,-2531.5496,1477.6594,NULL,0),
(53412,10,5550.8276,-2545.3945,1478.4252,NULL,0),
(53412,11,5548.969,-2559.7285,1478.7358,NULL,0),
(53412,12,5547.0005,-2577.7766,1479.2656,NULL,0),
(53412,13,5546.04,-2594.6523,1479.6841,NULL,0),
(53412,14,5544.9263,-2614.3945,1480.5408,NULL,0),
(53412,15,5535.924,-2632.5027,1480.8146,NULL,0),
(53412,16,5524.599,-2645.593,1480.7798,NULL,0),
(53412,17,5516.548,-2653.839,1480.2125,NULL,0),
(53412,18,5507.936,-2661.7375,1480.3279,NULL,0),
(53412,19,5497.164,-2674.424,1481.0802,NULL,0),
(53412,20,5486.778,-2687.503,1480.3407,NULL,0),
(53412,21,5473.4985,-2701.9478,1484.2719,NULL,0),
(53412,22,5464.584,-2728.4707,1484.943,NULL,0),
(53412,23,5447.4214,-2754.9446,1490.6799,NULL,0); -- rest of the path is unknown, aggro with Thrall happens before reaching this point
-11
View File
@@ -3538,7 +3538,6 @@ void SpellMgr::LoadSpellInfoCorrections()
ApplySpellFix({
63665, // Charge (Argent Tournament emote on riders)
31298, // Sleep (needs target selection script)
51904, // Summon Ghouls On Scarlet Crusade (this should use conditions table, script for this spell needs to be fixed)
68933, // Wrath of Air Totem rank 2 (Aura)
29200 // Purify Helboar Meat
@@ -3562,15 +3561,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesEx4 |= SPELL_ATTR4_IGNORE_DAMAGE_TAKEN_MODIFIERS;
});
// Howl of Azgalor
ApplySpellFix({ 31344 }, [](SpellInfo* spellInfo)
{
ApplySpellEffectFix(spellInfo, EFFECT_0, [](SpellEffectInfo* spellEffectInfo)
{
spellEffectInfo->TargetARadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_100_YARDS); // 100yards instead of 50000?!
});
});
ApplySpellFix({
42818, // Headless Horseman - Wisp Flight Port
42821, // Headless Horseman - Wisp Flight Missile
@@ -3591,7 +3581,6 @@ void SpellMgr::LoadSpellInfoCorrections()
});
ApplySpellFix({
31347, // Doom
36327, // Shoot Arcane Explosion Arrow
39365, // Thundering Storm
41071, // Raise Dead (HACK)
@@ -15,279 +15,288 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Combat timers requires to be revisited
*/
#include "ScriptMgr.h"
#include "Containers.h"
#include "hyjal.h"
#include "hyjal_trash.h"
#include "InstanceScript.h"
#include "ObjectAccessor.h"
#include "MotionMaster.h"
#include "ScriptedCreature.h"
#include "SpellInfo.h"
#include "SpellScript.h"
enum Spells
enum AnetheronTexts
{
SPELL_CARRION_SWARM = 31306,
SAY_INTRO = 0,
SAY_SLEEP = 1,
SAY_SWARM = 2,
SAY_INFERNO = 3,
SAY_SLAY = 4,
SAY_DEATH = 5
};
enum AnetheronSpells
{
// Anetheron
SPELL_VAMPIRIC_AURA = 31317,
SPELL_SLEEP = 31298,
SPELL_VAMPIRIC_AURA = 38196,
SPELL_VAMPIRIC_AURA_HEAL = 31285,
SPELL_INFERNO = 31299,
SPELL_IMMOLATION = 31303,
SPELL_INFERNO_EFFECT = 31302
SPELL_CARRION_SWARM = 31306,
SPELL_BERSERK = 26662,
// Towering Infernal
SPELL_IMMOLATION = 31304,
SPELL_INFERNO_EFFECT = 31302,
SPELL_INSTAKILL_SELF = 29878,
// Scripts
SPELL_VAMPIRIC_AURA_HEAL = 31285
};
enum Texts
enum AnetheronEvents
{
SAY_ONDEATH = 0,
SAY_ONSLAY = 1,
SAY_SWARM = 2,
SAY_SLEEP = 3,
SAY_INFERNO = 4,
SAY_ONAGGRO = 5,
EVENT_SLEEP = 1,
EVENT_INFERNO,
EVENT_CARRION_SWARM,
EVENT_BERSERK
};
static constexpr uint32 PATH_ESCORT_ANETHERON = 142466;
class boss_anetheron : public CreatureScript
enum AnetheronMisc
{
public:
boss_anetheron() : CreatureScript("boss_anetheron") { }
NPC_TOWERING_INFERNAL = 17818,
ACTION_KILL_SELF = 0
};
CreatureAI* GetAI(Creature* creature) const override
// 17808 - Anetheron
struct boss_anetheron : public BossAI
{
boss_anetheron(Creature* creature) : BossAI(creature, DATA_ANETHERON), _summons(me) { }
void JustAppeared() override
{
return GetHyjalAI<boss_anetheronAI>(creature);
Talk(SAY_INTRO);
me->GetMotionMaster()->MovePath(RAND(PATH_ALLY_INITIAL_1, PATH_ALLY_INITIAL_2, PATH_ALLY_INITIAL_3), false);
}
struct boss_anetheronAI : public hyjal_trashAI
void Reset() override
{
boss_anetheronAI(Creature* creature) : hyjal_trashAI(creature)
{
Initialize();
instance = creature->GetInstanceScript();
go = false;
}
void Initialize()
{
SwarmTimer = 45000;
SleepTimer = 60000;
AuraTimer = 5000;
InfernoTimer = 45000;
damageTaken = 0;
}
uint32 SwarmTimer;
uint32 SleepTimer;
uint32 AuraTimer;
uint32 InfernoTimer;
bool go;
void Reset() override
{
Initialize();
if (IsEvent)
instance->SetBossState(DATA_ANETHERON, NOT_STARTED);
}
void JustEngagedWith(Unit* /*who*/) override
{
if (IsEvent)
instance->SetBossState(DATA_ANETHERON, IN_PROGRESS);
Talk(SAY_ONAGGRO);
}
void KilledUnit(Unit* who) override
{
if (who->GetTypeId() == TYPEID_PLAYER)
Talk(SAY_ONSLAY);
}
void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override
{
if (waypointId == 7)
{
Creature* target = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_JAINAPROUDMOORE));
if (target && target->IsAlive())
AddThreat(target, 0.0f);
}
}
void JustDied(Unit* killer) override
{
hyjal_trashAI::JustDied(killer);
if (IsEvent)
instance->SetBossState(DATA_ANETHERON, DONE);
Talk(SAY_ONDEATH);
}
void UpdateAI(uint32 diff) override
{
if (IsEvent)
{
//Must update EscortAI
EscortAI::UpdateAI(diff);
if (!go)
{
go = true;
LoadPath(PATH_ESCORT_ANETHERON);
Start(false);
SetDespawnAtEnd(false);
}
}
//Return since we have no target
if (!UpdateVictim())
return;
if (SwarmTimer <= diff)
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
DoCast(target, SPELL_CARRION_SWARM);
SwarmTimer = urand(45000, 60000);
Talk(SAY_SWARM);
} else SwarmTimer -= diff;
if (SleepTimer <= diff)
{
for (uint8 i = 0; i < 3; ++i)
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
target->CastSpell(target, SPELL_SLEEP, true);
}
SleepTimer = 60000;
Talk(SAY_SLEEP);
} else SleepTimer -= diff;
if (AuraTimer <= diff)
{
DoCast(me, SPELL_VAMPIRIC_AURA, true);
AuraTimer = urand(10000, 20000);
} else AuraTimer -= diff;
if (InfernoTimer <= diff)
{
DoCast(SelectTarget(SelectTargetMethod::Random, 0, 100, true), SPELL_INFERNO);
InfernoTimer = 45000;
Talk(SAY_INFERNO);
} else InfernoTimer -= diff;
}
};
};
class npc_towering_infernal : public CreatureScript
{
public:
npc_towering_infernal() : CreatureScript("npc_towering_infernal") { }
CreatureAI* GetAI(Creature* creature) const override
{
return GetHyjalAI<npc_towering_infernalAI>(creature);
_Reset();
DoCastSelf(SPELL_VAMPIRIC_AURA);
_summons.DespawnAll();
}
struct npc_towering_infernalAI : public ScriptedAI
void JustEngagedWith(Unit* who) override
{
npc_towering_infernalAI(Creature* creature) : ScriptedAI(creature)
BossAI::JustEngagedWith(who);
events.ScheduleEvent(EVENT_SLEEP, 25s, 35s);
events.ScheduleEvent(EVENT_INFERNO, 15s, 35s);
events.ScheduleEvent(EVENT_CARRION_SWARM, 10s, 15s);
events.ScheduleEvent(EVENT_BERSERK, 10min);
}
void OnSpellCast(SpellInfo const* spellInfo) override
{
switch (spellInfo->Id)
{
ImmolationTimer = 5000;
CheckTimer = 5000;
instance = creature->GetInstanceScript();
case SPELL_SLEEP:
if (roll_chance(30))
Talk(SAY_SLEEP);
break;
case SPELL_INFERNO:
if (roll_chance(30))
Talk(SAY_INFERNO);
break;
case SPELL_CARRION_SWARM:
if (roll_chance(30))
Talk(SAY_SWARM);
break;
default:
break;
}
}
uint32 ImmolationTimer;
uint32 CheckTimer;
InstanceScript* instance;
void Reset() override
void WaypointPathEnded(uint32 /*waypointId*/, uint32 pathId) override
{
switch (pathId)
{
DoCast(me, SPELL_INFERNO_EFFECT);
ImmolationTimer = 5000;
CheckTimer = 5000;
case PATH_ALLY_INITIAL_1:
case PATH_ALLY_INITIAL_2:
case PATH_ALLY_INITIAL_3:
me->GetMotionMaster()->MovePath(RAND(PATH_ALLY_BASE_1, PATH_ALLY_BASE_2, PATH_ALLY_BASE_3), true);
break;
default:
break;
}
}
void JustEngagedWith(Unit* /*who*/) override
void JustSummoned(Creature* summon) override
{
_summons.Summon(summon);
}
// Do not reset SetActive, we want boss to be active all the time
void JustReachedHome() override { }
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/) override
{
_JustDied();
Talk(SAY_DEATH);
std::vector<Creature*> infernals;
GetCreatureListWithEntryInGrid(infernals, me, NPC_TOWERING_INFERNAL, 500.0f);
for (Creature* infernal : infernals)
infernal->AI()->DoAction(ACTION_KILL_SELF);
}
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
}
void KilledUnit(Unit* /*victim*/) override
{
}
void JustDied(Unit* /*killer*/) override
{
}
void MoveInLineOfSight(Unit* who) override
{
if (me->IsWithinDist(who, 50) && !me->IsInCombat() && me->IsValidAttackTarget(who))
AttackStart(who);
}
void UpdateAI(uint32 diff) override
{
if (CheckTimer <= diff)
switch (eventId)
{
Creature* boss = instance->GetCreature(DATA_ANETHERON);
if (!boss || boss->isDead())
{
me->DespawnOrUnsummon();
return;
}
CheckTimer = 5000;
} else CheckTimer -= diff;
case EVENT_SLEEP:
DoCastSelf(SPELL_SLEEP);
events.Repeat(15s, 35s);
break;
case EVENT_INFERNO:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 250.0f, true))
DoCast(target, SPELL_INFERNO);
events.Repeat(55s);
break;
case EVENT_CARRION_SWARM:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 60.0f))
DoCast(target, SPELL_CARRION_SWARM);
events.Repeat(10s, 20s);
break;
case EVENT_BERSERK:
DoCastSelf(SPELL_BERSERK);
break;
default:
break;
}
//Return since we have no target
if (!UpdateVictim())
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
if (ImmolationTimer <= diff)
{
DoCast(me, SPELL_IMMOLATION);
ImmolationTimer = 5000;
} else ImmolationTimer -= diff;
}
};
}
private:
SummonList _summons;
};
// 17818 - Towering Infernal
struct npc_towering_infernal : public ScriptedAI
{
npc_towering_infernal(Creature* creature) : ScriptedAI(creature) { }
void InitializeAI() override
{
me->SetReactState(REACT_PASSIVE);
}
void JustAppeared() override
{
DoCastSelf(SPELL_IMMOLATION);
_scheduler.Schedule(1200ms, [this](TaskContext const& /*task*/)
{
DoCastSelf(SPELL_INFERNO_EFFECT);
DoZoneInCombat();
me->SetReactState(REACT_AGGRESSIVE);
});
}
void EnterEvadeMode(EvadeReason /*why*/) override
{
me->DespawnOrUnsummon();
}
void DoAction(int32 action) override
{
if (action == ACTION_KILL_SELF)
DoCastSelf(SPELL_INSTAKILL_SELF, true);
}
void UpdateAI(uint32 diff) override
{
_scheduler.Update(diff);
UpdateVictim();
}
private:
TaskScheduler _scheduler;
};
// 38196 - Vampiric Aura
class spell_anetheron_vampiric_aura : public SpellScriptLoader
class spell_anetheron_vampiric_aura : public AuraScript
{
public:
spell_anetheron_vampiric_aura() : SpellScriptLoader("spell_anetheron_vampiric_aura") { }
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_VAMPIRIC_AURA_HEAL });
}
class spell_anetheron_vampiric_aura_AuraScript : public AuraScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_VAMPIRIC_AURA_HEAL });
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
if (!damageInfo || !damageInfo->GetDamage())
return;
void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
if (!damageInfo || !damageInfo->GetDamage())
return;
Unit* actor = eventInfo.GetActor();
CastSpellExtraArgs args(aurEff);
args.AddSpellMod(SPELLVALUE_BASE_POINT0, damageInfo->GetDamage() * 3);
actor->CastSpell(actor, SPELL_VAMPIRIC_AURA_HEAL, args);
}
Unit* actor = eventInfo.GetActor();
CastSpellExtraArgs args(aurEff);
args.AddSpellMod(SPELLVALUE_BASE_POINT0, damageInfo->GetDamage() * 3);
actor->CastSpell(actor, SPELL_VAMPIRIC_AURA_HEAL, args);
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_anetheron_vampiric_aura::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_anetheron_vampiric_aura_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
// 31298 - Sleep
class spell_anetheron_sleep : public SpellScript
{
bool Load() override
{
return GetCaster()->IsUnit();
}
AuraScript* GetAuraScript() const override
{
return new spell_anetheron_vampiric_aura_AuraScript();
}
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove(GetCaster()->GetVictim());
Trinity::Containers::RandomResize(targets, 3);
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_anetheron_sleep::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
void AddSC_boss_anetheron()
{
new boss_anetheron();
new npc_towering_infernal();
new spell_anetheron_vampiric_aura();
RegisterHyjalCreatureAI(boss_anetheron);
RegisterHyjalCreatureAI(npc_towering_infernal);
RegisterSpellScript(spell_anetheron_vampiric_aura);
RegisterSpellScript(spell_anetheron_sleep);
}
@@ -15,258 +15,212 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ScriptMgr.h"
#include "hyjal.h"
#include "hyjal_trash.h"
#include "InstanceScript.h"
#include "ObjectAccessor.h"
/*
* Combat timers requires to be revisited
* The way he casts Doom is quite tricky, currently he casts it in solo, it's wrong
1. In case of player with pet if player is not current victim he will cast spell even if player is not in spell range
2. In case of solo if player is current victim he doesn't cast spell even if is attacked also by creatures
*/
enum Spells
#include "ScriptMgr.h"
#include "Containers.h"
#include "hyjal.h"
#include "InstanceScript.h"
#include "MotionMaster.h"
#include "ScriptedCreature.h"
#include "SpellInfo.h"
#include "SpellScript.h"
enum AzgalorTexts
{
SAY_INTRO = 0,
SAY_DOOM = 1,
SAY_SLAY = 2,
SAY_DEATH = 3
};
enum AzgalorSpells
{
// Azgalor
SPELL_RAIN_OF_FIRE = 31340,
SPELL_DOOM = 31347,
SPELL_HOWL_OF_AZGALOR = 31344,
SPELL_CLEAVE = 31345,
SPELL_DOOM = 31347,
SPELL_BERSERK = 26662,
// Lesser Doomguard
SPELL_THRASH = 12787,
SPELL_CRIPPLE = 31406,
SPELL_WARSTOMP = 31408,
SPELL_WAR_STOMP = 31408
};
enum Texts
enum AzgalorEvents
{
SAY_ONDEATH = 0,
SAY_ONSLAY = 1,
SAY_DOOM = 2, // Not used?
SAY_ONAGGRO = 3,
EVENT_RAIN_OF_FIRE = 1,
EVENT_HOWL_OF_AZGALOR,
EVENT_CLEAVE,
EVENT_DOOM,
EVENT_BERSERK
};
static constexpr uint32 PATH_ESCORT_AZGALOR = 142738;
class boss_azgalor : public CreatureScript
// 17842 - Azgalor
struct boss_azgalor : public BossAI
{
public:
boss_azgalor() : CreatureScript("boss_azgalor") { }
boss_azgalor(Creature* creature) : BossAI(creature, DATA_AZGALOR) { }
CreatureAI* GetAI(Creature* creature) const override
void JustAppeared() override
{
return GetHyjalAI<boss_azgalorAI>(creature);
Talk(SAY_INTRO);
me->GetMotionMaster()->MovePath(PATH_HORDE_BOSS, false);
}
struct boss_azgalorAI : public hyjal_trashAI
void JustEngagedWith(Unit* who) override
{
boss_azgalorAI(Creature* creature) : hyjal_trashAI(creature)
{
Initialize();
instance = creature->GetInstanceScript();
go = false;
}
BossAI::JustEngagedWith(who);
void Initialize()
{
damageTaken = 0;
RainTimer = 20000;
DoomTimer = 50000;
HowlTimer = 30000;
CleaveTimer = 10000;
EnrageTimer = 600000;
enraged = false;
}
uint32 RainTimer;
uint32 DoomTimer;
uint32 HowlTimer;
uint32 CleaveTimer;
uint32 EnrageTimer;
bool enraged;
bool go;
void Reset() override
{
Initialize();
if (IsEvent)
instance->SetBossState(DATA_AZGALOR, NOT_STARTED);
}
void JustEngagedWith(Unit* /*who*/) override
{
if (IsEvent)
instance->SetBossState(DATA_AZGALOR, IN_PROGRESS);
Talk(SAY_ONAGGRO);
}
void KilledUnit(Unit* /*victim*/) override
{
Talk(SAY_ONSLAY);
}
void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override
{
if (waypointId == 7 && instance)
{
Creature* target = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_THRALL));
if (target && target->IsAlive())
AddThreat(target, 0.0f);
}
}
void JustDied(Unit* killer) override
{
hyjal_trashAI::JustDied(killer);
if (IsEvent)
instance->SetBossState(DATA_AZGALOR, DONE);
Talk(SAY_ONDEATH);
}
void UpdateAI(uint32 diff) override
{
if (IsEvent)
{
//Must update EscortAI
EscortAI::UpdateAI(diff);
if (!go)
{
go = true;
LoadPath(PATH_ESCORT_AZGALOR);
Start(false);
SetDespawnAtEnd(false);
}
}
//Return since we have no target
if (!UpdateVictim())
return;
if (RainTimer <= diff)
{
DoCast(SelectTarget(SelectTargetMethod::Random, 0, 30, true), SPELL_RAIN_OF_FIRE);
RainTimer = 20000 + rand32() % 15000;
} else RainTimer -= diff;
if (DoomTimer <= diff)
{
DoCast(SelectTarget(SelectTargetMethod::Random, 1, 100, true), SPELL_DOOM);//never on tank
DoomTimer = 45000 + rand32() % 5000;
} else DoomTimer -= diff;
if (HowlTimer <= diff)
{
DoCast(me, SPELL_HOWL_OF_AZGALOR);
HowlTimer = 30000;
} else HowlTimer -= diff;
if (CleaveTimer <= diff)
{
DoCastVictim(SPELL_CLEAVE);
CleaveTimer = 10000 + rand32() % 5000;
} else CleaveTimer -= diff;
if (EnrageTimer < diff && !enraged)
{
me->InterruptNonMeleeSpells(false);
DoCast(me, SPELL_BERSERK, true);
enraged = true;
EnrageTimer = 600000;
} else EnrageTimer -= diff;
}
};
};
class npc_lesser_doomguard : public CreatureScript
{
public:
npc_lesser_doomguard() : CreatureScript("npc_lesser_doomguard") { }
CreatureAI* GetAI(Creature* creature) const override
{
return GetHyjalAI<npc_lesser_doomguardAI>(creature);
events.ScheduleEvent(EVENT_RAIN_OF_FIRE, 20s, 25s);
events.ScheduleEvent(EVENT_HOWL_OF_AZGALOR, 30s, 40s);
events.ScheduleEvent(EVENT_CLEAVE, 5s, 10s);
events.ScheduleEvent(EVENT_DOOM, 45s, 60s);
events.ScheduleEvent(EVENT_BERSERK, 10min);
}
struct npc_lesser_doomguardAI : public hyjal_trashAI
void OnSpellCast(SpellInfo const* spellInfo) override
{
npc_lesser_doomguardAI(Creature* creature) : hyjal_trashAI(creature)
if (spellInfo->Id == SPELL_DOOM)
Talk(SAY_DOOM);
}
// Do not reset SetActive, we want boss to be active all the time
void JustReachedHome() override { }
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/) override
{
_JustDied();
Talk(SAY_DEATH);
}
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
CrippleTimer = 50000;
WarstompTimer = 10000;
CheckTimer = 5000;
AzgalorGUID = instance->GetGuidData(DATA_AZGALOR);
}
uint32 CrippleTimer;
uint32 WarstompTimer;
uint32 CheckTimer;
ObjectGuid AzgalorGUID;
void Reset() override
{
CrippleTimer = 50000;
WarstompTimer = 10000;
DoCast(me, SPELL_THRASH);
CheckTimer = 5000;
}
void JustEngagedWith(Unit* /*who*/) override
{
}
void KilledUnit(Unit* /*victim*/) override
{
}
void MoveInLineOfSight(Unit* who) override
{
if (me->IsWithinDist(who, 50) && !me->IsInCombat() && me->IsValidAttackTarget(who))
AttackStart(who);
}
void JustDied(Unit* /*killer*/) override
{
}
void UpdateAI(uint32 diff) override
{
if (CheckTimer <= diff)
switch (eventId)
{
if (!AzgalorGUID.IsEmpty())
{
Creature* boss = ObjectAccessor::GetCreature(*me, AzgalorGUID);
if (!boss || boss->isDead())
{
me->DespawnOrUnsummon();
return;
}
}
CheckTimer = 5000;
} else CheckTimer -= diff;
case EVENT_RAIN_OF_FIRE:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f, true))
DoCast(target, SPELL_RAIN_OF_FIRE);
events.Repeat(15s, 30s);
break;
case EVENT_HOWL_OF_AZGALOR:
DoCastSelf(SPELL_HOWL_OF_AZGALOR);
events.Repeat(25s, 35s);
break;
case EVENT_CLEAVE:
DoCastVictim(SPELL_CLEAVE);
events.Repeat(8s, 15s);
break;
case EVENT_DOOM:
DoCastSelf(SPELL_DOOM);
events.Repeat(45s, 60s);
break;
case EVENT_BERSERK:
DoCastSelf(SPELL_BERSERK);
break;
default:
break;
}
//Return since we have no target
if (!UpdateVictim())
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
if (WarstompTimer <= diff)
{
DoCast(me, SPELL_WARSTOMP);
WarstompTimer = 10000 + rand32() % 5000;
} else WarstompTimer -= diff;
if (CrippleTimer <= diff)
{
DoCast(SelectTarget(SelectTargetMethod::Random, 0, 100, true), SPELL_CRIPPLE);
CrippleTimer = 25000 + rand32() % 5000;
} else CrippleTimer -= diff;
}
};
}
};
// 17864 - Lesser Doomguard
struct npc_lesser_doomguard : public ScriptedAI
{
npc_lesser_doomguard(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
void JustAppeared() override
{
DoZoneInCombat();
if (Creature* azgalor = _instance->GetCreature(DATA_AZGALOR))
azgalor->AI()->JustSummoned(me);
}
void Reset() override
{
_scheduler.CancelAll();
DoCastSelf(SPELL_THRASH);
}
void JustEngagedWith(Unit* /*who*/) override
{
_scheduler
.Schedule(4s, 10s, [this](TaskContext& task)
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
DoCast(target, SPELL_CRIPPLE);
task.Repeat(10s, 15s);
})
.Schedule(10s, 15s, [this](TaskContext& task)
{
DoCastSelf(SPELL_WAR_STOMP);
task.Repeat(10s, 15s);
});
}
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
return;
_scheduler.Update(diff);
}
private:
TaskScheduler _scheduler;
InstanceScript* _instance;
};
// 31347 - Doom
class spell_azgalor_doom : public SpellScript
{
bool Load() override
{
return GetCaster()->IsUnit();
}
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove(GetCaster()->GetVictim());
Trinity::Containers::RandomResize(targets, 1);
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_azgalor_doom::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
void AddSC_boss_azgalor()
{
new boss_azgalor();
new npc_lesser_doomguard();
RegisterHyjalCreatureAI(boss_azgalor);
RegisterHyjalCreatureAI(npc_lesser_doomguard);
RegisterSpellScript(spell_azgalor_doom);
}
@@ -15,152 +15,143 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Combat timers requires to be revisited
*/
#include "ScriptMgr.h"
#include "hyjal.h"
#include "hyjal_trash.h"
#include "InstanceScript.h"
#include "ObjectAccessor.h"
#include "MotionMaster.h"
#include "ScriptedCreature.h"
#include "SpellAuraEffects.h"
#include "SpellInfo.h"
#include "SpellScript.h"
enum Spells
enum KazrogalTexts
{
SPELL_CLEAVE = 31436,
SPELL_WARSTOMP = 31480,
SPELL_MARK = 31447,
SPELL_MARK_DAMAGE = 31463
SAY_INTRO = 0,
SAY_MARK = 1,
SAY_SLAY = 2
};
enum Texts
enum KazrogalSpells
{
SAY_ONSLAY = 0,
SAY_MARK = 1,
SAY_ONAGGRO = 2,
SPELL_MALEVOLENT_CLEAVE = 31436,
SPELL_WAR_STOMP = 31480,
SPELL_CRIPPLE = 31477,
SPELL_MARK_OF_KAZROGAL = 31447,
SPELL_MARK_OF_KAZROGAL_DMG = 31463
};
enum Sounds
enum KazrogalEvents
{
SOUND_ONDEATH = 11018,
EVENT_MALEVOLENT_CLEAVE = 1,
EVENT_WAR_STOMP,
EVENT_CRIPPLE,
EVENT_MARK_OF_KAZROGAL
};
static constexpr uint32 PATH_ESCORT_KAZROGAL = 143106;
class boss_kazrogal : public CreatureScript
enum KazrogalMisc
{
public:
boss_kazrogal() : CreatureScript("boss_kazrogal") { }
SOUND_DEATH = 11018
};
CreatureAI* GetAI(Creature* creature) const override
// 17888 - Kaz'rogal
struct boss_kazrogal : public BossAI
{
boss_kazrogal(Creature* creature) : BossAI(creature, DATA_KAZROGAL), _markCount(0), _markTimer(0) { }
void JustAppeared() override
{
return GetHyjalAI<boss_kazrogalAI>(creature);
Talk(SAY_INTRO);
me->GetMotionMaster()->MovePath(PATH_HORDE_BOSS, false);
}
struct boss_kazrogalAI : public hyjal_trashAI
void Reset() override
{
boss_kazrogalAI(Creature* creature) : hyjal_trashAI(creature)
_Reset();
_markCount = 0;
_markTimer = 45s;
}
void JustEngagedWith(Unit* who) override
{
BossAI::JustEngagedWith(who);
events.ScheduleEvent(EVENT_MALEVOLENT_CLEAVE, 6s, 12s);
events.ScheduleEvent(EVENT_WAR_STOMP, 20s, 30s);
events.ScheduleEvent(EVENT_CRIPPLE, 15s, 20s);
events.ScheduleEvent(EVENT_MARK_OF_KAZROGAL, 45s);
}
void OnSpellCast(SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_MARK_OF_KAZROGAL)
Talk(SAY_MARK);
}
// Do not reset SetActive, we want boss to be active all the time
void JustReachedHome() override { }
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/) override
{
_JustDied();
DoPlaySoundToSet(me, SOUND_DEATH);
}
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
Initialize();
instance = creature->GetInstanceScript();
go = false;
}
void Initialize()
{
damageTaken = 0;
CleaveTimer = 5000;
WarStompTimer = 15000;
MarkTimer = 45000;
MarkTimerBase = 45000;
}
uint32 CleaveTimer;
uint32 WarStompTimer;
uint32 MarkTimer;
uint32 MarkTimerBase;
bool go;
void Reset() override
{
Initialize();
if (IsEvent)
instance->SetBossState(DATA_KAZROGAL, NOT_STARTED);
}
void JustEngagedWith(Unit* /*who*/) override
{
if (IsEvent)
instance->SetBossState(DATA_KAZROGAL, IN_PROGRESS);
Talk(SAY_ONAGGRO);
}
void KilledUnit(Unit* /*victim*/) override
{
Talk(SAY_ONSLAY);
}
void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override
{
if (waypointId == 7 && instance)
switch (eventId)
{
Creature* target = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_THRALL));
if (target && target->IsAlive())
AddThreat(target, 0.0f);
}
}
void JustDied(Unit* killer) override
{
hyjal_trashAI::JustDied(killer);
if (IsEvent)
instance->SetBossState(DATA_KAZROGAL, DONE);
DoPlaySoundToSet(me, SOUND_ONDEATH);
}
void UpdateAI(uint32 diff) override
{
if (IsEvent)
{
//Must update EscortAI
EscortAI::UpdateAI(diff);
if (!go)
{
go = true;
LoadPath(PATH_ESCORT_KAZROGAL);
Start(false);
SetDespawnAtEnd(false);
}
case EVENT_MALEVOLENT_CLEAVE:
DoCastVictim(SPELL_MALEVOLENT_CLEAVE);
events.Repeat(6s, 12s);
break;
case EVENT_WAR_STOMP:
DoCastSelf(SPELL_WAR_STOMP);
events.Repeat(15s, 25s);
break;
case EVENT_CRIPPLE:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 20.0f))
DoCast(target, SPELL_CRIPPLE);
events.Repeat(15s, 25s);
break;
case EVENT_MARK_OF_KAZROGAL:
DoCastSelf(SPELL_MARK_OF_KAZROGAL);
++_markCount;
if (_markCount <= 7)
_markTimer -= 5s;
events.Repeat(_markTimer);
break;
default:
break;
}
//Return since we have no target
if (!UpdateVictim())
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
if (CleaveTimer <= diff)
{
DoCast(me, SPELL_CLEAVE);
CleaveTimer = 6000 + rand32() % 15000;
} else CleaveTimer -= diff;
if (WarStompTimer <= diff)
{
DoCast(me, SPELL_WARSTOMP);
WarStompTimer = 60000;
} else WarStompTimer -= diff;
if (MarkTimer <= diff)
{
DoCastAOE(SPELL_MARK);
MarkTimerBase -= 5000;
if (MarkTimerBase < 5500)
MarkTimerBase = 5500;
MarkTimer = MarkTimerBase;
Talk(SAY_MARK);
} else MarkTimer -= diff;
}
};
}
private:
uint8 _markCount;
Milliseconds _markTimer;
};
class MarkTargetFilter
@@ -170,67 +161,50 @@ class MarkTargetFilter
{
if (Unit* unit = target->ToUnit())
return unit->GetPowerType() != POWER_MANA;
return false;
return true;
}
};
// 31447 - Mark of Kaz'rogal
class spell_mark_of_kazrogal : public SpellScriptLoader
class spell_mark_of_kazrogal : public SpellScript
{
public:
spell_mark_of_kazrogal() : SpellScriptLoader("spell_mark_of_kazrogal") { }
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove_if(MarkTargetFilter());
}
class spell_mark_of_kazrogal_SpellScript : public SpellScript
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mark_of_kazrogal::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
class spell_mark_of_kazrogal_aura : public AuraScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_MARK_OF_KAZROGAL_DMG });
}
void OnPeriodic(AuraEffect const* aurEff)
{
Unit* target = GetTarget();
if (target->GetPower(POWER_MANA) < aurEff->GetAmountAsInt())
{
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove_if(MarkTargetFilter());
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mark_of_kazrogal_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
class spell_mark_of_kazrogal_AuraScript : public AuraScript
{
bool Validate(SpellInfo const* /*spell*/) override
{
return ValidateSpellInfo({ SPELL_MARK_DAMAGE });
}
void OnPeriodic(AuraEffect const* aurEff)
{
Unit* target = GetTarget();
if (target->GetPower(POWER_MANA) == 0)
{
target->CastSpell(target, SPELL_MARK_DAMAGE, aurEff);
// Remove aura
SetDuration(0);
}
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_mark_of_kazrogal_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_MANA_LEECH);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_mark_of_kazrogal_SpellScript();
target->CastSpell(target, SPELL_MARK_OF_KAZROGAL_DMG, aurEff);
Remove();
}
}
AuraScript* GetAuraScript() const override
{
return new spell_mark_of_kazrogal_AuraScript();
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_mark_of_kazrogal_aura::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_MANA_LEECH);
}
};
void AddSC_boss_kazrogal()
{
new boss_kazrogal();
new spell_mark_of_kazrogal();
RegisterHyjalCreatureAI(boss_kazrogal);
RegisterSpellAndAuraScriptPair(spell_mark_of_kazrogal, spell_mark_of_kazrogal_aura);
}
@@ -15,149 +15,158 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Combat timers requires to be revisited
*/
#include "ScriptMgr.h"
#include "hyjal.h"
#include "hyjal_trash.h"
#include "InstanceScript.h"
#include "ObjectAccessor.h"
#include "MotionMaster.h"
#include "ScriptedCreature.h"
#include "SpellInfo.h"
enum Spells
enum WinterchillTexts
{
SAY_INTRO = 0,
SAY_DECAY = 1,
SAY_NOVA = 2,
SAY_SLAY = 3,
SAY_DEATH = 4
};
enum WinterchillSpells
{
SPELL_ICEBOLT = 31249,
SPELL_FROST_NOVA = 31250,
SPELL_FROST_ARMOR = 31256,
SPELL_DEATH_AND_DECAY = 31258,
SPELL_FROST_NOVA = 31250,
SPELL_ICEBOLT = 31249
SPELL_BERSERK = 26662
};
enum Texts
enum WinterchillEvents
{
SAY_ONDEATH = 0,
SAY_ONSLAY = 1,
SAY_DECAY = 2,
SAY_NOVA = 3,
SAY_ONAGGRO = 4
EVENT_ICEBOLT = 1,
EVENT_FROST_NOVA,
EVENT_FROST_ARMOR,
EVENT_DEATH_AND_DECAY,
EVENT_BERSERK
};
static constexpr uint32 PATH_ESCORT_RAGE_WINTERCHILL = 142138;
class boss_rage_winterchill : public CreatureScript
// 17767 - Rage Winterchill
struct boss_rage_winterchill : public BossAI
{
public:
boss_rage_winterchill() : CreatureScript("boss_rage_winterchill") { }
boss_rage_winterchill(Creature* creature) : BossAI(creature, DATA_RAGEWINTERCHILL) { }
CreatureAI* GetAI(Creature* creature) const override
void JustAppeared() override
{
return GetHyjalAI<boss_rage_winterchillAI>(creature);
Talk(SAY_INTRO);
me->GetMotionMaster()->MovePath(RAND(PATH_ALLY_INITIAL_1, PATH_ALLY_INITIAL_2, PATH_ALLY_INITIAL_3), false);
}
struct boss_rage_winterchillAI : public hyjal_trashAI
void JustEngagedWith(Unit* who) override
{
boss_rage_winterchillAI(Creature* creature) : hyjal_trashAI(creature)
BossAI::JustEngagedWith(who);
events.ScheduleEvent(EVENT_ICEBOLT, 4s, 10s);
events.ScheduleEvent(EVENT_FROST_NOVA, 20s, 25s);
events.ScheduleEvent(EVENT_FROST_ARMOR, 40s, 60s);
events.ScheduleEvent(EVENT_DEATH_AND_DECAY, 30s, 40s);
events.ScheduleEvent(EVENT_BERSERK, 10min);
}
void OnSpellCast(SpellInfo const* spellInfo) override
{
switch (spellInfo->Id)
{
Initialize();
instance = creature->GetInstanceScript();
go = false;
case SPELL_FROST_NOVA:
if (roll_chance(30))
Talk(SAY_NOVA);
break;
case SPELL_DEATH_AND_DECAY:
if (roll_chance(30))
Talk(SAY_DECAY);
break;
default:
break;
}
}
void Initialize()
void WaypointPathEnded(uint32 /*waypointId*/, uint32 pathId) override
{
switch (pathId)
{
damageTaken = 0;
FrostArmorTimer = 37000;
DecayTimer = 45000;
NovaTimer = 15000;
IceboltTimer = 10000;
case PATH_ALLY_INITIAL_1:
case PATH_ALLY_INITIAL_2:
case PATH_ALLY_INITIAL_3:
me->GetMotionMaster()->MovePath(RAND(PATH_ALLY_BASE_1, PATH_ALLY_BASE_2, PATH_ALLY_BASE_3), true);
break;
default:
break;
}
}
uint32 FrostArmorTimer;
uint32 DecayTimer;
uint32 NovaTimer;
uint32 IceboltTimer;
bool go;
// Do not reset SetActive, we want boss to be active all the time
void JustReachedHome() override { }
void Reset() override
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/) override
{
_JustDied();
Talk(SAY_DEATH);
}
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
Initialize();
if (IsEvent)
instance->SetBossState(DATA_RAGEWINTERCHILL, NOT_STARTED);
}
void JustEngagedWith(Unit* /*who*/) override
{
if (IsEvent)
instance->SetBossState(DATA_RAGEWINTERCHILL, IN_PROGRESS);
Talk(SAY_ONAGGRO);
}
void KilledUnit(Unit* /*victim*/) override
{
Talk(SAY_ONSLAY);
}
void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override
{
if (waypointId == 7 && instance)
switch (eventId)
{
Creature* target = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_JAINAPROUDMOORE));
if (target && target->IsAlive())
AddThreat(target, 0.0f);
}
}
void JustDied(Unit* killer) override
{
hyjal_trashAI::JustDied(killer);
if (IsEvent)
instance->SetBossState(DATA_RAGEWINTERCHILL, DONE);
Talk(SAY_ONDEATH);
}
void UpdateAI(uint32 diff) override
{
if (IsEvent)
{
//Must update EscortAI
EscortAI::UpdateAI(diff);
if (!go)
{
go = true;
LoadPath(PATH_ESCORT_RAGE_WINTERCHILL);
Start(false);
SetDespawnAtEnd(false);
}
case EVENT_ICEBOLT:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f, true))
DoCast(target, SPELL_ICEBOLT);
events.Repeat(6s, 8s);
break;
case EVENT_FROST_NOVA:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 45.0f))
DoCast(target, SPELL_FROST_NOVA);
events.Repeat(30s, 45s);
break;
case EVENT_FROST_ARMOR:
DoCastSelf(SPELL_FROST_ARMOR);
events.Repeat(40s, 60s);
break;
case EVENT_DEATH_AND_DECAY:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f))
DoCast(target, SPELL_DEATH_AND_DECAY);
events.Repeat(35s, 50s);
break;
case EVENT_BERSERK:
DoCastSelf(SPELL_BERSERK);
break;
default:
break;
}
//Return since we have no target
if (!UpdateVictim())
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
if (FrostArmorTimer <= diff)
{
DoCast(me, SPELL_FROST_ARMOR);
FrostArmorTimer = 40000 + rand32() % 20000;
} else FrostArmorTimer -= diff;
if (DecayTimer <= diff)
{
DoCastVictim(SPELL_DEATH_AND_DECAY);
DecayTimer = 60000 + rand32() % 20000;
Talk(SAY_DECAY);
} else DecayTimer -= diff;
if (NovaTimer <= diff)
{
DoCastVictim(SPELL_FROST_NOVA);
NovaTimer = 30000 + rand32() % 15000;
Talk(SAY_NOVA);
} else NovaTimer -= diff;
if (IceboltTimer <= diff)
{
DoCast(SelectTarget(SelectTargetMethod::Random, 0, 40, true), SPELL_ICEBOLT);
IceboltTimer = 11000 + rand32() % 20000;
} else IceboltTimer -= diff;
}
};
}
};
void AddSC_boss_rage_winterchill()
{
new boss_rage_winterchill();
RegisterHyjalCreatureAI(boss_rage_winterchill);
}
@@ -89,6 +89,28 @@ enum HYGameobjectIds
GO_ROARING_FLAME = 182592
};
enum HYPathIds
{
// For bosses and other
PATH_ALLY_INITIAL_1 = 53400,
PATH_ALLY_INITIAL_2 = 53401,
PATH_ALLY_INITIAL_3 = 53402,
PATH_ALLY_BASE_1 = 53403,
PATH_ALLY_BASE_2 = 53404,
PATH_ALLY_BASE_3 = 53405,
PATH_HORDE_INITIAL_1 = 53406,
PATH_HORDE_INITIAL_2 = 53407,
PATH_HORDE_INITIAL_3 = 53408,
PATH_HORDE_BASE_1 = 53409,
PATH_HORDE_BASE_2 = 53410,
PATH_HORDE_BASE_3 = 53411,
PATH_HORDE_BOSS = 53412
};
#define MINRAIDDAMAGE 700000 // minimal damage before trash can drop loot and reputation, resets if faction leader dies
template <class AI, class T>
@@ -97,4 +119,6 @@ inline AI* GetHyjalAI(T* obj)
return GetInstanceAI<AI>(obj, HyjalScriptName);
}
#define RegisterHyjalCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetHyjalAI)
#endif
@@ -520,10 +520,6 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
case FROST_WYRM:
case GIANT_INFERNAL:
case FEL_STALKER:
case RAGE_WINTERCHILL:
case ANETHERON:
case KAZROGAL:
case AZGALOR:
ENSURE_AI(hyjal_trashAI, creature->AI())->IsEvent = true;
break;
}
@@ -407,7 +407,7 @@ void hyjal_trashAI::JustDied(Unit* /*killer*/)
if (IsEvent && !me->isWorldBoss())
instance->SetData(DATA_TRASH, 0);//signal trash is dead
if ((instance->GetData(DATA_RAIDDAMAGE) < MINRAIDDAMAGE && !me->isWorldBoss()) || (damageTaken < me->GetMaxHealth()/4 && me->isWorldBoss()))
if (instance->GetData(DATA_RAIDDAMAGE) < MINRAIDDAMAGE && !me->isWorldBoss())
me->RemoveDynamicFlag(UNIT_DYNFLAG_LOOTABLE);//no loot
}