Merge pull request #148 from azerothcore/master

update
This commit is contained in:
bashermens
2026-01-13 00:50:29 +01:00
committed by GitHub
26 changed files with 409 additions and 181 deletions

View File

@@ -31,8 +31,16 @@ $SUDO apt-get install -y gdbserver gdb unzip curl \
VAR_PATH="$CURRENT_PATH/../../../../var"
# run noninteractive install for MYSQL 8.4 LTS
wget https://dev.mysql.com/get/mysql-apt-config_0.8.35-1_all.deb -P "$VAR_PATH"
DEBIAN_FRONTEND="noninteractive" $SUDO dpkg -i "$VAR_PATH/mysql-apt-config_0.8.35-1_all.deb"
$SUDO apt-get update
DEBIAN_FRONTEND="noninteractive" $SUDO apt-get install -y mysql-server libmysqlclient-dev
# run noninteractive install for MYSQL
# Version
MYSQL_APT_CONFIG_VERSION=0.8.36-1
# # # # #
mkdir -p "$VAR_PATH/mysqlpackages" && cd "$VAR_PATH/mysqlpackages"
# Download
wget "https://dev.mysql.com/get/mysql-apt-config_${MYSQL_APT_CONFIG_VERSION}_all.deb"
# Install
sudo DEBIAN_FRONTEND="noninteractive" dpkg -i ./mysql-apt-config_${MYSQL_APT_CONFIG_VERSION}_all.deb
sudo apt update
sudo DEBIAN_FRONTEND="noninteractive" apt install -y mysql-server libmysqlclient-dev
# Cleanup
rm -v mysql-apt-config_${MYSQL_APT_CONFIG_VERSION}_all* && unset MYSQL_APT_CONFIG_VERSION

View File

@@ -0,0 +1,17 @@
-- DB update 2026_01_08_00 -> 2026_01_09_00
--
DELETE FROM `creature` WHERE `guid` IN (106509, 106879, 106611, 106612, 106613) AND `id1` IN (23666, 23667, 23670);
INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `unit_flags`, `CreateObject`, `VerifiedBuild`) VALUES
(106509, 23666, 23667, 23670, 571, 495, 3980, 1, 1, 1, 1212.23486328125, -5282.193359375, 178.7692413330078125, 6.091198921203613281, 120, 33554432, 1, 53788),
(106879, 23666, 23667, 23670, 571, 495, 3980, 1, 1, 1, 1226.8583984375, -5312.6591796875, 179.46478271484375, 3.96189737319946289, 120, 33554432, 1, 53788),
(106611, 23666, 23667, 23670, 571, 495, 3980, 1, 1, 1, 1247.4696044921875, -5301.1455078125, 178.558868408203125, 2.897246599197387695, 120, 33554432, 1, 53788),
(106612, 23666, 23667, 23670, 571, 495, 3980, 1, 1, 1, 1241.3194580078125, -5319.017578125, 177.4776763916015625, 0.890117883682250976, 120, 33554432, 1, 53788),
(106613, 23666, 23667, 23670, 571, 495, 3980, 1, 1, 1, 1252.26025390625, -5307.59375, 177.487030029296875, 0.837758064270019531, 120, 33554432, 1, 53788);
DELETE FROM `creature_addon` WHERE (`guid` IN (106509, 106879, 106611, 106612, 106613));
INSERT INTO `creature_addon` (`guid`, `bytes2`, `auras`) VALUES
(106509, 1, '29266'),
(106879, 1, '29266'),
(106611, 1, '29266'),
(106612, 1, '29266'),
(106613, 1, '29266');

View File

@@ -0,0 +1,67 @@
-- DB update 2026_01_09_00 -> 2026_01_09_01
--
DELETE FROM `spell_area` WHERE `spell` = 58139 AND `area` = 4588 AND `quest_start` = 13144;
INSERT INTO `spell_area` (`spell`, `area`, `quest_start`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`, `quest_start_status`, `quest_end_status`) VALUES
(58139, 4588, 13144, 13220, 0, 0, 2, 1, 64, 9);
UPDATE `creature` SET `phaseMask` = `phaseMask`|64 WHERE `id1` = 30631 AND `guid` = 123657;
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 30631;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 30631);
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
(30631, 0, 0, 0, 20, 0, 100, 0, 13144, 30000, 30000, 0, 0, 0, 80, 3063100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Darkrider Arly - On Quest \'Killing Two Scourge With One Skeleton\' Finished - Run Script');
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 3063100);
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
(3063100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 31428, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 6648.76, 3217.7263, 810.50073, 1.6057028770446777, 'Darkrider Arly - Actionlist - Summon Creature \'Crusader Olakin Sainrith\''),
(3063100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 31432, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 6588.4272, 3278.2026, 818.2033, 5.044001579284668, 'Darkrider Arly - Actionlist - Summon Creature \'Ghostwing\'');
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 22) AND (`SourceGroup` = 1) AND (`SourceEntry` = 31428) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 23) AND (`ConditionTarget` = 1) AND (`ConditionValue1` = 4530) AND (`ConditionValue2` = 0) AND (`ConditionValue3` = 0);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(22, 1, 31428, 0, 0, 23, 1, 4530, 0, 0, 0, 0, 0, '', 'Only run script if summon occurs in Sanctum of Reanimation (4530)');
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 22) AND (`SourceGroup` = 6) AND (`SourceEntry` = 31428) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 23) AND (`ConditionTarget` = 1) AND (`ConditionValue1` = 4588) AND (`ConditionValue2` = 0) AND (`ConditionValue3` = 0);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(22, 6, 31428, 0, 0, 23, 1, 4588, 0, 0, 0, 0, 0, '', 'Only run script if summon occurs in Blackwatch (4588)');
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 59091) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 31432) AND (`ConditionValue3` = 0);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(13, 1, 59091, 0, 0, 31, 0, 3, 31432, 0, 0, 0, 0, '', 'Ride Ghostwing (59091) Only Targets Ghostwing (31432)');
UPDATE `creature_template_addon` SET `mount` = 0 WHERE (`entry` = 31428);
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 31428);
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
(31428, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 2, 1770, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Crusader Olakin Sainrith - On Just Summoned, Condition: Only in Sanctum of Reanimation - Set Faction 1770'),
(31428, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 3142800, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Crusader Olakin Sainrith - On Just Summoned - Run Script'),
(31428, 0, 2, 3, 38, 0, 100, 0, 1, 1, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Crusader Olakin Sainrith - On Data Set 1 1 - Set Event Phase 1'),
(31428, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 10, 74956, 30698, 0, 0, 0, 0, 0, 0, 'Crusader Olakin Sainrith - On Data Set 1 1 - Start Attacking'),
(31428, 0, 4, 0, 7, 1, 100, 0, 0, 0, 0, 0, 0, 0, 41, 8000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Crusader Olakin Sainrith - On Evade - Despawn In 8000 ms (Phase 1)'),
(31428, 0, 5, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 3142801, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Crusader Olakin Sainrith - On Just Summoned, Condition: Only in Blackwatch - Run Script');
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 3142801);
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
(3142801, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 44, 64, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Crusader Olakin Sainrith - Actionlist - Set PhaseMask 64'),
(3142801, 9, 1, 0, 0, 0, 100, 0, 1300, 1300, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Crusader Olakin Sainrith - Actionlist - Say Line 1');
UPDATE `creature_template` SET `AIName` = 'SmartAI', `unit_flags` = 768 WHERE `entry` = 31432;
UPDATE `creature_template_movement` SET `Flight` = 2 WHERE (`CreatureId` = 31432);
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 31432);
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
(31432, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 3143200, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ghostwing - On Just Summoned - Run Script'),
(31432, 0, 1, 0, 34, 0, 100, 0, 8, 1, 0, 0, 0, 0, 80, 3143201, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ghostwing - On Reached Point Blackwatch - Run Script'),
(31432, 0, 2, 3, 34, 0, 100, 0, 8, 2, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 31428, 40, 0, 0, 0, 0, 0, 0, 'Ghostwing - On Reached Despawn Point - Despawn Olakin'),
(31432, 0, 3, 0, 61, 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, 'Ghostwing - On Reached Despawn Point - Despawn Self');
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 3143200);
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
(3143200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 44, 64, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ghostwing - Actionlist - Set PhaseMask 64'),
(3143200, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 239, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ghostwing - Actionlist - Set AnimTier Flying'),
(3143200, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 6644.4297, 3222.9124, 823.0705, 0, 'Ghostwing - Actionlist - Move To Position');
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 3143201);
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
(3143201, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 5, 460, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ghostwing - Actionlist - Play Emote 460 (OneShotFlyDragonSpit)'),
(3143201, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ghostwing - Actionlist - Say Line 0'),
(3143201, 9, 2, 0, 0, 0, 100, 0, 6470, 6470, 0, 0, 0, 0, 5, 452, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ghostwing - Actionlist - Play Emote 452 (OneShotFlyGrab)'),
(3143201, 9, 3, 0, 0, 0, 100, 0, 400, 400, 0, 0, 0, 0, 86, 59091, 2, 19, 31428, 40, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ghostwing - Actionlist - Cross Cast \'Ride Ghostwing\''),
(3143201, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 19, 30631, 40, 0, 0, 0, 0, 0, 0, 'Ghostwing - Actionlist - Store Arly as Target'),
(3143201, 9, 5, 0, 0, 0, 100, 0, 2840, 2840, 0, 0, 0, 0, 69, 2, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 6690.6504, 3177.2793, 860.5705, 0, 'Ghostwing - Actionlist - Move To Position'),
(3143201, 9, 6, 0, 0, 0, 100, 0, 1200, 1200, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Ghostwing - Actionlist - Arly Say Line 0');

View File

@@ -0,0 +1,5 @@
-- DB update 2026_01_09_01 -> 2026_01_10_00
--
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 49266) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 1) AND (`ConditionTarget` = 1) AND (`ConditionValue1` = 49282) AND (`ConditionValue2` = 0) AND (`ConditionValue3` = 0);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(17, 0, 49266, 0, 0, 1, 1, 49282, 0, 0, 1, 0, 0, '', 'Mounting Up (12414): Dangle Wild Carrot (49266) cannot be cast on a horse that is already mounted with Ride Highland Mustang (49282)');

View File

@@ -0,0 +1,5 @@
-- DB update 2026_01_10_00 -> 2026_01_12_00
-- bb
DELETE FROM `spell_script_names` WHERE `spell_id` = -49182;
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(-49182, 'spell_dk_blade_barrier');

View File

@@ -0,0 +1,9 @@
-- DB update 2026_01_12_00 -> 2026_01_12_01
--
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 314 AND `id` = 1);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `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
(314, 0, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 20819, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Eliza - In Combat - Cast Frostbolt');
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 5354 AND `id` = 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
(5354, 0, 0, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 11922, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gnarl Leafbrother - On Aggro - Cast Entangling Roots');

View File

@@ -40,39 +40,39 @@ target_include_directories(sfmt
target_compile_definitions(sfmt PUBLIC -DSFMT_MEXP=19937)
# enable SIMD instructions if available
include(CheckCCompilerFlag)
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(powerpc|ppc)64|(powerpc|ppc)64le")
check_c_compiler_flag("-maltivec" HAVE_ALTIVEC)
if (HAVE_ALTIVEC)
target_compile_options(sfmt PRIVATE -mabi=altivec -maltivec)
target_compile_definitions(sfmt PUBLIC -DHAVE_ALTIVEC)
else ()
message(WARNING "Altivec not available - performance will be poor!")
endif ()
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "arm|ARM")
check_c_compiler_flag(-mfpu=neon HAVE_NEON)
if (HAVE_NEON)
target_compile_options(sfmt PRIVATE -mfpu=neon -ftree-vectorize)
target_compile_definitions(sfmt PUBLIC -DHAVE_NEON)
else ()
message(WARNING "Neon not available - performance will be poor!")
endif ()
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")
check_c_compiler_flag(-march=armv8-a+simd HAVE_NEON)
if (HAVE_NEON)
target_compile_options(sfmt PRIVATE -ftree-vectorize)
target_compile_definitions(sfmt PUBLIC -DHAVE_NEON)
else ()
message(WARNING "Neon not available - performance will be poor!")
endif ()
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "i686|amd64|x86_64|AMD64")
#SSE2 is always available
set(HAVE_SSE2 1)
include(CheckCXXCompilerFlag)
if (NOT CMAKE_C_COMPILER_ID MATCHES "MSVC")
# MSVC does not have any flags to check
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
if (ACORE_SYSTEM_PROCESSOR MATCHES "^arm")
set(HAVE_NEON 1)
else ()
set(HAVE_SSE2 1)
endif ()
else ()
if (ACORE_SYSTEM_PROCESSOR STREQUAL "arm")
check_cxx_compiler_flag(-mfpu=neon HAVE_NEON)
if (HAVE_NEON)
target_compile_options(sfmt PRIVATE -mfpu=neon -ftree-vectorize)
endif()
elseif (ACORE_SYSTEM_PROCESSOR STREQUAL "arm64")
check_cxx_compiler_flag(-march=armv8-a+simd HAVE_NEON)
if (HAVE_NEON)
target_compile_options(sfmt PRIVATE -ftree-vectorize)
endif ()
elseif (ACORE_SYSTEM_PROCESSOR MATCHES "x86|amd64")
#SSE2 is always available
set(HAVE_SSE2 1)
target_compile_options(sfmt PRIVATE -msse2)
endif ()
target_compile_definitions(sfmt PUBLIC -DHAVE_SSE2)
endif ()
if (HAVE_NEON)
target_compile_definitions(sfmt PUBLIC HAVE_NEON)
endif ()
if (HAVE_SSE2)
target_compile_definitions(sfmt PUBLIC HAVE_SSE2)
endif ()
set_target_properties(sfmt PROPERTIES LINKER_LANGUAGE CXX)

View File

@@ -12,12 +12,12 @@
file(GLOB_RECURSE sources *.c)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
list(REMOVE_ITEM sources
${CMAKE_CURRENT_SOURCE_DIR}/argon2/opt.c)
else()
if(ACORE_SYSTEM_PROCESSOR MATCHES "x86|amd64")
list(REMOVE_ITEM sources
${CMAKE_CURRENT_SOURCE_DIR}/argon2/ref.c)
else()
list(REMOVE_ITEM sources
${CMAKE_CURRENT_SOURCE_DIR}/argon2/opt.c)
endif()
add_library(argon2 STATIC

View File

@@ -30,7 +30,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT NOJEM)
set(JEM_MADFREE_DEF "#undef")
endif()
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
if(ACORE_SYSTEM_PROCESSOR MATCHES "arm")
set(JEM_CPU_SPINWAIT "")
set(JEM_HAVE_CPU_SPINWAIT 0)
else()

View File

@@ -31,11 +31,14 @@ if(PLATFORM EQUAL 32)
-mfpmath=sse)
endif()
target_compile_definitions(acore-compile-option-interface
INTERFACE
-DHAVE_SSE2
-D__SSE2__)
message(STATUS "GCC: SFMT enabled, SSE2 flags forced")
if(ACORE_SYSTEM_PROCESSOR MATCHES "x86|amd64")
target_compile_definitions(acore-compile-option-interface
INTERFACE
-DHAVE_SSE2
-D__SSE2__)
message(STATUS "GCC: SFMT enabled, SSE2 flags forced")
endif()
if( WITH_WARNINGS )
target_compile_options(acore-warning-interface

View File

@@ -21,6 +21,30 @@ endif()
include("${CMAKE_SOURCE_DIR}/src/cmake/platform/settings.cmake")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64|AMD64")
set(ACORE_SYSTEM_PROCESSOR "amd64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|ARM|aarch|AARCH)64$")
set(ACORE_SYSTEM_PROCESSOR "arm64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|ARM|aarch|AARCH)$")
set(ACORE_SYSTEM_PROCESSOR "arm")
else()
set(ACORE_SYSTEM_PROCESSOR "x86")
endif()
# detect MSVC special case of using cmake -A switch (which doesn't set any cross compiling variables)
if(CMAKE_GENERATOR_PLATFORM STREQUAL "Win32")
set(ACORE_SYSTEM_PROCESSOR "x86")
elseif(CMAKE_GENERATOR_PLATFORM STREQUAL "x64")
set(ACORE_SYSTEM_PROCESSOR "amd64")
elseif(CMAKE_GENERATOR_PLATFORM STREQUAL "ARM")
set(ACORE_SYSTEM_PROCESSOR "arm")
elseif(CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64")
set(ACORE_SYSTEM_PROCESSOR "arm64")
endif()
message(STATUS "Detected ${ACORE_SYSTEM_PROCESSOR} processor architecture")
if(WIN32)
include("${CMAKE_SOURCE_DIR}/src/cmake/platform/win/settings.cmake")
elseif(UNIX)

View File

@@ -227,7 +227,7 @@ elseif (MSVC)
set(_OPENSSL_MSI_INSTALL_GUIDS "")
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "ARM64")
if(ACORE_SYSTEM_PROCESSOR STREQUAL "arm64")
set(_arch "Win64-ARM")
set(_OPENSSL_MSI_INSTALL_GUIDS "99C28AFA-6419-40B1-B88D-32B810BB4234")
else()
@@ -319,7 +319,7 @@ if(WIN32 AND NOT CYGWIN)
# Since OpenSSL 1.1, lib names are like libcrypto32MTd.lib and libssl32MTd.lib
if( "${CMAKE_SIZEOF_VOID_P}" STREQUAL "8" )
set(_OPENSSL_MSVC_ARCH_SUFFIX "64")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "ARM64")
if(ACORE_SYSTEM_PROCESSOR STREQUAL "arm64")
set(_OPENSSL_MSVC_ARCH_DIRECTORY "arm64")
else()
set(_OPENSSL_MSVC_ARCH_DIRECTORY "x64")

View File

@@ -951,6 +951,14 @@ void SmartAI::InitializeAI()
if (!(event.action.cast.castFlags & SMARTCAST_MAIN_SPELL))
continue;
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(event.action.cast.spell);
if (spellInfo && spellInfo->IsPositive())
{
LOG_WARN("scripts.ai", "SmartAI: Creature {} has SMARTCAST_MAIN_SPELL on positive spell {} - positive spells should not be used as main spell",
me->GetEntry(), event.action.cast.spell);
continue;
}
SetMainSpell(event.action.cast.spell);
break;
}
@@ -966,6 +974,11 @@ void SmartAI::InitializeAI()
if (!(event.action.cast.castFlags & SMARTCAST_COMBAT_MOVE))
continue;
// Don't use positive (healing/buff) spells to determine attack distance
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(event.action.cast.spell);
if (spellInfo && spellInfo->IsPositive())
continue;
SetMainSpell(event.action.cast.spell);
break;
}

View File

@@ -6002,6 +6002,19 @@ void Player::RewardReputation(Unit* victim)
}
}
FactionTemplateEntry const* GetAnyFactionTemplateForFaction(uint32 factionId)
{
for (uint32 i = 0; i < sFactionTemplateStore.GetNumRows(); ++i)
{
if (FactionTemplateEntry const* factionTemplate = sFactionTemplateStore.LookupEntry(i))
{
if (factionTemplate->faction == factionId)
return factionTemplate;
}
}
return nullptr;
}
// Calculate how many reputation points player gain with the quest
void Player::RewardReputation(Quest const* quest)
{
@@ -6055,10 +6068,24 @@ void Player::RewardReputation(Quest const* quest)
sScriptMgr->OnPlayerGiveReputation(this, quest->RewardFactionId[i], rep, REPUTATION_SOURCE_QUEST);
}
if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(quest->RewardFactionId[i]))
FactionEntry const* factionEntry = sFactionStore.LookupEntry(quest->RewardFactionId[i]);
if (!factionEntry)
continue;
FactionTemplateEntry const* templateEntry = GetAnyFactionTemplateForFaction(factionEntry->ID);
if (templateEntry)
{
GetReputationMgr().ModifyReputation(factionEntry, rep, quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_NO_REP_SPILLOVER));
bool hostile = (GetTeamId() == TEAM_ALLIANCE) ? templateEntry->IsHostileToAlliancePlayers()
: templateEntry->IsHostileToHordePlayers();
if (hostile)
{
LOG_DEBUG("sql.sql", "RewardReputation: {} is hostile with player ({}), skipping!", templateEntry->ID, GetGUID().ToString());
continue;
}
}
GetReputationMgr().ModifyReputation(factionEntry, rep, quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_NO_REP_SPILLOVER));
}
}

View File

@@ -970,6 +970,9 @@ enum PlayerRestState
{
REST_STATE_RESTED = 0x01,
REST_STATE_NOT_RAF_LINKED = 0x02,
REST_STATE_TIRED = 0x03,
REST_STATE_TIRED_XP_REDUCED = 0x04, // 50% XP
REST_STATE_EXHAUSTED = 0x05, // 25% XP
REST_STATE_RAF_LINKED = 0x06
};

View File

@@ -112,13 +112,14 @@ public:
me->SetImmuneToAll(true);
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
me->SetReactState(REACT_PASSIVE);
if (InstanceScript* pInstance = me->GetInstanceScript())
if (InstanceScript* instance = me->GetInstanceScript())
{
if (Creature* cr = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(DATA_ARTHAS)))
if (Creature* cr = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_ARTHAS)))
cr->AI()->DoAction(ACTION_KILLED_MALGANIS);
// give credit to players
me->CastSpell(me, 58630, true);
instance->instance->SummonGameObject(DUNGEON_MODE(GO_MALGANIS_CHEST_N, GO_MALGANIS_CHEST_H), 2288.35f, 1498.73f, 128.414f, -0.994837f, 0, 0, 0, 0, 7 * DAY * IN_MILLISECONDS);
}
// quest completion

View File

@@ -1153,8 +1153,6 @@ public:
pInstance->SetData(DATA_ARTHAS_EVENT, COS_PROGRESS_FINISHED);
if (GameObject* go = pInstance->instance->GetGameObject(pInstance->GetGuidData(DATA_EXIT_GATE)))
go->SetGoState(GO_STATE_ACTIVE);
pInstance->instance->SummonGameObject(DUNGEON_MODE(GO_MALGANIS_CHEST_N, GO_MALGANIS_CHEST_H), 2288.35f, 1498.73f, 128.414f, -0.994837f, 0, 0, 0, 0, 7 * DAY * IN_MILLISECONDS);
}
ScheduleNextEvent(currentEvent, 10s);
break;

View File

@@ -118,22 +118,41 @@ public:
void OnUnitDeath(Unit* unit) override
{
if (unit->EntryEquals(NPC_WATCHER_GASHRA, NPC_WATCHER_NARJIL, NPC_WATCHER_SILTHIK, NPC_ANUBAR_SHADOWCASTER, NPC_ANUBAR_SKIRMISHER, NPC_ANUBAR_WARRIOR))
if (!unit->EntryEquals(NPC_WATCHER_GASHRA, NPC_WATCHER_NARJIL, NPC_WATCHER_SILTHIK, NPC_ANUBAR_SHADOWCASTER, NPC_ANUBAR_SKIRMISHER, NPC_ANUBAR_WARRIOR))
return;
Creature* creature = unit->ToCreature();
if (!creature)
return;
// For trash mobs, ensure their leader is a Watcher
if (unit->EntryEquals(NPC_ANUBAR_SHADOWCASTER, NPC_ANUBAR_SKIRMISHER, NPC_ANUBAR_WARRIOR))
{
if (Creature* creature = unit->ToCreature())
{
ObjectGuid creatureGuid = creature->GetGUID();
scheduler.CancelAll();
scheduler.Schedule(1s, [this, creatureGuid](TaskContext /*context*/)
{
if (Creature* creature = instance->GetCreature(creatureGuid))
if (CreatureGroup* formation = creature->GetFormation())
if (!formation->IsAnyMemberAlive())
if (Creature* krikthir = GetCreature(DATA_KRIKTHIR))
krikthir->AI()->DoAction(ACTION_MINION_DIED);
});
}
CreatureGroup* formation = creature->GetFormation();
if (!formation)
return;
Creature* leader = formation->GetLeader();
if (!leader || !leader->EntryEquals(NPC_WATCHER_GASHRA, NPC_WATCHER_NARJIL, NPC_WATCHER_SILTHIK))
return;
}
ObjectGuid creatureGuid = creature->GetGUID();
scheduler.CancelAll();
scheduler.Schedule(1s, [this, creatureGuid](TaskContext /*context*/)
{
Creature* creature = instance->GetCreature(creatureGuid);
if (!creature)
return;
CreatureGroup* formation = creature->GetFormation();
if (!formation || formation->IsAnyMemberAlive())
return;
if (Creature* krikthir = GetCreature(DATA_KRIKTHIR))
krikthir->AI()->DoAction(ACTION_MINION_DIED);
});
}
};

View File

@@ -598,7 +598,7 @@ public:
void SetData(uint32 id, uint32 value) override
{
if (!events.HasTimeUntilEvent(EVENT_CHECK_CORPOREALITY))
if (!_events.HasTimeUntilEvent(EVENT_CHECK_CORPOREALITY))
return;
if (id == DATA_MATERIAL_DAMAGE_TAKEN)

View File

@@ -37,141 +37,126 @@ enum Spells
{
SPELL_IMPALE = 28783,
SPELL_LOCUST_SWARM = 28785,
SPELL_SUMMON_CORPSE_SCRABS_5 = 29105,
SPELL_SUMMON_CORPSE_SCRABS_10 = 28864,
SPELL_SUMMON_CORPSE_SCARABS_5 = 29105,
SPELL_SUMMON_CORPSE_SCARABS_10 = 28864,
SPELL_BERSERK = 26662
};
enum Misc
{
NPC_CORPSE_SCARAB = 16698,
NPC_CRYPT_GUARD = 16573,
ACHIEV_TIMED_START_EVENT = 9891
ACHIEV_TIMED_START_EVENT = 9891,
EVENT_SPAWN_CRYPT_GUARDS_1 = 0,
EVENT_BERSERK = 1,
EVENT_SPAWN_CRYPT_GUARDS_EXTRA = 2,
};
class boss_anubrekhan : public CreatureScript
{
public:
boss_anubrekhan() : CreatureScript("boss_anubrekhan") { }
Position const cryptguardPositions[] = {
{ 3299.732f, -3502.489f, 287.077f, 2.378f },
{ 3299.086f, -3450.929f, 287.077f, 3.999f },
{ 3331.217f, -3476.607f, 287.074f, 3.269f }
};
CreatureAI* GetAI(Creature* pCreature) const override
struct boss_anubrekhan : public BossAI
{
boss_anubrekhan(Creature* creature) : BossAI(creature, BOSS_ANUB) { }
void SummonCryptGuards()
{
return GetNaxxramasAI<boss_anubrekhanAI>(pCreature);
if (Is25ManRaid())
{
me->SummonCreature(NPC_CRYPT_GUARD, cryptguardPositions[0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
me->SummonCreature(NPC_CRYPT_GUARD, cryptguardPositions[1], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
}
}
struct boss_anubrekhanAI : public BossAI
void Reset() override
{
boss_anubrekhanAI(Creature* c) : BossAI(c, BOSS_ANUB)
{
sayGreet = false;
}
BossAI::Reset();
SummonCryptGuards();
}
void SummonCryptGuards()
{
if (Is25ManRaid())
{
me->SummonCreature(NPC_CRYPT_GUARD, 3299.732f, -3502.489f, 287.077f, 2.378f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
me->SummonCreature(NPC_CRYPT_GUARD, 3299.086f, -3450.929f, 287.077f, 3.999f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
}
}
void Reset() override
{
BossAI::Reset();
SummonCryptGuards();
me->m_Events.KillAllEvents(false);
}
void JustSummoned(Creature* cr) override
{
if (me->IsInCombat())
{
cr->SetInCombatWithZone();
if (cr->GetEntry() == NPC_CRYPT_GUARD)
cr->AI()->Talk(EMOTE_SPAWN, me);
}
summons.Summon(cr);
}
void SummonedCreatureDies(Creature* cr, Unit*) override
void JustSummoned(Creature* cr) override
{
if (me->IsInCombat())
{
cr->SetInCombatWithZone();
if (cr->GetEntry() == NPC_CRYPT_GUARD)
{
cr->CastSpell(cr, SPELL_SUMMON_CORPSE_SCRABS_10, true, nullptr, nullptr, me->GetGUID());
cr->AI()->Talk(EMOTE_SCARAB);
}
cr->AI()->Talk(EMOTE_SPAWN, me);
}
summons.Summon(cr);
}
void JustDied(Unit* killer) override
void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) override
{
if (summon->GetEntry() == NPC_CRYPT_GUARD)
{
BossAI::JustDied(killer);
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
summon->CastSpell(summon, SPELL_SUMMON_CORPSE_SCARABS_10, true, nullptr, nullptr, me->GetGUID());
summon->AI()->Talk(EMOTE_SCARAB);
}
}
void KilledUnit(Unit* victim) override
void JustDied(Unit* killer) override
{
BossAI::JustDied(killer);
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
}
void KilledUnit(Unit* victim) override
{
if (!victim->IsPlayer())
return;
Talk(SAY_SLAY);
victim->CastSpell(victim, SPELL_SUMMON_CORPSE_SCARABS_5, true, nullptr, nullptr, me->GetGUID());
instance->StorePersistentData(PERSISTENT_DATA_IMMORTAL_FAIL, 1);
}
void JustEngagedWith(Unit* who) override
{
BossAI::JustEngagedWith(who);
me->CallForHelp(30.0f);
Talk(SAY_AGGRO);
if (!summons.HasEntry(NPC_CRYPT_GUARD))
SummonCryptGuards();
if (!Is25ManRaid())
{
if (!victim->IsPlayer())
return;
Talk(SAY_SLAY);
victim->CastSpell(victim, SPELL_SUMMON_CORPSE_SCRABS_5, true, nullptr, nullptr, me->GetGUID());
instance->StorePersistentData(PERSISTENT_DATA_IMMORTAL_FAIL, 1);
ScheduleUniqueTimedEvent(17500ms, [&] {
me->SummonCreature(NPC_CRYPT_GUARD, cryptguardPositions[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
}, EVENT_SPAWN_CRYPT_GUARDS_1);
}
void JustEngagedWith(Unit* who) override
ScheduleTimedEvent(15s, [&] {
DoCastRandomTarget(SPELL_IMPALE);
}, 20s);
ScheduleTimedEvent(70s, 2min, [&] {
Talk(EMOTE_LOCUST);
DoCastSelf(SPELL_LOCUST_SWARM);
scheduler.Schedule(3s, [this](TaskContext /*context*/) {
me->SummonCreature(NPC_CRYPT_GUARD, cryptguardPositions[2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
});
}, 90s);
ScheduleEnrageTimer(SPELL_BERSERK, 10min);
}
void MoveInLineOfSight(Unit* who) override
{
if (!_sayGreet && who->IsPlayer())
{
BossAI::JustEngagedWith(who);
me->CallForHelp(30.0f);
Talk(SAY_AGGRO);
if (!summons.HasEntry(NPC_CRYPT_GUARD))
SummonCryptGuards();
if (!Is25ManRaid())
{
me->m_Events.AddEventAtOffset([&]
{
me->SummonCreature(NPC_CRYPT_GUARD, 3331.217f, -3476.607f, 287.074f, 3.269f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
}, Milliseconds(urand(15000, 20000)));
}
ScheduleTimedEvent(15s, [&] {
DoCastRandomTarget(SPELL_IMPALE);
}, 20s);
ScheduleTimedEvent(70s, 2min, [&] {
Talk(EMOTE_LOCUST);
DoCastSelf(SPELL_LOCUST_SWARM);
me->m_Events.AddEventAtOffset([&]
{
me->SummonCreature(NPC_CRYPT_GUARD, 3331.217f, -3476.607f, 287.074f, 3.269f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
}, 3s);
}, 90s);
me->m_Events.AddEventAtOffset([&]
{
DoCastSelf(SPELL_BERSERK, true);
}, 10min);
Talk(SAY_GREET);
_sayGreet = true;
}
BossAI::MoveInLineOfSight(who);
}
void MoveInLineOfSight(Unit* who) override
{
if (!sayGreet && who->IsPlayer())
{
Talk(SAY_GREET);
sayGreet = true;
}
ScriptedAI::MoveInLineOfSight(who);
}
private:
bool sayGreet;
};
private:
bool _sayGreet{false};
};
void AddSC_boss_anubrekhan()
{
new boss_anubrekhan();
RegisterNaxxramasCreatureAI(boss_anubrekhan);
}

View File

@@ -464,6 +464,19 @@ public:
go->SetGoState(GO_STATE_ACTIVE);
gateOpened = true;
summons.DoForAllSummons([&](WorldObject* summon)
{
if (Creature* gothikMinion = summon->ToCreature())
if (gothikMinion->IsAlive())
{
if (Unit* target = SelectTarget(SelectTargetMethod::MinDistance, 0, 200.0f))
{
gothikMinion->AI()->AttackStart(target);
gothikMinion->SetReactState(REACT_AGGRESSIVE);
gothikMinion->SetInCombatWithZone();
}
}
});
Talk(EMOTE_GATE_OPENED);
}
break;

View File

@@ -146,6 +146,9 @@ enum NaxxramasGameObjectsDisplayId
enum NaxxramasCreatureId
{
// Anub'Rekhan
NPC_CRYPT_GUARD = 16573,
// Patchwerk
NPC_PATCHWERK = 16028,
NPC_PATCHWORK_GOLEM = 16017,

View File

@@ -41,6 +41,7 @@ enum Spells
SPELL_ARCANE_MAGUS_SUMMON = 47708,
SPELL_FIRE_MAGUS_DEATH = 47711,
SPELL_FROST_MAGUS_DEATH = 47712,
SPELL_ARCANE_MAGUS_DEATH = 47713,
SPELL_WEAR_CHRISTMAS_HAT = 61400
@@ -83,13 +84,11 @@ struct boss_magus_telestra : public BossAI
{
boss_magus_telestra(Creature* creature) : BossAI(creature, DATA_MAGUS_TELESTRA_EVENT) { }
uint8 copiesDied;
bool achievement;
void Reset() override
{
BossAI::Reset();
copiesDied = 0;
achievement = true;
if (IsHeroic() && sGameEventMgr->IsActiveEvent(GAME_EVENT_WINTER_VEIL) && !me->HasAura(SPELL_WEAR_CHRISTMAS_HAT))
@@ -152,9 +151,8 @@ struct boss_magus_telestra : public BossAI
events.ScheduleEvent(EVENT_MAGUS_FAIL_ACHIEVEMENT, 5s);
caster->ToCreature()->DespawnOrUnsummon(1s);
if (++copiesDied >= 3)
if (me->HasAura(SPELL_FIRE_MAGUS_DEATH) && me->HasAura(SPELL_FROST_MAGUS_DEATH) && me->HasAura(SPELL_ARCANE_MAGUS_DEATH))
{
copiesDied = 0;
events.CancelEvent(EVENT_MAGUS_FAIL_ACHIEVEMENT);
events.ScheduleEvent(EVENT_MAGUS_MERGED, 5s);
me->CastSpell(me, SPELL_BURNING_WINDS, true);
@@ -168,13 +166,14 @@ struct boss_magus_telestra : public BossAI
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
if (me->HasUnitState(UNIT_STATE_CASTING) ||
(me->HasUnitState(UNIT_STATE_STUNNED) && !me->HasAura(SPELL_START_SUMMON_CLONES))) // Reflected Ice Nova can stun her as its mechanic bypasses immunities
return;
switch (events.ExecuteEvent())
{
case EVENT_MAGUS_HEALTH1:
if (me->HealthBelowPct(51))
if (me->HealthBelowPct(51) && me->HealthAbovePct(11))
{
me->CastSpell(me, SPELL_START_SUMMON_CLONES, false);
events.ScheduleEvent(EVENT_MAGUS_RELOCATE, 3500ms);

View File

@@ -32,6 +32,11 @@ ObjectData const creatureData[] =
{ 0, 0 }
};
BossBoundaryData const boundaries =
{
{ BOSS_SJONNIR, new RectangleBoundary(1206.56f, 1341.4185f, 579.9434f, 753.9599f) }
};
class instance_halls_of_stone : public InstanceMapScript
{
public:
@@ -72,6 +77,7 @@ public:
SetBossNumber(MAX_ENCOUNTER);
LoadObjectData(creatureData, nullptr);
LoadSummonData(summonData);
LoadBossBoundaries(boundaries);
memset(&Encounter, 0, sizeof(Encounter));
brannAchievement = false;

View File

@@ -2314,6 +2314,26 @@ class spell_dk_army_of_the_dead_passive : public AuraScript
}
};
// -49182 Blade Barrier
class spell_dk_blade_barrier : public AuraScript
{
PrepareAuraScript(spell_dk_blade_barrier);
bool CheckProc(ProcEventInfo& /*eventInfo*/)
{
if (Player* player = GetCaster()->ToPlayer())
if (player->getClass() == CLASS_DEATH_KNIGHT && player->IsBaseRuneSlotsOnCooldown(RUNE_BLOOD))
return true;
return false;
}
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_dk_blade_barrier::CheckProc);
}
};
void AddSC_deathknight_spell_scripts()
{
RegisterSpellScript(spell_dk_wandering_plague);
@@ -2362,4 +2382,5 @@ void AddSC_deathknight_spell_scripts()
RegisterSpellScript(spell_dk_will_of_the_necropolis);
RegisterSpellScript(spell_dk_ghoul_thrash);
RegisterSpellScript(spell_dk_army_of_the_dead_passive);
RegisterSpellScript(spell_dk_blade_barrier);
}

View File

@@ -1015,6 +1015,8 @@ struct FactionTemplateEntry
return (hostileMask & entry.ourMask) != 0;
}
[[nodiscard]] bool IsHostileToPlayers() const { return (hostileMask & FACTION_MASK_PLAYER) != 0; }
[[nodiscard]] bool IsHostileToAlliancePlayers() const { return (hostileMask & FACTION_MASK_ALLIANCE) != 0; }
[[nodiscard]] bool IsHostileToHordePlayers() const { return (hostileMask & FACTION_MASK_HORDE) != 0; }
[[nodiscard]] bool IsNeutralToAll() const
{
for (unsigned int i : enemyFaction)