mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-07 15:28:02 +00:00
Merge branch 'azerothcore:master' into Playerbot
This commit is contained in:
42
data/sql/updates/db_world/2025_09_22_00.sql
Normal file
42
data/sql/updates/db_world/2025_09_22_00.sql
Normal file
@@ -0,0 +1,42 @@
|
||||
-- DB update 2025_09_20_06 -> 2025_09_22_00
|
||||
-- Savage Gladiator's Bonegrinder, Decapitator, Greatsword, Pike (+156 Attack Power)
|
||||
UPDATE `item_template` SET `stat_type4` = 38, `stat_value4` = 156 WHERE `entry` IN (42295, 42294, 42297, 42296);
|
||||
|
||||
-- Savage Gladiator's Left Render, Right Ripper, Shanker, Mutilator (+66 Attack Power)
|
||||
UPDATE `item_template` SET `stat_type4` = 38, `stat_value4` = 66 WHERE `entry` IN (42219, 42218, 42216, 42215);
|
||||
|
||||
-- Savage Gladiator's Heavy Crossbow, Longbow, Rifle (+48 Attack Power)
|
||||
UPDATE `item_template` SET `stat_type4` = 38, `stat_value4` = 48 WHERE `entry` IN (42446, 42445, 42447);
|
||||
|
||||
-- Savage Gladiator's Spellblade (+355 Spell Power)
|
||||
UPDATE `item_template` SET `stat_type5` = 45, `stat_value5` = 355 WHERE `entry` = 42343;
|
||||
|
||||
-- Savage Gladiator's Gavel (+355 Spell Power, +14 mp5)
|
||||
UPDATE `item_template` SET `stat_type4` = 45, `stat_value4` = 355, `stat_type5` = 43, `stat_value5` = 14 WHERE `entry` = 42344;
|
||||
|
||||
-- Savage Gladiator's Piercing Touch (+28 Spell Power, +20 Spell Pen, Fire damage)
|
||||
UPDATE `item_template` SET `dmg_min1` = 318, `dmg_max1` = 591, `delay` = 1900, `stat_type4` = 45, `stat_value4` = 28, `stat_type5` = 47, `stat_value5` = 20, `dmg_type1` = 2 WHERE `entry` = 42517;
|
||||
|
||||
-- Savage Gladiator's Touch of Defeat (+28 Spell Power, Fire damage)
|
||||
UPDATE `item_template` SET `dmg_min1` = 318, `dmg_max1` = 591, `delay` = 1900, `stat_type5` = 45, `stat_value5` = 28, `dmg_type1` = 2 WHERE `entry` = 42448;
|
||||
|
||||
-- Savage Gladiator's baton of light
|
||||
UPDATE `item_template` SET `dmg_min1` = 318, `dmg_max1` = 591, `delay` = 1900, `dmg_type1` = 2 WHERE `entry` = 42511;
|
||||
|
||||
-- Savage Gladiator's Barrier (+50 Spell Power)
|
||||
UPDATE `item_template` SET `stat_type5` = 45, `stat_value5` = 50 WHERE `entry` = 42557;
|
||||
|
||||
-- Savage Gladiator's Redoubt (+50 Spell Power, +15 mp5)
|
||||
UPDATE `item_template` SET `stat_type4` = 45, `stat_value4` = 50, `stat_type5` = 43, `stat_value5` = 15 WHERE `entry` = 42568;
|
||||
|
||||
-- Savage Gladiator's Libram of Justice (Missing Spell ID 60648)
|
||||
UPDATE `item_template` SET `spellid_1` = 60648, `spelltrigger_1` = 1 WHERE `entry` = 42612;
|
||||
|
||||
-- Savage Gladiator's Sigil of Strife (Missing Spell ID 60675)
|
||||
UPDATE `item_template` SET `spellid_1` = 60675, `spelltrigger_1` = 1 WHERE `entry` = 42618;
|
||||
|
||||
-- Hateful Gladiator's Baton of Light, Piercing Touch, Touch of Defeat (350–651 Fire damage, 1.90 speed, Fire school)
|
||||
UPDATE `item_template` SET `dmg_min1` = 350, `dmg_max1` = 651, `delay` = 1900, `dmg_type1` = 2 WHERE `entry` IN (42512, 42518, 42501);
|
||||
|
||||
-- Hateful Gladiator's Redoubt (+18 mp5)
|
||||
UPDATE `item_template` SET `stat_type5` = 43, `stat_value5` = 18 WHERE `entry` = 42569;
|
||||
146
data/sql/updates/db_world/2025_09_22_01.sql
Normal file
146
data/sql/updates/db_world/2025_09_22_01.sql
Normal file
@@ -0,0 +1,146 @@
|
||||
-- DB update 2025_09_22_00 -> 2025_09_22_01
|
||||
--
|
||||
-- -------------------------------------
|
||||
-- Mountain Gronns in Nagrand Entry: 19201
|
||||
-- -------------------------------------
|
||||
|
||||
-- The first two Gronn's are weird because they don't have a path back from their last waypoint.
|
||||
-- They do random movement for a few minutes and then they just walk straight through the mountains back to the starting point.
|
||||
-- Example:
|
||||
-- (@GUID,66,-1086.546,8910.48,102.3874,0,0,0,0,0,0,0,0,0,0,0,0,0),
|
||||
-- (@GUID,67,-1190.294,8772.655,44.03177,0,0,0,0,0,0,0,0,0,0,0,0,0),
|
||||
-- I assume that Blizzard's intention was that they should despawn after reaching the last waypoint, so that's what I did.
|
||||
|
||||
SET @WP_SCRIPT_GUID := 947;
|
||||
SET @SCRIPTID := 6873300;
|
||||
DELETE FROM `waypoint_scripts` WHERE `id` IN (@SCRIPTID+0);
|
||||
INSERT INTO `waypoint_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`, `guid`) VALUES
|
||||
(@SCRIPTID+0, 1, 35, 1, 8, 0, 0, 0, 0, 0, (@WP_SCRIPT_GUID := @WP_SCRIPT_GUID + 1)),
|
||||
(@SCRIPTID+0, 60, 18, 1000, 0, 0, 0, 0, 0, 0, (@WP_SCRIPT_GUID := @WP_SCRIPT_GUID + 1));
|
||||
|
||||
SET @CGUID := 68733;
|
||||
SET @PATH := @CGUID * 10;
|
||||
SET @POINT := 0;
|
||||
UPDATE `creature` SET `position_x`=-1190.294,`position_y`=8772.655,`position_z`=44.03177, `wander_distance`=0,`MovementType`=2 WHERE `guid`=@CGUID;
|
||||
DELETE FROM `creature_addon` WHERE `guid`=@CGUID;
|
||||
INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@CGUID,@PATH,0,0,1,0, '');
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`, `delay`, `action`) VALUES
|
||||
(@PATH, @POINT+00, -1190.294,8772.655,44.03177,0,0),
|
||||
(@PATH, @POINT+01, -1203.012,8742.168,42.7664, 0,0),
|
||||
(@PATH, @POINT+02, -1199.56,8724.674,41.17319, 0,0),
|
||||
(@PATH, @POINT+03, -1198.571,8721.961,40.50022,0,0),
|
||||
(@PATH, @POINT+04, -1145.681519,8681.539063,43.931034,0,0),
|
||||
(@PATH, @POINT+05, -1135.424,8685.5,48.49122,0,0),
|
||||
(@PATH, @POINT+06, -1106.267,8698.869,61.74326,0,0),
|
||||
(@PATH, @POINT+07, -1089.461,8709.732,68.98933,0,0),
|
||||
(@PATH, @POINT+08, -1080.214,8724.287,77.56756,0,0),
|
||||
(@PATH, @POINT+09, -1076.087,8730.615,80.32574,0,0),
|
||||
(@PATH, @POINT+10, -1073.906,8743.322,83.13339,0,0),
|
||||
(@PATH, @POINT+11, -1071.587,8769.987,88.95515,0,0),
|
||||
(@PATH, @POINT+12, -1069.364,8792.963,93.90515,0,0),
|
||||
(@PATH, @POINT+13, -1073.472,8810.984,98.12231,0,0),
|
||||
(@PATH, @POINT+14, -1081.081,8848.842,102.7461,0,0),
|
||||
(@PATH, @POINT+15, -1082.776,8856.875,102.9781,0,0),
|
||||
(@PATH, @POINT+16, -1086.328735,8893.722656,102.045715,0,0),
|
||||
(@PATH, @POINT+17, -1055.303467,8927.958984,100.954239,65000,@SCRIPTID);
|
||||
|
||||
SET @CGUID := 68734;
|
||||
SET @PATH := @CGUID * 10;
|
||||
SET @POINT := 1;
|
||||
UPDATE `creature` SET `position_x`=-984.8678,`position_y`=8734.932,`position_z`=132.8936, `wander_distance`=0,`MovementType`=2 WHERE `guid`=@CGUID;
|
||||
DELETE FROM `creature_addon` WHERE `guid`=@CGUID;
|
||||
INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@CGUID,@PATH,0,0,1,0, '');
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`, `delay`, `action`) VALUES
|
||||
(@PATH, @POINT+00, -984.8678,8734.932,132.8936,0,0),
|
||||
(@PATH, @POINT+01, -999.9858,8740.252,125.7903,0,0),
|
||||
(@PATH, @POINT+02, -1007.913,8747.668,121.9, 0,0),
|
||||
(@PATH, @POINT+03, -1018.669983,8761.624023,118.182793,0,0),
|
||||
(@PATH, @POINT+04, -1021.87,8774.891,117.6102 ,0,0),
|
||||
(@PATH, @POINT+05, -1028.338,8786.554,114.4703,0,0),
|
||||
(@PATH, @POINT+06, -1043.908,8807.875,110.2811,0,0),
|
||||
(@PATH, @POINT+07, -1056.555,8834.715,107.1923,0,0),
|
||||
(@PATH, @POINT+08, -1047.57,8848.311,116.0382 ,0,0),
|
||||
(@PATH, @POINT+09, -1033.689,8858.738,125.4172,0,0),
|
||||
(@PATH, @POINT+10, -1014.58,8869.018,133.7491 ,0,0),
|
||||
(@PATH, @POINT+11, -995.608,8868.662,139.3823 ,0,0),
|
||||
(@PATH, @POINT+12, -974.8796,8879.833,145.5816,0,0),
|
||||
(@PATH, @POINT+13, -940.694,8902.678,150.1837,0,0),
|
||||
(@PATH, @POINT+14, -924.4999,8913.035,151.7751,0,0),
|
||||
(@PATH, @POINT+15, -908.0786,8923.119,153.3695,0,0),
|
||||
(@PATH, @POINT+16, -886.0104,8933.393,155.4501,0,0),
|
||||
(@PATH, @POINT+17, -874.3984,8936.214,156.2588,0,0),
|
||||
(@PATH, @POINT+18, -855.9192,8931.477,158.7263,0,0),
|
||||
(@PATH, @POINT+19, -845.134521,8925.713867,161.844772,0,0),
|
||||
(@PATH, @POINT+20, -834.978149,8919.649414,165.966446,65000,@SCRIPTID);
|
||||
UPDATE `waypoint_data` SET `action_chance`=100 WHERE `action` IN (@SCRIPTID);
|
||||
|
||||
SET @CGUID := 68735;
|
||||
SET @PATH := @CGUID * 10;
|
||||
SET @POINT := 1;
|
||||
UPDATE `creature` SET `position_x`=-1800.628,`position_y`=8785.258,`position_z`=31.36622, `wander_distance`=0,`MovementType`=2 WHERE `guid`=@CGUID;
|
||||
DELETE FROM `creature_addon` WHERE `guid`=@CGUID;
|
||||
INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@CGUID,@PATH,0,0,1,0, '');
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`, `delay`) VALUES
|
||||
(@PATH, @POINT+00, -1800.628,8785.258,31.36622,0), -- 17:17:19
|
||||
(@PATH, @POINT+01, -1821.058,8778.673,30.80778,0), -- 17:17:24
|
||||
(@PATH, @POINT+02, -1848.456,8762.41,28.90891,0), -- 17:17:37
|
||||
(@PATH, @POINT+03, -1869.854,8754.341,26.27174,0), -- 17:17:46
|
||||
(@PATH, @POINT+04, -1904.505,8759.32,26.06429,0), -- 17:17:54
|
||||
(@PATH, @POINT+05, -1918.91,8769.67,26.86385,10000), -- 17:18:12
|
||||
(@PATH, @POINT+06, -1946.543091,8816.708984,28.342142,0), -- 17:20:29
|
||||
(@PATH, @POINT+07, -1981.723999,8863.507813,25.978216,0), -- 17:20:33
|
||||
(@PATH, @POINT+08, -2015.871,8875.336,30.86393,0), -- 17:20:36
|
||||
(@PATH, @POINT+09, -1997.016,8879.214,31.98178,0), -- 17:21:39
|
||||
(@PATH, @POINT+10, -1966.578,8847.789,26.00286,0), -- 17:21:52
|
||||
(@PATH, @POINT+11, -1946.478,8824.432,29.30156,0), -- 17:22:08
|
||||
(@PATH, @POINT+12, -1944.506,8822.006,29.37523,0), -- 17:22:22
|
||||
(@PATH, @POINT+13, -1925.181,8787.125,27.40347,0), -- 17:22:30
|
||||
(@PATH, @POINT+14, -1916.387,8762.832,26.09533,0), -- 17:22:42
|
||||
(@PATH, @POINT+15, -1874.201,8754.344,26.05693,0), -- 17:22:51
|
||||
(@PATH, @POINT+16, -1854.197,8759.664,28.04397,0), -- 17:23:09
|
||||
(@PATH, @POINT+17, -1840.163,8769.178,30.26139,0), -- 17:23:18
|
||||
(@PATH, @POINT+18, -1815.867,8780.174,31.31474,0), -- 17:23:26
|
||||
(@PATH, @POINT+19, -1791.843,8788.039,30.60195,0), -- 17:23:39
|
||||
(@PATH, @POINT+20, -1778.97,8792.19,28.33318,0), -- 17:23:44
|
||||
(@PATH, @POINT+21, -1785.26,8790.171,29.29748,0); -- 17:23:52
|
||||
-- 0x203AF4424012C04000004E0000273198 .go -1800.628 8785.258 31.36622
|
||||
|
||||
SET @CGUID := 68736;
|
||||
SET @PATH := @CGUID * 10;
|
||||
SET @POINT := 1;
|
||||
UPDATE `creature` SET `position_x`=-1882.313,`position_y`=8993.66,`position_z`=38.3989, `wander_distance`=0,`MovementType`=2 WHERE `guid`=@CGUID;
|
||||
DELETE FROM `creature_addon` WHERE `guid`=@CGUID;
|
||||
INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@CGUID,@PATH,0,0,1,0, '');
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`, `delay`) VALUES
|
||||
(@PATH, @POINT+00, -1882.313,8993.66,38.3989,0), -- 17:35:09
|
||||
(@PATH, @POINT+01, -1871.939,8953.98,41.94349,0), -- 17:35:23
|
||||
(@PATH, @POINT+02, -1836.418,8920.867,36.96106,0), -- 17:35:36
|
||||
(@PATH, @POINT+03, -1832.932,8918.501,36.04041,0), -- 17:35:54
|
||||
(@PATH, @POINT+04, -1782.748,8893.457,34.7769,0), -- 17:36:08
|
||||
(@PATH, @POINT+05, -1749.646,8880.189,32.58824,30000), -- 17:36:18
|
||||
(@PATH, @POINT+06, -1749.675,8880.189,32.43178,0), -- 17:39:58
|
||||
(@PATH, @POINT+07, -1716.815,8865.834,35.36955,0), -- 17:40:13
|
||||
(@PATH, @POINT+08, -1701.336,8863.66,33.39202,0), -- 17:40:26
|
||||
(@PATH, @POINT+09, -1663.693,8847.714,34.84836,0), -- 17:40:42
|
||||
(@PATH, @POINT+10, -1666.743,8834.359,36.58212,0), -- 17:40:52
|
||||
(@PATH, @POINT+11, -1692.787,8829.908,35.22899,0), -- 17:40:58
|
||||
(@PATH, @POINT+12, -1728.21,8834.949,35.92305,0), -- 17:41:09
|
||||
(@PATH, @POINT+13, -1763.568,8846.715,28.71403,0), -- 17:41:28
|
||||
(@PATH, @POINT+14, -1786.974,8851.196,30.74931,0), -- 17:41:39
|
||||
(@PATH, @POINT+15, -1804.311,8857.869,29.32577,0), -- 17:41:51
|
||||
(@PATH, @POINT+16, -1836.927,8878.327,34.59752,0), -- 17:42:01
|
||||
(@PATH, @POINT+17, -1857.11,8892.201,36.93163,0), -- 17:42:12
|
||||
(@PATH, @POINT+18, -1886.158,8898.459,37.84557,0), -- 17:42:24
|
||||
(@PATH, @POINT+19, -1902.083,8901.02,38.78384,0), -- 17:42:37
|
||||
(@PATH, @POINT+20, -1966.359,8933.63,38.7355,0), -- 17:42:54
|
||||
(@PATH, @POINT+21, -1976.945,8945.818,37.83896,0), -- 17:43:13
|
||||
(@PATH, @POINT+22, -1972.83,9000.511,41.57624,0), -- 17:43:20
|
||||
(@PATH, @POINT+23, -1955.283,9009.258,41.16612,0), -- 17:43:39
|
||||
(@PATH, @POINT+24, -1924.979,9016.831,40.69277,0), -- 17:43:48
|
||||
(@PATH, @POINT+25, -1917.55,9015.53,40.05937,0), -- 17:44:00
|
||||
(@PATH, @POINT+26, -1885.793,9012.721,41.2858,0); -- 17:44:11
|
||||
-- 0x203AF4424012C04000004E0000274379 .go -1882.313 8993.66 38.3989
|
||||
9
data/sql/updates/db_world/2025_09_22_02.sql
Normal file
9
data/sql/updates/db_world/2025_09_22_02.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- DB update 2025_09_22_01 -> 2025_09_22_02
|
||||
--
|
||||
DELETE FROM `waypoints` WHERE `entry`=317020;
|
||||
INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `point_comment`) VALUES
|
||||
(317020, 1, 7326.43, 1289.52, 611.652, NULL, 0, 'Frostbrood Spawn');
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 31702) AND (`source_type` = 0) AND (`id` IN (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`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(31702, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 53, 1, 317020, 0, 0, 0, 1, 8, 0, 0, 0, 0, 7326.43, 1289.52, 611.652, 0, 'Frostbrood Spawn - On Reached Point 1 - Start Waypoint Path 317020');
|
||||
18
data/sql/updates/db_world/2025_09_22_03.sql
Normal file
18
data/sql/updates/db_world/2025_09_22_03.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
-- DB update 2025_09_22_02 -> 2025_09_22_03
|
||||
--
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI', `RegenHealth` = 0 WHERE `entry` = 30035;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 30035) 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`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(30035, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 0, 142, 30, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Fallen Earthen Defender - On Reset - Set HP to 30%');
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID` = 30035;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(30035, 0, 0, 'Let me fight by your side.', 12, 0, 100, 0, 0, 30722, 0, 'Fallen Earthen Defender'),
|
||||
(30035, 0, 1, 'Let us fight the irons together!', 12, 0, 100, 0, 0, 30723, 0, 'Fallen Earthen Defender'),
|
||||
(30035, 0, 2, 'Thank you. I thought I was doomed.', 12, 0, 100, 0, 0, 30720, 0, 'Fallen Earthen Defender'),
|
||||
(30035, 0, 3, 'I was certain I was going to die out here.', 12, 0, 100, 0, 0, 30721, 0, 'Fallen Earthen Defender');
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_q12937_relief_for_the_fallen';
|
||||
INSERT INTO `spell_script_names` VALUES
|
||||
(59557, 'spell_q12937_relief_for_the_fallen');
|
||||
@@ -144,7 +144,7 @@ public:
|
||||
|
||||
void SummonInfernal()
|
||||
{
|
||||
Creature* infernal = me->SummonCreature(NPC_INFERNAL_ATTACKER, me->GetPositionX(), me->GetPositionY(), ground + 0.05f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
|
||||
Creature* infernal = me->SummonCreature(NPC_INFERNAL_ATTACKER, me->GetPositionX(), me->GetPositionY(), ground + 0.05f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
infernalGUID = infernal->GetGUID();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "GridNotifiers.h"
|
||||
#include "MapMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
@@ -1344,11 +1345,12 @@ enum Quest12937Data
|
||||
{
|
||||
SPELL_TRIGGER_AID_OF_THE_EARTHEN = 55809,
|
||||
NPC_FALLEN_EARTHEN_DEFENDER = 30035,
|
||||
TALK_FALLEN_EARTHEN_HEALED = 0
|
||||
};
|
||||
|
||||
class spell_q12937_relief_for_the_fallen : public SpellScript
|
||||
class spell_q12937_relief_for_the_fallen : public AuraScript
|
||||
{
|
||||
PrepareSpellScript(spell_q12937_relief_for_the_fallen);
|
||||
PrepareAuraScript(spell_q12937_relief_for_the_fallen);
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
@@ -1360,20 +1362,28 @@ class spell_q12937_relief_for_the_fallen : public SpellScript
|
||||
return ValidateSpellInfo({ SPELL_TRIGGER_AID_OF_THE_EARTHEN });
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Player* caster = GetCaster()->ToPlayer();
|
||||
if (Creature* target = GetHitCreature())
|
||||
Unit* target = GetUnitOwner();
|
||||
if (target && target->ToCreature())
|
||||
{
|
||||
caster->CastSpell(caster, SPELL_TRIGGER_AID_OF_THE_EARTHEN, true, nullptr);
|
||||
caster->KilledMonsterCredit(NPC_FALLEN_EARTHEN_DEFENDER);
|
||||
target->DespawnOrUnsummon();
|
||||
target->ToCreature()->DespawnOrUnsummon(5000);
|
||||
target->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
target->ToCreature()->AI()->Talk(TALK_FALLEN_EARTHEN_HEALED);
|
||||
|
||||
ObjectGuid casterGUID = caster->GetGUID();
|
||||
caster->m_Events.AddEventAtOffset([casterGUID]{
|
||||
if (Player* caster = ObjectAccessor::FindPlayer(casterGUID))
|
||||
caster->CastSpell(caster, SPELL_TRIGGER_AID_OF_THE_EARTHEN, true);
|
||||
}, 5s);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_q12937_relief_for_the_fallen::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_q12937_relief_for_the_fallen::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user