mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-11-10 12:24:22 +08:00
Compare commits
50 Commits
bda81b076c
...
c48ca4ca05
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c48ca4ca05 | ||
|
|
93c40437ba | ||
|
|
dab83dd19e | ||
|
|
af779202e6 | ||
|
|
09e0343491 | ||
|
|
433be02111 | ||
|
|
494326656d | ||
|
|
6b66ae22e3 | ||
|
|
fb96e65696 | ||
|
|
dea8cd64df | ||
|
|
7ac7228315 | ||
|
|
24ca7efb73 | ||
|
|
0bdf7a6b0f | ||
|
|
639ee028fd | ||
|
|
6ef3383b12 | ||
|
|
2fe3b8ea61 | ||
|
|
bc755bf275 | ||
|
|
2619f4e61d | ||
|
|
8606ff060a | ||
|
|
c1e5c8aacf | ||
|
|
0b6bd03baa | ||
|
|
9d1143f47c | ||
|
|
d747c9c67a | ||
|
|
9dbaf9e03e | ||
|
|
61cf90618a | ||
|
|
fac356ba79 | ||
|
|
af98fcd476 | ||
|
|
37e8e2102f | ||
|
|
28c368c7b2 | ||
|
|
2060c4cc87 | ||
|
|
f49c8550bd | ||
|
|
a71cb0581d | ||
|
|
123f74b6ea | ||
|
|
48118b764f | ||
|
|
88b46fbf37 | ||
|
|
8d13542d6a | ||
|
|
64f45f3f1d | ||
|
|
ffeb7daf5c | ||
|
|
3b25987ab1 | ||
|
|
e5968c1f28 | ||
|
|
6eb1b565d4 | ||
|
|
7a3a8c2c2f | ||
|
|
0100cb47be | ||
|
|
319d3ad8ed | ||
|
|
bd8eaafe30 | ||
|
|
65ee429b83 | ||
|
|
417da2ecbc | ||
|
|
aad8bde477 | ||
|
|
f91c93bc2f | ||
|
|
79a05f7024 |
2
data/sql/updates/db_world/2025_11_06_01.sql
Normal file
2
data/sql/updates/db_world/2025_11_06_01.sql
Normal file
@ -0,0 +1,2 @@
|
||||
-- DB update 2025_11_06_00 -> 2025_11_06_01
|
||||
DELETE FROM `vehicle_template_accessory` WHERE `entry` = 24083;
|
||||
3
data/sql/updates/db_world/2025_11_07_00.sql
Normal file
3
data/sql/updates/db_world/2025_11_07_00.sql
Normal file
@ -0,0 +1,3 @@
|
||||
-- DB update 2025_11_06_01 -> 2025_11_07_00
|
||||
--
|
||||
DELETE FROM `creature` WHERE `guid` = 3564 AND `id1` = 1135;
|
||||
43
data/sql/updates/db_world/2025_11_07_01.sql
Normal file
43
data/sql/updates/db_world/2025_11_07_01.sql
Normal file
@ -0,0 +1,43 @@
|
||||
-- DB update 2025_11_07_00 -> 2025_11_07_01
|
||||
--
|
||||
-- v11_2_5_63906
|
||||
SET @VBUILD := 63906;
|
||||
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28932;
|
||||
UPDATE `creature_template_addon` SET `bytes2` = 1 WHERE (`entry` = 28932);
|
||||
|
||||
DELETE FROM `creature` WHERE (`id1` = 28932) AND `guid` IN (96663, 96664, 96671, 96798, 96800, 96865, 96870, 96871);
|
||||
INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `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`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES
|
||||
(96663, 28932, 0, 0, 571, 0, 0, 1, 1, 0, 6146.6094, -1971.1476, 481.92764, 5.305801, 300, 5, 0, 4979, 0, 1, 0, 0, 0, '', @VBUILD, 0, NULL),
|
||||
(96664, 28932, 0, 0, 571, 0, 0, 1, 1, 0, 6143.005, -1973.7048, 482.06653, 4.520403, 300, 5, 0, 4979, 0, 1, 0, 0, 0, '', @VBUILD, 0, NULL),
|
||||
(96671, 28932, 0, 0, 571, 0, 0, 1, 1, 0, 6218.721, -1985.6326, 482.0804, 4.3982296, 300, 5, 0, 4979, 0, 1, 0, 0, 0, '', @VBUILD, 0, NULL),
|
||||
(96798, 28932, 0, 0, 571, 0, 0, 1, 1, 0, 6221.371, -1989.2194, 482.06653, 1.5009831, 300, 5, 0, 4979, 0, 1, 0, 0, 0, '', @VBUILD, 0, NULL),
|
||||
(96800, 28932, 0, 0, 571, 0, 0, 1, 1, 0, 6128.758, -2046.2726, 482.0735, 2.7052603, 300, 5, 0, 4979, 0, 1, 0, 0, 0, '', @VBUILD, 0, NULL),
|
||||
(96865, 28932, 0, 0, 571, 0, 0, 1, 1, 0, 6131.65, -2049.7249, 482.03876, 0.6806784, 300, 5, 0, 4979, 0, 1, 0, 0, 0, '', @VBUILD, 0, NULL),
|
||||
(96870, 28932, 0, 0, 571, 0, 0, 1, 1, 0, 6203.877, -2064.1401, 482.06653, 0.06981317, 300, 5, 0, 4979, 0, 1, 0, 0, 0, '', @VBUILD, 0, NULL),
|
||||
(96871, 28932, 0, 0, 571, 0, 0, 1, 1, 0, 6207.528, -2061.5386, 482.02487, 4.08407, 300, 5, 0, 4979, 0, 1, 0, 0, 0, '', @VBUILD, 0, NULL);
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (-96663, -96798, -96800, -96870, -96664, -96671, -96865, -96871)) 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
|
||||
(-96663, 0, 0, 0, 60, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52686, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Effect Bunny - On Update - Cast \'Voltarus Blight Beam LH\''),
|
||||
(-96798, 0, 0, 0, 60, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52686, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Effect Bunny - On Update - Cast \'Voltarus Blight Beam LH\''),
|
||||
(-96800, 0, 0, 0, 60, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52686, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Effect Bunny - On Update - Cast \'Voltarus Blight Beam LH\''),
|
||||
(-96870, 0, 0, 0, 60, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52686, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Effect Bunny - On Update - Cast \'Voltarus Blight Beam LH\''),
|
||||
(-96664, 0, 0, 0, 60, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52681, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Effect Bunny - On Update - Cast \'Voltarus Blight Beam RH\''),
|
||||
(-96671, 0, 0, 0, 60, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52681, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Effect Bunny - On Update - Cast \'Voltarus Blight Beam RH\''),
|
||||
(-96865, 0, 0, 0, 60, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52681, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Effect Bunny - On Update - Cast \'Voltarus Blight Beam RH\''),
|
||||
(-96871, 0, 0, 0, 60, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52681, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blight Effect Bunny - On Update - Cast \'Voltarus Blight Beam RH\'');
|
||||
|
||||
-- Set `unitflag` to IMMUNE_TO_PC, verify spawns, add missing spawn
|
||||
DELETE FROM `creature` WHERE (`id1` = 28931) and `guid` IN (96497, 96498, 96499, 96545);
|
||||
INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `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`, `ScriptName`, `Comment`, `VerifiedBuild`) VALUES
|
||||
(96497, 28931, 0, 0, 571, 0, 0, 1, 1, 0, 6144.44, -1971.41, 461.385, 5.16617, 300, 0, 0, 200000, 0, 0, 0, 256, 0, '', NULL, @VBUILD),
|
||||
(96498, 28931, 0, 0, 571, 0, 0, 1, 1, 0, 6206.33, -2063.48, 461.385, 2.14675, 300, 0, 0, 200000, 0, 0, 0, 256, 0, '', NULL, @VBUILD),
|
||||
(96499, 28931, 0, 0, 571, 0, 0, 1, 1, 0, 6129.33, -2047.82, 461.385, 0.506145, 300, 0, 0, 200000, 0, 0, 0, 256, 0, '', NULL, @VBUILD),
|
||||
(96545, 28931, 0, 0, 571, 0, 0, 1, 1, 0, 6221.2, -1986.5, 461.385, 3.78736, 300, 0, 0, 200000, 0, 0, 0, 256, 0, '', NULL, @VBUILD);
|
||||
|
||||
-- Voltarus Blight Beam LH, RH
|
||||
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` IN (52686, 52681)) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 28931) AND (`ConditionValue3` = 0);
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(13, 1, 52686, 0, 0, 31, 0, 3, 28931, 0, 0, 0, 0, '', 'target Blightblood Troll'),
|
||||
(13, 1, 52681, 0, 0, 31, 0, 3, 28931, 0, 0, 0, 0, '', 'target Blightblood Troll');
|
||||
108
data/sql/updates/db_world/2025_11_07_02.sql
Normal file
108
data/sql/updates/db_world/2025_11_07_02.sql
Normal file
@ -0,0 +1,108 @@
|
||||
-- DB update 2025_11_07_01 -> 2025_11_07_02
|
||||
|
||||
-- Add Waypoints (Scarlet Miner)
|
||||
DELETE FROM `waypoint_data` WHERE (`id` IN (2884100, 2884101));
|
||||
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
|
||||
(2884100, 1, 2376.9087, -5906.2495, 108.593, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 2, 2340.1587, -5903.4995, 102.593, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 3, 2306.4087, -5904.7495, 90.593, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 4, 2292.6587, -5917.4995, 82.343, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 5, 2285.6587, -5943.4995, 64.093, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 6, 2271.9087, -5968.4995, 49.843, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 7, 2248.1587, -5978.4995, 36.843, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 8, 2234.6587, -5996.9995, 25.842999, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 9, 2223.4087, -6014.9995, 11.5929985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 10, 2216.1587, -6035.9995, 7.3429985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 11, 2195.4087, -6061.2495, 6.3429985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 12, 2184.4087, -6091.9995, 2.0929985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 13, 2179.6587, -6120.2495, 1.5929985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 14, 2175.4087, -6142.9995, 1.5929985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 15, 2167.9087, -6159.4995, 1.8429985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 16, 2149.4087, -6161.4995, 1.5929985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 17, 2134.9087, -6166.2495, 0.8429985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 18, 2130.9087, -6173.2495, 4.3429985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 19, 2125.9087, -6180.7495, 10.0929985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 20, 2123.4087, -6184.7495, 14.0929985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 21, 2115.9087, -6196.2495, 13.8429985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 22, 2119.1106, -6191.905, 13.275559, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 1, 2376.855, -5906.1553, 108.57493, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 2, 2340.105, -5903.4053, 102.57493, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 3, 2306.855, -5904.9053, 90.57493, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 4, 2292.855, -5917.6553, 82.32493, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 5, 2285.855, -5943.4053, 64.07493, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 6, 2272.105, -5968.4053, 49.82493, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 7, 2248.355, -5978.4053, 36.82493, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 8, 2234.605, -5996.9053, 25.824928, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 9, 2223.605, -6015.1553, 11.574928, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 10, 2216.105, -6035.9053, 7.3249283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 11, 2195.105, -6059.4053, 6.3249283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 12, 2184.855, -6087.1553, 3.0749283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 13, 2180.605, -6119.4053, 1.5749283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 14, 2177.605, -6149.4053, 1.8249283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 15, 2188.855, -6170.4053, 1.3249283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 16, 2213.105, -6165.4053, 1.0749283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 17, 2241.855, -6160.4053, 2.0749283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 18, 2269.105, -6163.4053, 2.3249283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 19, 2269.605, -6168.9053, 2.3249283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 20, 2270.105, -6174.6553, 5.8249283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 21, 2270.605, -6180.9053, 9.824928, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 22, 2271.105, -6186.1553, 14.074928, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 23, 2273.855, -6196.4053, 13.824928, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 24, 2273.0032, -6191.717, 13.239414, NULL, 0, 1, 0, 100, 0);
|
||||
|
||||
-- Remove Script Names.
|
||||
UPDATE `creature_template` SET `ScriptName` = '' WHERE (`entry` IN (28817, 28833, 28841));
|
||||
UPDATE `gameobject_template` SET `ScriptName` = '' WHERE (`entry` = 190767);
|
||||
|
||||
-- Set spell target position for Mine Car spawn.
|
||||
UPDATE `spell_target_position` SET `PositionX` = 2389.58, `PositionY` = -5901.18, `PositionZ` = 109.02134, `Orientation` = 0 WHERE `ID` = 52462;
|
||||
|
||||
-- Set Unit Flag for Mine Car (immune_to_npc)
|
||||
UPDATE `creature_template` SET `unit_flags` = `unit_flags` |512 WHERE (`entry` = 28817);
|
||||
|
||||
-- Set SmartAI (Mine Car)
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28817;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28817);
|
||||
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
|
||||
(28817, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 3, 0, 25703, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Mine Car - On Just Summoned - Morph To Model 25703'),
|
||||
(28817, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 28841, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 2382.171, -5899.672, 107.74545, 0, 'Mine Car - On Just Summoned - Summon Creature \'Scarlet Miner\''),
|
||||
(28817, 0, 2, 0, 8, 0, 100, 0, 52465, 0, 0, 0, 0, 0, 29, 3, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Mine Car - On Spellhit \'Drag Mine Cart\' - Start Follow Invoker');
|
||||
|
||||
-- Set SmartAI (Scarlet Miner)
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28841;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28841);
|
||||
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
|
||||
(28841, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2884100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - On Just Summoned - Run Script'),
|
||||
(28841, 0, 1, 0, 109, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2884101, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - On Path 0 Finished - Run Script');
|
||||
|
||||
-- Set Scarlet Miner Action List
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 9) AND (`entryorguid` IN (2884100, 2884101));
|
||||
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
|
||||
(2884100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Set Run Off'),
|
||||
(2884100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 1, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Move To Owner Or Summoner'),
|
||||
(2884100, 9, 2, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Say Line 0'),
|
||||
(2884100, 9, 3, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 11, 52465, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Cast \'Drag Mine Cart\''),
|
||||
(2884100, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Set Run On'),
|
||||
(2884100, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 233, 2884100, 2884101, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Start Random Path 2884100-2884101'),
|
||||
(2884101, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Set Orientation Owner Or Summoner'),
|
||||
(2884101, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Say Line 1'),
|
||||
(2884101, 9, 2, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 28, 52465, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Remove Aura \'Drag Mine Cart\''),
|
||||
(2884101, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Despawn Instant'),
|
||||
(2884101, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Despawn Instant');
|
||||
|
||||
-- Set SmartAI (Scarlet Fleet Defender)
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28834;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28834);
|
||||
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
|
||||
(28834, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Fleet Defender - On Just Died - Despawn In 3000 ms'),
|
||||
(28834, 0, 1, 0, 0, 0, 100, 0, 1000, 5000, 5000, 8000, 0, 0, 11, 52566, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Fleet Defender - In Combat - Cast \'Shoot\'');
|
||||
|
||||
-- Update SmartAI (Scarlet Cannon)
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28850;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28850) AND (`source_type` = 0) AND (`id` IN (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`, `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
|
||||
(28850, 0, 2, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Land Cannon - On Just Died - Despawn In 3000 ms');
|
||||
2481
data/sql/updates/db_world/2025_11_08_00.sql
Normal file
2481
data/sql/updates/db_world/2025_11_08_00.sql
Normal file
File diff suppressed because it is too large
Load Diff
51
src/common/Utilities/Systemd.cpp
Normal file
51
src/common/Utilities/Systemd.cpp
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#if defined(__linux__)
|
||||
#include "Log.h"
|
||||
#include "StringConvert.h"
|
||||
#include <cstdlib>
|
||||
#include <unistd.h>
|
||||
#include <string>
|
||||
|
||||
int get_listen_fd()
|
||||
{
|
||||
char* const listen_pid = std::getenv("LISTEN_PID");
|
||||
char* const listen_fds = std::getenv("LISTEN_FDS");
|
||||
if (!listen_pid || !listen_fds)
|
||||
return 0;
|
||||
|
||||
pid_t pid = Acore::StringTo<int>(listen_pid).value_or(0);
|
||||
if (pid != getpid())
|
||||
return 0;
|
||||
|
||||
int fds = Acore::StringTo<int>(listen_fds).value_or(0);
|
||||
if (fds <= 0)
|
||||
return 0;
|
||||
|
||||
if (fds > 1)
|
||||
LOG_WARN("network", "Multiple file descriptors received from systemd socket activation, only the first will be used");
|
||||
|
||||
return 3;
|
||||
}
|
||||
#else
|
||||
// On non-Linux systems, just return 0 (no socket activation)
|
||||
int get_listen_fd()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
23
src/common/Utilities/Systemd.h
Normal file
23
src/common/Utilities/Systemd.h
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#ifndef _SYSTEMD_H_
|
||||
#define _SYSTEMD_H_
|
||||
|
||||
int get_listen_fd();
|
||||
|
||||
#endif
|
||||
@ -48,6 +48,7 @@
|
||||
#include "SecretMgr.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "SteadyTimer.h"
|
||||
#include "Systemd.h"
|
||||
#include "World.h"
|
||||
#include "WorldSessionMgr.h"
|
||||
#include "WorldSocket.h"
|
||||
@ -406,7 +407,8 @@ int main(int argc, char** argv)
|
||||
sScriptMgr->OnShutdown();
|
||||
|
||||
// set server offline
|
||||
LoginDatabase.DirectExecute("UPDATE realmlist SET flag = flag | {} WHERE id = '{}'", REALM_FLAG_OFFLINE, realm.Id.Realm);
|
||||
if (!sConfigMgr->GetOption<bool>("Network.UseSocketActivation", false))
|
||||
LoginDatabase.DirectExecute("UPDATE realmlist SET flag = flag | {} WHERE id = '{}'", REALM_FLAG_OFFLINE, realm.Id.Realm);
|
||||
|
||||
LOG_INFO("server.worldserver", "Halting process...");
|
||||
|
||||
|
||||
@ -397,6 +397,20 @@ Network.TcpNodelay = 1
|
||||
|
||||
Network.EnableProxyProtocol = 0
|
||||
|
||||
#
|
||||
# Network.UseSocketActivation
|
||||
# Description: Enable systemd socket activation support for the worldserver.
|
||||
# When enabled and the process is started by systemd socket activation,
|
||||
# the server will use the socket passed by systemd instead of
|
||||
# creating and binding its own listening socket. Disabled by default.
|
||||
#
|
||||
# When enabled the realm is not automatically set as offline on shutdown.
|
||||
#
|
||||
# Example: 1 - (Enabled)
|
||||
# Default: 0 - (Disabled)
|
||||
|
||||
Network.UseSocketActivation = 0
|
||||
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
|
||||
@ -1848,8 +1848,13 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16& dest, Item* pItem, bool
|
||||
return EQUIP_ERR_NOT_DURING_ARENA_MATCH;
|
||||
}
|
||||
|
||||
if (IsInCombat() && (pProto->Class == ITEM_CLASS_WEAPON || pProto->InventoryType == INVTYPE_RELIC) && m_weaponChangeTimer != 0)
|
||||
return EQUIP_ERR_CANT_DO_RIGHT_NOW; // maybe exist better err
|
||||
if (IsInCombat() && (pProto->Class == ITEM_CLASS_WEAPON || pProto->InventoryType == INVTYPE_RELIC))
|
||||
{
|
||||
uint32 cooldownSpell = IsClass(CLASS_ROGUE, CLASS_CONTEXT_WEAPON_SWAP) ? 6123 : 6119;
|
||||
uint32 startRecoveryTime = sSpellMgr->GetSpellInfo(cooldownSpell)->StartRecoveryTime;
|
||||
if (m_weaponChangeTimer != 0 && m_weaponChangeTimer != startRecoveryTime)
|
||||
return EQUIP_ERR_CANT_DO_RIGHT_NOW; // maybe exist better err
|
||||
}
|
||||
|
||||
if (IsNonMeleeSpellCast(false))
|
||||
return EQUIP_ERR_CANT_DO_RIGHT_NOW;
|
||||
|
||||
@ -1170,6 +1170,12 @@ void WorldSession::HandlePlayerLoginToCharInWorld(Player* pCurrChar)
|
||||
pCurrChar->RemoveUnitFlag(UNIT_FLAG_STUNNED);
|
||||
}
|
||||
|
||||
if (pCurrChar->GetPendingFlightChange() <= pCurrChar->GetMapChangeOrderCounter())
|
||||
{
|
||||
if (!pCurrChar->HasIncreaseMountedFlightSpeedAura() && !pCurrChar->HasFlyAura())
|
||||
pCurrChar->m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_CAN_FLY);
|
||||
}
|
||||
|
||||
pCurrChar->SendInitialPacketsBeforeAddToMap();
|
||||
|
||||
// necessary actions from AddPlayerToMap:
|
||||
|
||||
@ -84,14 +84,9 @@ uint32 Acore::XP::Gain(Player* player, Unit* unit, bool isBattleGround /*= false
|
||||
if (gain && creature)
|
||||
{
|
||||
if (creature->isElite())
|
||||
{
|
||||
// Elites in instances have a 2.75x XP bonus instead of the regular 2x world bonus.
|
||||
if (unit->GetMap() && unit->GetMap()->IsDungeon())
|
||||
xpMod *= 2.75f;
|
||||
else
|
||||
xpMod *= 2.0f;
|
||||
}
|
||||
xpMod *= 2.0f;
|
||||
|
||||
// Instanced mobs (particularly bosses) oftentimes have higher bonuses, especially in later content levels
|
||||
xpMod *= creature->GetCreatureTemplate()->ModExperience;
|
||||
}
|
||||
|
||||
|
||||
@ -502,49 +502,6 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
class npc_scarlet_cannon : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_scarlet_cannon() : CreatureScript("npc_scarlet_cannon") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_scarlet_cannonAI(creature);
|
||||
}
|
||||
|
||||
struct npc_scarlet_cannonAI : public VehicleAI
|
||||
{
|
||||
npc_scarlet_cannonAI(Creature* creature) : VehicleAI(creature) { summonAttackers = 0; }
|
||||
|
||||
uint32 summonAttackers;
|
||||
void PassengerBoarded(Unit* /*passenger*/, int8 /*seatId*/, bool apply) override
|
||||
{
|
||||
summonAttackers = apply ? 8000 : 0;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
VehicleAI::UpdateAI(diff);
|
||||
|
||||
if (summonAttackers)
|
||||
{
|
||||
summonAttackers += diff;
|
||||
if (summonAttackers >= 15000)
|
||||
{
|
||||
for (uint8 i = 0; i < 15; ++i)
|
||||
if (Creature* summon = me->SummonCreature(28834 /*NPC_SCARLET_FLEET_DEFENDER*/, 2192.56f + irand(-10, 10), -6147.90f + irand(-10, 10), 5.2f, 4.7f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 45000))
|
||||
{
|
||||
summon->SetHomePosition(me->GetHomePosition());
|
||||
summon->AI()->AttackStart(me);
|
||||
}
|
||||
|
||||
summonAttackers = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/*######
|
||||
##Quest 12848
|
||||
######*/
|
||||
@ -835,253 +792,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/*####
|
||||
## npc_scarlet_miner_cart
|
||||
####*/
|
||||
|
||||
enum Spells_SM
|
||||
{
|
||||
SPELL_CART_CHECK = 54173,
|
||||
SPELL_CART_DRAG = 52465
|
||||
};
|
||||
|
||||
class npc_scarlet_miner_cart : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_scarlet_miner_cart() : CreatureScript("npc_scarlet_miner_cart") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_scarlet_miner_cartAI(creature);
|
||||
}
|
||||
|
||||
struct npc_scarlet_miner_cartAI : public PassiveAI
|
||||
{
|
||||
npc_scarlet_miner_cartAI(Creature* creature) : PassiveAI(creature)
|
||||
{
|
||||
me->SetImmuneToAll(true);
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
me->SetDisplayFromModel(0); // Modelid2 is a horse.
|
||||
}
|
||||
|
||||
ObjectGuid minerGUID;
|
||||
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
|
||||
{
|
||||
minerGUID = guid;
|
||||
}
|
||||
|
||||
void DoAction(int32 /*param*/) override
|
||||
{
|
||||
if (Creature* miner = ObjectAccessor::GetCreature(*me, minerGUID))
|
||||
{
|
||||
me->SetWalk(false);
|
||||
|
||||
//Not 100% correct, but movement is smooth. Sometimes miner walks faster
|
||||
//than normal, this speed is fast enough to keep up at those times.
|
||||
me->SetSpeed(MOVE_RUN, 1.25f);
|
||||
|
||||
me->GetMotionMaster()->MoveFollow(miner, 1.0f, 0);
|
||||
me->ReplaceAllUnitFlags(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetImmuneToAll(true);
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
}
|
||||
}
|
||||
|
||||
void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply) override
|
||||
{
|
||||
who->SetVisible(!apply);
|
||||
if (!apply)
|
||||
if (Creature* miner = ObjectAccessor::GetCreature(*me, minerGUID))
|
||||
miner->DisappearAndDie();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/*####
|
||||
## npc_scarlet_miner
|
||||
####*/
|
||||
|
||||
enum Says_SM
|
||||
{
|
||||
SAY_SCARLET_MINER_0 = 0,
|
||||
SAY_SCARLET_MINER_1 = 1
|
||||
};
|
||||
|
||||
class npc_scarlet_miner : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_scarlet_miner() : CreatureScript("npc_scarlet_miner") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_scarlet_minerAI(creature);
|
||||
}
|
||||
|
||||
struct npc_scarlet_minerAI : public npc_escortAI
|
||||
{
|
||||
npc_scarlet_minerAI(Creature* creature) : npc_escortAI(creature)
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
uint32 IntroTimer;
|
||||
uint32 IntroPhase;
|
||||
ObjectGuid carGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
carGUID.Clear();
|
||||
IntroTimer = 0;
|
||||
IntroPhase = 0;
|
||||
}
|
||||
|
||||
void InitWaypoint()
|
||||
{
|
||||
AddWaypoint(1, 2389.03f, -5902.74f, 109.014f, 5000);
|
||||
AddWaypoint(2, 2341.812012f, -5900.484863f, 102.619743f);
|
||||
AddWaypoint(3, 2308.34f, -5904.2f, 91.1099f);
|
||||
AddWaypoint(4, 2300.69f, -5912.99f, 86.1572f);
|
||||
AddWaypoint(5, 2294.142090f, -5927.274414f, 75.316849f);
|
||||
AddWaypoint(6, 2286.984375f, -5944.955566f, 63.714966f);
|
||||
AddWaypoint(7, 2280.001709f, -5961.186035f, 54.228283f);
|
||||
AddWaypoint(8, 2259.389648f, -5974.197754f, 42.359348f);
|
||||
AddWaypoint(9, 2242.882812f, -5984.642578f, 32.827850f);
|
||||
AddWaypoint(10, 2239.79f, -5989.31f, 30.4453f);
|
||||
AddWaypoint(11, 2236.52f, -5994.28f, 27.4829f);
|
||||
AddWaypoint(12, 2232.61f, -6000.23f, 23.1281f);
|
||||
AddWaypoint(13, 2228.69f, -6006.46f, 17.6638f);
|
||||
AddWaypoint(14, 2225.2f, -6012.39f, 12.9487f);
|
||||
AddWaypoint(15, 2217.265625f, -6028.959473f, 7.675705f);
|
||||
AddWaypoint(16, 2202.595947f, -6061.325684f, 5.882018f);
|
||||
AddWaypoint(17, 2188.974609f, -6080.866699f, 3.370027f);
|
||||
|
||||
if (urand(0, 1))
|
||||
{
|
||||
AddWaypoint(18, 2176.483887f, -6110.407227f, 1.855181f);
|
||||
AddWaypoint(19, 2172.516602f, -6146.752441f, 1.074235f);
|
||||
AddWaypoint(20, 2138.918457f, -6158.920898f, 1.342926f);
|
||||
AddWaypoint(21, 2129.866699f, -6174.107910f, 4.380779f);
|
||||
AddWaypoint(22, 2125.250001f, -6181.230001f, 9.91997f);
|
||||
AddWaypoint(23, 2117.709473f, -6193.830078f, 13.3542f, 10000);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddWaypoint(18, 2184.190186f, -6166.447266f, 0.968877f);
|
||||
AddWaypoint(19, 2234.265625f, -6163.741211f, 0.916021f);
|
||||
AddWaypoint(20, 2268.071777f, -6158.750977f, 1.822252f);
|
||||
AddWaypoint(21, 2270.028320f, -6176.505859f, 6.340538f);
|
||||
AddWaypoint(22, 2270.350001f, -6182.410001f, 10.42431f);
|
||||
AddWaypoint(23, 2271.739014f, -6195.401855f, 13.3542f, 10000);
|
||||
}
|
||||
}
|
||||
|
||||
void InitCartQuest(Player* who)
|
||||
{
|
||||
carGUID = who->GetVehicleBase()->GetGUID();
|
||||
InitWaypoint();
|
||||
me->SetWalk(true);
|
||||
Start(false, who->GetGUID());
|
||||
SetDespawnAtFar(false);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 waypointId) override
|
||||
{
|
||||
switch (waypointId)
|
||||
{
|
||||
case 1:
|
||||
if (Unit* car = ObjectAccessor::GetCreature(*me, carGUID))
|
||||
{
|
||||
me->SetFacingToObject(car);
|
||||
// xinef: add some flags
|
||||
car->ReplaceAllUnitFlags(UNIT_FLAG_NON_ATTACKABLE);
|
||||
car->SetImmuneToAll(true);
|
||||
car->SetFaction(FACTION_FRIENDLY);
|
||||
}
|
||||
Talk(SAY_SCARLET_MINER_0);
|
||||
me->SetWalk(false);
|
||||
IntroTimer = 4000;
|
||||
IntroPhase = 1;
|
||||
break;
|
||||
case 23:
|
||||
if (Creature* car = ObjectAccessor::GetCreature(*me, carGUID))
|
||||
{
|
||||
car->SetPosition(car->GetPositionX(), car->GetPositionY(), me->GetPositionZ() + 1, car->GetOrientation());
|
||||
car->StopMovingOnCurrentPos();
|
||||
me->SetFacingToObject(car);
|
||||
car->RemoveAura(SPELL_CART_DRAG);
|
||||
}
|
||||
Talk(SAY_SCARLET_MINER_1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (IntroPhase)
|
||||
{
|
||||
if (IntroTimer <= diff)
|
||||
{
|
||||
if (IntroPhase == 1)
|
||||
{
|
||||
if (Creature* car = ObjectAccessor::GetCreature(*me, carGUID))
|
||||
DoCast(car, SPELL_CART_DRAG);
|
||||
IntroTimer = 800;
|
||||
IntroPhase = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Creature* car = ObjectAccessor::GetCreature(*me, carGUID))
|
||||
car->AI()->DoAction(0);
|
||||
IntroPhase = 0;
|
||||
}
|
||||
}
|
||||
else IntroTimer -= diff;
|
||||
}
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/*######
|
||||
## go_inconspicuous_mine_car
|
||||
######*/
|
||||
|
||||
enum Spells_Cart
|
||||
{
|
||||
SPELL_CART_SUMM = 52463
|
||||
};
|
||||
|
||||
class go_inconspicuous_mine_car : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_inconspicuous_mine_car() : GameObjectScript("go_inconspicuous_mine_car") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* /*go*/) override
|
||||
{
|
||||
if (player->GetQuestStatus(12701) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
// Hack Why Trinity Dont Support Custom Summon Location
|
||||
if (Creature* miner = player->SummonCreature(28841, 2383.869629f, -5900.312500f, 107.996086f, player->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 1))
|
||||
{
|
||||
player->CastSpell(player, SPELL_CART_SUMM, true);
|
||||
if (Creature* car = player->GetVehicleCreatureBase())
|
||||
{
|
||||
if (car->GetEntry() == 28817)
|
||||
{
|
||||
car->AI()->SetGUID(miner->GetGUID());
|
||||
CAST_AI(npc_scarlet_miner::npc_scarlet_minerAI, miner->AI())->InitCartQuest(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class spell_death_knight_initiate_visual : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_death_knight_initiate_visual);
|
||||
@ -1219,13 +929,9 @@ void AddSC_the_scarlet_enclave_c1()
|
||||
RegisterSpellScript(spell_q12698_the_gift_that_keeps_on_giving);
|
||||
new npc_scarlet_ghoul();
|
||||
new npc_dkc1_gothik();
|
||||
new npc_scarlet_cannon();
|
||||
new npc_unworthy_initiate();
|
||||
new npc_unworthy_initiate_anchor();
|
||||
new go_acherus_soul_prison();
|
||||
new npc_scarlet_miner();
|
||||
new npc_scarlet_miner_cart();
|
||||
new go_inconspicuous_mine_car();
|
||||
RegisterSpellScript(spell_death_knight_initiate_visual);
|
||||
RegisterSpellScript(spell_lich_king_whisper);
|
||||
RegisterSpellScript(spell_lich_king_vo_blocker);
|
||||
|
||||
@ -77,51 +77,52 @@ enum Misc
|
||||
DATA_SET_INSANITY_PHASE = 1,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_HERALD_MIND_FLAY = 1,
|
||||
EVENT_HERALD_SHADOW,
|
||||
EVENT_HERALD_SHIVER,
|
||||
};
|
||||
|
||||
const std::array<uint32, MAX_INSANITY_TARGETS> InsanitySpells = { SPELL_INSANITY_PHASING_1, SPELL_INSANITY_PHASING_2, SPELL_INSANITY_PHASING_3, SPELL_INSANITY_PHASING_4, SPELL_INSANITY_PHASING_5 };
|
||||
|
||||
struct boss_volazj : public BossAI
|
||||
{
|
||||
boss_volazj(Creature* pCreature) : BossAI(pCreature, DATA_HERALD_VOLAZJ),
|
||||
insanityTimes(0),
|
||||
insanityPhase(false)
|
||||
{ }
|
||||
|
||||
void InitializeAI() override
|
||||
{
|
||||
BossAI::InitializeAI();
|
||||
// Visible for all players in insanity
|
||||
me->SetPhaseMask((1 | 16 | 32 | 64 | 128 | 256), true);
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
insanityTimes = 0;
|
||||
insanityPhase = false;
|
||||
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetControlled(false, UNIT_STATE_STUNNED);
|
||||
ResetPlayersPhaseMask();
|
||||
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_QUICK_DEMISE_START_EVENT);
|
||||
me->SetPhaseMask((1 | 16 | 32 | 64 | 128 | 256), true);
|
||||
|
||||
ScheduleHealthCheckEvent({ 66, 33 }, [&]{
|
||||
scheduler.CancelAll();
|
||||
DoCastSelf(SPELL_INSANITY);
|
||||
}, false);
|
||||
}
|
||||
|
||||
void ScheduleTasks() override
|
||||
{
|
||||
ScheduleTimedEvent(8s, [&] {
|
||||
DoCastVictim(SPELL_MIND_FLAY);
|
||||
}, 20s);
|
||||
|
||||
ScheduleTimedEvent(5s, [&] {
|
||||
DoCastVictim(SPELL_SHADOW_BOLT_VOLLEY);
|
||||
}, 5s);
|
||||
|
||||
ScheduleTimedEvent(15s, [&] {
|
||||
DoCastRandomTarget(SPELL_SHIVER);
|
||||
}, 15s);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
_JustEngagedWith();
|
||||
events.ScheduleEvent(EVENT_HERALD_MIND_FLAY, 8s);
|
||||
events.ScheduleEvent(EVENT_HERALD_SHADOW, 5s);
|
||||
events.ScheduleEvent(EVENT_HERALD_SHIVER, 15s);
|
||||
Talk(SAY_AGGRO);
|
||||
DoCastSelf(SPELL_WHISPER_AGGRO);
|
||||
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_QUICK_DEMISE_START_EVENT);
|
||||
me->SetInCombatWithZone();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
@ -184,36 +185,13 @@ struct boss_volazj : public BossAI
|
||||
}
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*damagetype*/, SpellSchoolMask /*damageSchoolMask*/) override
|
||||
{
|
||||
// Do not perform insanity recast if boss is casting Insanity already
|
||||
if (me->FindCurrentSpellBySpellId(SPELL_INSANITY))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// First insanity
|
||||
if (insanityTimes == 0 && me->HealthBelowPctDamaged(66, damage))
|
||||
{
|
||||
DoCastSelf(SPELL_INSANITY, false);
|
||||
++insanityTimes;
|
||||
}
|
||||
// Second insanity
|
||||
else if (insanityTimes == 1 && me->HealthBelowPctDamaged(33, damage))
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCastSelf(SPELL_INSANITY, false);
|
||||
++insanityTimes;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
scheduler.Update(diff);
|
||||
|
||||
if (insanityPhase)
|
||||
{
|
||||
@ -226,53 +204,13 @@ struct boss_volazj : public BossAI
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetControlled(false, UNIT_STATE_STUNNED);
|
||||
me->RemoveAurasDueToSpell(INSANITY_VISUAL);
|
||||
}
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
while (uint32 const eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_HERALD_MIND_FLAY:
|
||||
{
|
||||
DoCastVictim(SPELL_MIND_FLAY, false);
|
||||
events.Repeat(20s);
|
||||
break;
|
||||
}
|
||||
case EVENT_HERALD_SHADOW:
|
||||
{
|
||||
DoCastVictim(SPELL_SHADOW_BOLT_VOLLEY, false);
|
||||
events.Repeat(5s);
|
||||
break;
|
||||
}
|
||||
case EVENT_HERALD_SHIVER:
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
||||
{
|
||||
DoCast(pTarget, SPELL_SHIVER, false);
|
||||
}
|
||||
|
||||
events.Repeat(15s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
{
|
||||
return;
|
||||
}
|
||||
ScheduleTasks();
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
uint8 insanityTimes;
|
||||
bool insanityPhase; // Indicates if boss enter to insanity phase
|
||||
|
||||
uint32 GetPlrInsanityAuraId(uint32 phaseMask) const
|
||||
@ -312,6 +250,7 @@ private:
|
||||
bool CheckPhaseMinions()
|
||||
{
|
||||
summons.RemoveNotExisting();
|
||||
|
||||
if (summons.empty())
|
||||
{
|
||||
ResetPlayersPhaseMask();
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
|
||||
#include "IpAddress.h"
|
||||
#include "Log.h"
|
||||
#include "Systemd.h"
|
||||
#include <atomic>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <functional>
|
||||
@ -33,10 +34,20 @@ class AsyncAcceptor
|
||||
public:
|
||||
typedef void(*AcceptCallback)(tcp::socket&& newSocket, uint32 threadIndex);
|
||||
|
||||
AsyncAcceptor(Acore::Asio::IoContext& ioContext, std::string const& bindIp, uint16 port) :
|
||||
AsyncAcceptor(Acore::Asio::IoContext& ioContext, std::string const& bindIp, uint16 port, bool supportSocketActivation = false) :
|
||||
_acceptor(ioContext), _endpoint(Acore::Net::make_address(bindIp), port),
|
||||
_socket(ioContext), _closed(false), _socketFactory([this](){ return DefaultSocketFactory(); })
|
||||
_socket(ioContext), _closed(false), _socketFactory([this](){ return DefaultSocketFactory(); }),
|
||||
_supportSocketActivation(supportSocketActivation)
|
||||
{
|
||||
int const listen_fd = get_listen_fd();
|
||||
if (_supportSocketActivation && listen_fd > 0)
|
||||
{
|
||||
LOG_DEBUG("network", "Using socket from systemd socket activation");
|
||||
boost::system::error_code errorCode;
|
||||
_acceptor.assign(boost::asio::ip::tcp::v4(), listen_fd, errorCode);
|
||||
if (errorCode)
|
||||
LOG_WARN("network", "Failed to assign socket {}", errorCode.message());
|
||||
}
|
||||
}
|
||||
|
||||
template<class T>
|
||||
@ -72,27 +83,31 @@ public:
|
||||
bool Bind()
|
||||
{
|
||||
boost::system::error_code errorCode;
|
||||
_acceptor.open(_endpoint.protocol(), errorCode);
|
||||
if (errorCode)
|
||||
// with socket activation the acceptor is already open and bound
|
||||
if (!_acceptor.is_open())
|
||||
{
|
||||
LOG_INFO("network", "Failed to open acceptor {}", errorCode.message());
|
||||
return false;
|
||||
}
|
||||
_acceptor.open(_endpoint.protocol(), errorCode);
|
||||
if (errorCode)
|
||||
{
|
||||
LOG_INFO("network", "Failed to open acceptor {}", errorCode.message());
|
||||
return false;
|
||||
}
|
||||
|
||||
#if AC_PLATFORM != AC_PLATFORM_WINDOWS
|
||||
_acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true), errorCode);
|
||||
if (errorCode)
|
||||
{
|
||||
LOG_INFO("network", "Failed to set reuse_address option on acceptor {}", errorCode.message());
|
||||
return false;
|
||||
}
|
||||
_acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true), errorCode);
|
||||
if (errorCode)
|
||||
{
|
||||
LOG_INFO("network", "Failed to set reuse_address option on acceptor {}", errorCode.message());
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
_acceptor.bind(_endpoint, errorCode);
|
||||
if (errorCode)
|
||||
{
|
||||
LOG_INFO("network", "Could not bind to {}:{} {}", _endpoint.address().to_string(), _endpoint.port(), errorCode.message());
|
||||
return false;
|
||||
_acceptor.bind(_endpoint, errorCode);
|
||||
if (errorCode)
|
||||
{
|
||||
LOG_INFO("network", "Could not bind to {}:{} {}", _endpoint.address().to_string(), _endpoint.port(), errorCode.message());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
_acceptor.listen(ACORE_MAX_LISTEN_CONNECTIONS, errorCode);
|
||||
@ -124,6 +139,7 @@ private:
|
||||
tcp::socket _socket;
|
||||
std::atomic<bool> _closed;
|
||||
std::function<std::pair<tcp::socket*, uint32>()> _socketFactory;
|
||||
bool _supportSocketActivation;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
#define SocketMgr_h__
|
||||
|
||||
#include "AsyncAcceptor.h"
|
||||
#include "Config.h"
|
||||
#include "Errors.h"
|
||||
#include "NetworkThread.h"
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
@ -42,7 +43,8 @@ public:
|
||||
std::unique_ptr<AsyncAcceptor> acceptor;
|
||||
try
|
||||
{
|
||||
acceptor = std::make_unique<AsyncAcceptor>(ioContext, bindIp, port);
|
||||
bool supportSocketActivation = sConfigMgr->GetOption<bool>("Network.UseSocketActivation", false);
|
||||
acceptor = std::make_unique<AsyncAcceptor>(ioContext, bindIp, port, supportSocketActivation);
|
||||
}
|
||||
catch (boost::system::system_error const& err)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user