mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-11-10 20:44:17 +08:00
Merge branch 'master' into fix-survival-of-the-fittest-lacking-daze-immunity
This commit is contained in:
commit
4caa189890
12
data/sql/updates/db_world/2025_10_29_01.sql
Normal file
12
data/sql/updates/db_world/2025_10_29_01.sql
Normal file
@ -0,0 +1,12 @@
|
||||
-- DB update 2025_10_29_00 -> 2025_10_29_01
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=7866 AND `SourceEntry`=2;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(15, 7866, 2, 0, 0, 9, 0, 10098, 0, 0, 0, 0, 0, '', 'Show gossip option 2 if player has quest 10098'),
|
||||
(15, 7866, 2, 0, 0, 2, 0, 32888, 1, 0, 1, 0, 0, '', 'Show gossip option 2 if player does NOT have item 32888');
|
||||
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=18933;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=18933 AND `source_type`=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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(18933, 0, 0, 1, 62, 0, 100, 0, 7866, 2, 0, 0, 56, 32888, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Isfar - On Gossip Option 2 Selected - Add Item The Relics of Terokk'),
|
||||
(18933, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Isfar - Link - Close Gossip');
|
||||
14
data/sql/updates/db_world/2025_10_29_02.sql
Normal file
14
data/sql/updates/db_world/2025_10_29_02.sql
Normal file
@ -0,0 +1,14 @@
|
||||
-- DB update 2025_10_29_01 -> 2025_10_29_02
|
||||
--
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28580;
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28580);
|
||||
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
|
||||
(28580, 0, 0, 0, 0, 0, 100, 2, 0, 0, 2300, 5000, 0, 0, 11, 16100, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Hardened Steel Skycaller - In Combat - Cast \'Shoot\' (Normal Dungeon)'),
|
||||
(28580, 0, 1, 0, 0, 0, 100, 4, 0, 0, 2300, 5000, 0, 0, 11, 61515, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Hardened Steel Skycaller - In Combat - Cast \'Shoot\' (Heroic Dungeon)'),
|
||||
(28580, 0, 2, 0, 0, 0, 100, 2, 9000, 12000, 15000, 20000, 0, 0, 11, 52754, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Hardened Steel Skycaller - In Combat - Cast \'Impact Shot\' (Normal Dungeon)'),
|
||||
(28580, 0, 3, 0, 0, 0, 100, 2, 7000, 12000, 12000, 18000, 0, 0, 11, 52755, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Hardened Steel Skycaller - In Combat - Cast \'Impact Multi-Shot\' (Normal Dungeon)'),
|
||||
(28580, 0, 4, 0, 0, 0, 100, 4, 9000, 12000, 15000, 20000, 0, 0, 11, 59148, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Hardened Steel Skycaller - In Combat - Cast \'Impact Shot\' (Heroic Dungeon)'),
|
||||
(28580, 0, 5, 0, 0, 0, 100, 4, 7000, 12000, 12000, 18000, 0, 0, 11, 59147, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Hardened Steel Skycaller - In Combat - Cast \'Impact Multi-Shot\' (Heroic Dungeon)'),
|
||||
(28580, 0, 6, 0, 9, 0, 100, 4, 0, 0, 6000, 9000, 0, 5, 11, 61507, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Hardened Steel Skycaller - Within 0-5 Range - Cast \'Disengage\' (Heroic Dungeon)'),
|
||||
(28580, 0, 7, 8, 9, 0, 100, 2, 5000, 8000, 5000, 8000, 0, 5, 122, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hardened Steel Skycaller - Within 0-5 Range - Flee (Normal Dungeon)'),
|
||||
(28580, 0, 8, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hardened Steel Skycaller - Within 0-0 Range - Disable Combat Movement (Normal Dungeon)');
|
||||
4
data/sql/updates/db_world/2025_10_30_00.sql
Normal file
4
data/sql/updates/db_world/2025_10_30_00.sql
Normal file
@ -0,0 +1,4 @@
|
||||
-- DB update 2025_10_29_02 -> 2025_10_30_00
|
||||
|
||||
-- Adjusts events previously ordered from 0 wrongly
|
||||
UPDATE `smart_scripts` SET `event_param2` = `event_param2` +1 WHERE `event_type` =34 AND `event_param1` = 2 AND `entryorguid` IN (-158029, -158021, -158000, -148360, -148268, -139547 ,-139546, -139539, -139538, -139533, -139532);
|
||||
152
data/sql/updates/db_world/2025_10_30_01.sql
Normal file
152
data/sql/updates/db_world/2025_10_30_01.sql
Normal file
@ -0,0 +1,152 @@
|
||||
-- DB update 2025_10_30_00 -> 2025_10_30_01
|
||||
DELETE FROM `spelldifficulty_dbc` WHERE `ID` IN (50044,50774,50804,51153,51121,51110,51054,50785,61407,52774,52960,52961,52387,52237,52433,52429,51012,50988,51136,12167,15654,12734,50843,50810,50868,50761,50760,50752,50830,50831,50834,50840,50838,50895,50900,48261,48256,48136,48133,48130,48105,48140,48137,50234,50255,47579,15667,48294,48291,48529,48423,48380,42708,42669,42705,42729,42730,43667,43649,52445,52737,52771,52720,52722,52721,52696,52666,57725,52480,56855,56891,56926,55959,36176,34941,67774,68783,57058,56272,61693,57407,58459,58462,58463,58456,58455,58458,58457,60181,60182,31956,72395,72396,72397);
|
||||
INSERT INTO `spelldifficulty_dbc` (`ID`,`DifficultySpellID_1`,`DifficultySpellID_2`,`DifficultySpellID_3`,`DifficultySpellID_4`) VALUES
|
||||
-- Oculus
|
||||
(50044,50044,59213,0,0),
|
||||
-- Drakos
|
||||
(50774,50774,59370,0,0),
|
||||
-- Eregos
|
||||
(50804,50804,59381,0,0),
|
||||
(51153,51153,59382,0,0),
|
||||
-- Urom
|
||||
(51121,51121,59376,0,0),
|
||||
(51110,51110,59377,0,0),
|
||||
-- Varos
|
||||
(51054,51054,59371,0,0),
|
||||
(50785,50785,59372,0,0),
|
||||
(61407,61407,62136,0,0),
|
||||
|
||||
-- Halls of Lightning
|
||||
-- Bjarngrimm
|
||||
(52774,52774,59160,0,0),
|
||||
-- Loken
|
||||
(52960,52960,59835,0,0),
|
||||
(52961,52961,59836,0,0),
|
||||
-- Volkhan
|
||||
(52387,52387,59528,0,0),
|
||||
(52237,52237,59529,0,0),
|
||||
(52433,52433,59530,0,0),
|
||||
(52429,52429,59527,0,0),
|
||||
|
||||
-- Halls of Stone
|
||||
-- Brann
|
||||
(51012,51012,59868,0,0),
|
||||
(50988,50988,59870,0,0),
|
||||
(51136,51136,59867,0,0),
|
||||
(12167,12167,59863,0,0),
|
||||
(15654,15654,59864,0,0),
|
||||
(12734,12734,59865,0,0),
|
||||
-- Krystallus
|
||||
(50843,50843,59742,0,0),
|
||||
(50810,50810,61546,0,0),
|
||||
(50868,50868,58744,0,0),
|
||||
-- Maiden of Grief
|
||||
(50761,50761,59727,0,0),
|
||||
(50760,50760,59726,0,0),
|
||||
(50752,50752,59772,0,0),
|
||||
-- Sjonnir
|
||||
(50830,50830,59844,0,0),
|
||||
(50831,50831,59845,0,0),
|
||||
(50834,50834,59846,0,0),
|
||||
(50840,50840,59848,0,0),
|
||||
(50838,50838,59853,0,0),
|
||||
(50895,50895,59851,0,0),
|
||||
(50900,50900,59852,0,0),
|
||||
|
||||
-- Utgarde Keep
|
||||
-- Palehoof
|
||||
(48261,48261,59268,0,0),
|
||||
(48256,48256,59267,0,0),
|
||||
(48136,48136,59272,0,0),
|
||||
(48133,48133,59271,0,0),
|
||||
(48130,48130,59264,0,0),
|
||||
(48105,48105,59263,0,0),
|
||||
(48140,48140,59273,0,0),
|
||||
(48137,48137,59265,0,0),
|
||||
-- Skadi
|
||||
(50234,50234,59330,0,0),
|
||||
(50255,50255,59331,0,0),
|
||||
(47579,47579,60020,0,0),
|
||||
-- Svala
|
||||
(15667,15667,59409,0,0),
|
||||
-- Ymiron
|
||||
(48294,48294,59301,0,0),
|
||||
(48291,48291,59300,0,0),
|
||||
(48529,48529,59305,0,0),
|
||||
(48423,48423,59304,0,0),
|
||||
(48380,48380,59320,0,0),
|
||||
-- Ingvar
|
||||
(42708,42708,59708,0,0),
|
||||
(42669,42669,59706,0,0),
|
||||
(42705,42705,59707,0,0),
|
||||
(42729,42729,59734,0,0),
|
||||
(42730,42730,59735,0,0),
|
||||
-- Keleseth
|
||||
(43667,43667,59389,0,0),
|
||||
-- Skarvald
|
||||
(43649,43649,59575,0,0),
|
||||
|
||||
-- Culling of Stratholm
|
||||
(52445,52445,58822,0,0),
|
||||
-- Epoch Hunter
|
||||
(52737,52737,58829,0,0),
|
||||
(52771,52771,58830,0,0),
|
||||
-- Malganis
|
||||
(52720,52720,58852,0,0),
|
||||
(52722,52722,58850,0,0),
|
||||
(52721,52721,58849,0,0),
|
||||
-- Meathook
|
||||
(52696,52696,58823,0,0),
|
||||
(52666,52666,58824,0,0),
|
||||
-- Salramm
|
||||
(57725,57725,58827,0,0),
|
||||
(52480,52480,58825,0,0),
|
||||
|
||||
-- Ahnkahet
|
||||
-- Jedoga
|
||||
(56855,56855,60030,0,0),
|
||||
(56891,56891,60032,0,0),
|
||||
(56926,56926,60029,0,0),
|
||||
-- Taldaram
|
||||
(55959,55959,59513,0,0),
|
||||
|
||||
-- Trial of the Champio
|
||||
-- Argent Challenge
|
||||
(36176,36176,67289,0,0),
|
||||
(34941,34941,34942,0,0),
|
||||
-- Grand Champions
|
||||
(68783,68783,68784,0,0),
|
||||
|
||||
-- Eye of Eternity
|
||||
(57058,57058,60073,0,0),
|
||||
-- Malygos
|
||||
(56272,56272,60072,0,0),
|
||||
(61693,61693,61694,0,0),
|
||||
(57407,57407,60936,0,0),
|
||||
|
||||
-- Violet Hold
|
||||
(58459,58459,59256,0,0),
|
||||
(58462,58462,59257,0,0),
|
||||
(58463,58463,59258,0,0),
|
||||
(58456,58456,59248,0,0),
|
||||
(58455,58455,59245,0,0),
|
||||
(58458,58458,59253,0,0),
|
||||
(58457,58457,59251,0,0),
|
||||
(60181,60181,60204,0,0),
|
||||
(60182,60182,60205,0,0),
|
||||
|
||||
-- Halls Of Reflection
|
||||
-- Falric
|
||||
(72395,72395,72390,0,0),
|
||||
(72396,72396,72391,0,0),
|
||||
(72397,72397,72393,0,0),
|
||||
|
||||
-- Slave Pens
|
||||
-- Rokmar
|
||||
(31956,31956,38801,0,0);
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` IN (67774,67879,67886);
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(67774, "spell_black_knight_ghoul_claw"),
|
||||
(67879, "spell_black_knight_ghoul_claw"),
|
||||
(67886, "spell_black_knight_ghoul_explode");
|
||||
8
data/sql/updates/db_world/2025_10_31_00.sql
Normal file
8
data/sql/updates/db_world/2025_10_31_00.sql
Normal file
@ -0,0 +1,8 @@
|
||||
-- DB update 2025_10_30_01 -> 2025_10_31_00
|
||||
--
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27966;
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 27966) AND (`source_type` = 0) AND (`id` IN (0, 1, 2));
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `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
|
||||
(27966, 0, 0, 0, 0, 0, 100, 7, 6000, 14000, 20000, 23000, 0, 0, 11, 51507, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Controller - In Combat - Cast \'Summon Shardling\' (No Repeat) (Dungeon)'),
|
||||
(27966, 0, 1, 0, 0, 0, 100, 6, 5000, 10000, 17000, 25000, 0, 0, 11, 51503, 128, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Controller - In Combat - Cast \'Domination\' (Dungeon)'),
|
||||
(27966, 0, 2, 0, 16, 0, 100, 6, 51805, 15, 14000, 17000, 0, 0, 11, 51805, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Controller - On Friendly Unit Missing Buff \'Crystalline Growth\' - Cast \'Crystalline Growth\' (Dungeon)');
|
||||
4
data/sql/updates/db_world/2025_10_31_01.sql
Normal file
4
data/sql/updates/db_world/2025_10_31_01.sql
Normal file
@ -0,0 +1,4 @@
|
||||
-- DB update 2025_10_31_00 -> 2025_10_31_01
|
||||
|
||||
-- Set Rooted
|
||||
UPDATE `creature_template_movement` SET `Rooted` = 1 WHERE (`CreatureId` = 16129);
|
||||
208
data/sql/updates/db_world/2025_10_31_02.sql
Normal file
208
data/sql/updates/db_world/2025_10_31_02.sql
Normal file
@ -0,0 +1,208 @@
|
||||
-- DB update 2025_10_31_01 -> 2025_10_31_02
|
||||
-- | present in spelldifficulty.dbc | new ->
|
||||
DELETE FROM `spelldifficulty_dbc` WHERE `ID` IN (66809,70867,70877,70879,70994,71623,68186,69037,72224,70873,28783,28785,28732,28884,57374,28863,28883,57376,28882,28371,28374,29317,28157,28158,29998,28478,28479,29865,29204,29484,28741,54121,54123,29213,29212,41926,55543,28531,55697,28542,54529,28135,28167,64717,64776,61916,61890,61903,61911,64637,62274,62269,62054,61879,61869,61915,61887,64389,64422,64666,64375,64478,64496,64458,62584,62528,62623,64587,62437,62862,62861,62451,62240,62217,62310,62275,62283,62285,62325,62337,62664,62653,62654,62648,62649,62589,62598,62478,65123,63711,62680,62546,62717,62548,65722,62836,63356,63573,62030,63716,63347,63629,63821,63766,62166,62056,63818,63666,62997,66351,63387,64019,63689,64352,64348,64626,64016,63317,46763,63809,64758,62131,62577,62334,62335,62333,62315,62316,62331,62332,62327,62328,62321,62613,62411,63024,63018,65737,64203,64227,63795,64125,64159,58695,58960,58663,58666,64213,64216);
|
||||
INSERT INTO `spelldifficulty_dbc` (`ID`,`DifficultySpellID_1`,`DifficultySpellID_2`,`DifficultySpellID_3`,`DifficultySpellID_4`) VALUES
|
||||
-- Trial of the Crusader
|
||||
-- Anubarak
|
||||
(68186,68186,68515,68186,68515),
|
||||
|
||||
-- ICC
|
||||
-- Lich King
|
||||
(69037,69037,74361,69037,74361),
|
||||
-- Valithria
|
||||
(72224,72224,72224,72480,72480),
|
||||
(70873,70873,70873,71941,71941),
|
||||
|
||||
-- Naxxramas
|
||||
-- Anubrekhan
|
||||
(28783,28783,56090,0,0),
|
||||
(28785,28785,54021,0,0),
|
||||
-- Faerlina
|
||||
(28732,28732,54097,0,0),
|
||||
-- Horsemen
|
||||
(28884,28884,57467,0,0),
|
||||
(57374,57374,57464,0,0),
|
||||
(28863,28863,57463,0,0),
|
||||
(28883,28883,57466,0,0),
|
||||
(57376,57376,57465,0,0),
|
||||
(28882,28882,57369,0,0),
|
||||
-- Gluth
|
||||
(28371,28371,54427,0,0),
|
||||
(28374,28374,54426,0,0),
|
||||
-- Gothik
|
||||
(29317,29317,56405,0,0),
|
||||
-- Grobbulus
|
||||
(28157,28157,54364,0,0),
|
||||
(28158,28158,54362,0,0),
|
||||
-- Heigan
|
||||
(29998,29998,55011,0,0),
|
||||
-- Kelthuzad
|
||||
(28478,28478,55802,0,0),
|
||||
(28479,28479,55807,0,0),
|
||||
-- Loatheb
|
||||
(29865,29865,55053,0,0),
|
||||
(29204,29204,55052,0,0),
|
||||
-- Maexxna
|
||||
(29484,29484,54125,0,0),
|
||||
(28741,28741,54122,0,0),
|
||||
(54121,54121,28776,0,0),
|
||||
(54123,54123,54124,0,0),
|
||||
-- Noth
|
||||
(29213,29213,54835,0,0),
|
||||
(29212,29212,54814,0,0),
|
||||
-- Patchwerk
|
||||
(41926,41926,59192,0,0),
|
||||
-- Razuvious
|
||||
(55543,55543,29107,0,0),
|
||||
-- Sapphiron
|
||||
(28531,28531,55799,0,0),
|
||||
(55697,55697,55696,0,0),
|
||||
(28542,28542,55665,0,0),
|
||||
-- Thaddius
|
||||
(54529,54529,28134,0,0),
|
||||
(28135,28135,54528,0,0),
|
||||
(28167,28167,54531,0,0),
|
||||
|
||||
-- Ulduar
|
||||
(64717,64717,65241,0,0),
|
||||
(64776,64776,65240,0,0),
|
||||
-- Assembly of Iron
|
||||
(61916,61916,63482,0,0),
|
||||
(61890,61890,63498,0,0),
|
||||
(61903,61903,63493,0,0),
|
||||
(61911,61911,63495,0,0),
|
||||
(64637,64637,61888,0,0),
|
||||
(62274,62274,63489,0,0),
|
||||
(62269,62269,63490,0,0),
|
||||
(62054,62054,63491,0,0),
|
||||
(61879,61879,63479,0,0),
|
||||
(61869,61869,63481,0,0),
|
||||
(61915,61915,63483,0,0),
|
||||
(61887,61887,63486,0,0),
|
||||
-- Auriaya
|
||||
(64389,64389,64678,0,0),
|
||||
(64422,64422,64688,0,0),
|
||||
(64666,64666,64374,0,0),
|
||||
(64375,64375,64667,0,0),
|
||||
(64478,64478,64669,0,0),
|
||||
(64496,64496,64674,0,0),
|
||||
(64458,64458,64676,0,0),
|
||||
-- Freya
|
||||
(62584,62584,64185,0,0),
|
||||
(62528,62528,62892,0,0),
|
||||
(62623,62623,62872,0,0),
|
||||
(64587,64587,64650,0,0),
|
||||
(62437,62437,62859,0,0),
|
||||
(62862,62862,62439,0,0),
|
||||
(62861,62861,62438,0,0),
|
||||
(62451,62451,62865,0,0),
|
||||
(62240,62240,64087,0,0),
|
||||
(62217,62217,62922,0,0),
|
||||
(62310,62310,62928,0,0),
|
||||
(62275,62275,62929,0,0),
|
||||
(62283,62283,62930,0,0),
|
||||
(62285,62285,62931,0,0),
|
||||
(62325,62325,62932,0,0),
|
||||
(62337,62337,62933,0,0),
|
||||
(62664,62664,64191,0,0),
|
||||
(62653,62653,62935,0,0),
|
||||
(62654,62654,62936,0,0),
|
||||
(62648,62648,62939,0,0),
|
||||
(62649,62649,62938,0,0),
|
||||
(62589,62589,63571,0,0),
|
||||
(62598,62598,62937,0,0),
|
||||
-- Hodir
|
||||
(62478,62478,63512,0,0),
|
||||
(65123,65123,65133,0,0),
|
||||
(63711,63711,65134,0,0),
|
||||
-- Ignis
|
||||
(62680,62680,63472,0,0),
|
||||
(62546,62546,63474,0,0),
|
||||
(62717,62717,63477,0,0),
|
||||
(62548,62548,63476,0,0),
|
||||
(65722,65722,65723,0,0),
|
||||
(62836,62836,63536,0,0),
|
||||
-- Kologarn
|
||||
(63356,63356,64003,0,0),
|
||||
(63573,63573,64006,0,0),
|
||||
(62030,62030,63980,0,0),
|
||||
(63716,63716,64005,0,0),
|
||||
(63347,63347,63977,0,0),
|
||||
(63629,63629,63979,0,0),
|
||||
(63821,63821,64001,0,0),
|
||||
(63766,63766,63983,0,0),
|
||||
(62166,62166,63981,0,0),
|
||||
(62056,62056,63985,0,0),
|
||||
(63818,63818,63978,0,0),
|
||||
-- Mimiron
|
||||
(63666,63666,65026,0,0),
|
||||
(62997,62997,64529,0,0),
|
||||
(66351,66351,63009,0,0),
|
||||
(63387,63387,64531,0,0),
|
||||
(64019,64019,64532,0,0),
|
||||
(63689,63689,64535,0,0),
|
||||
(64352,64352,64537,0,0),
|
||||
(64348,64348,64536,0,0),
|
||||
(64626,64626,65333,0,0),
|
||||
-- Razorscale
|
||||
(64016,64016,64023,0,0),
|
||||
(63317,63317,64021,0,0),
|
||||
(46763,46763,64062,0,0),
|
||||
(63809,63809,64696,0,0),
|
||||
(64758,64758,64759,0,0),
|
||||
-- Thorim
|
||||
(62131,62131,64390,0,0),
|
||||
(62577,62577,62603,0,0),
|
||||
(62334,62334,62442,0,0),
|
||||
(62335,62335,62443,0,0),
|
||||
(62333,62333,62441,0,0),
|
||||
(62315,62315,62415,0,0),
|
||||
(62316,62316,62417,0,0),
|
||||
(62331,62331,62418,0,0),
|
||||
(62332,62332,62420,0,0),
|
||||
(62327,62327,62445,0,0),
|
||||
(62328,62328,62446,0,0),
|
||||
(62321,62321,62529,0,0),
|
||||
(62613,62613,62614,0,0),
|
||||
(62411,62411,62413,0,0),
|
||||
-- XT
|
||||
(63024,63024,64234,0,0),
|
||||
(63018,63018,65121,0,0),
|
||||
(65737,65737,64193,0,0),
|
||||
(64203,64203,64235,0,0),
|
||||
(64227,64227,64236,0,0),
|
||||
-- Yoggsaron
|
||||
(63795,63795,65301,0,0),
|
||||
(64125,64125,64126,0,0),
|
||||
(64159,64159,64160,0,0),
|
||||
|
||||
-- Vault of Archavon
|
||||
-- Archavon
|
||||
(58695,58695,60883,0,0),
|
||||
(58960,58960,60894,0,0),
|
||||
(58663,58663,60880,0,0),
|
||||
(58666,58666,60882,0,0),
|
||||
-- Emalon
|
||||
(64213,64213,64215,0,0),
|
||||
(64216,64216,65279,0,0);
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` IN (63716,64005,69159,70136,69161,70139,69163,70469,70135,70138,70468,70137,70140,70470,28157,54364,66351,63009);
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(63716,"spell_kologarn_stone_shout_aura"),
|
||||
(64005,"spell_kologarn_stone_shout_aura"),
|
||||
(69159,"spell_festergut_gaseous_blight"),
|
||||
(70136,"spell_festergut_gaseous_blight"),
|
||||
(69161,"spell_festergut_gaseous_blight"),
|
||||
(70139,"spell_festergut_gaseous_blight"),
|
||||
(69163,"spell_festergut_gaseous_blight"),
|
||||
(70469,"spell_festergut_gaseous_blight"),
|
||||
(70135,"spell_festergut_gaseous_blight"),
|
||||
(70138,"spell_festergut_gaseous_blight"),
|
||||
(70468,"spell_festergut_gaseous_blight"),
|
||||
(70137,"spell_festergut_gaseous_blight"),
|
||||
(70140,"spell_festergut_gaseous_blight"),
|
||||
(70470,"spell_festergut_gaseous_blight"),
|
||||
(28157,"spell_grobbulus_slime_spray"),
|
||||
(54364,"spell_grobbulus_slime_spray"),
|
||||
(66351,"spell_ulduar_mimiron_mine_explosion"),
|
||||
(63009,"spell_ulduar_mimiron_mine_explosion");
|
||||
3
data/sql/updates/db_world/2025_11_01_00.sql
Normal file
3
data/sql/updates/db_world/2025_11_01_00.sql
Normal file
@ -0,0 +1,3 @@
|
||||
-- DB update 2025_10_31_02 -> 2025_11_01_00
|
||||
--
|
||||
UPDATE `creature` SET `position_x` = 1262.0, `position_y` = -26.9, `position_z` = 33.5 WHERE `guid` = 126981;
|
||||
3
data/sql/updates/db_world/2025_11_01_01.sql
Normal file
3
data/sql/updates/db_world/2025_11_01_01.sql
Normal file
@ -0,0 +1,3 @@
|
||||
-- DB update 2025_11_01_00 -> 2025_11_01_01
|
||||
-- GO_TRIBUNAL_ACCESS_DOOR
|
||||
UPDATE `gameobject` SET `state` = 0 WHERE `id` = 191295 AND `map` = 599;
|
||||
15
data/sql/updates/db_world/2025_11_01_02.sql
Normal file
15
data/sql/updates/db_world/2025_11_01_02.sql
Normal file
@ -0,0 +1,15 @@
|
||||
-- DB update 2025_11_01_01 -> 2025_11_01_02
|
||||
|
||||
-- Spelldifficulty
|
||||
DELETE FROM `spelldifficulty_dbc` WHERE `ID` IN (50378);
|
||||
INSERT INTO `spelldifficulty_dbc` (`ID`,`DifficultySpellID_1`,`DifficultySpellID_2`,`DifficultySpellID_3`,`DifficultySpellID_4`) VALUES
|
||||
(50378, 50378, 59017, 0, 0);
|
||||
|
||||
-- Scourge Reanimator (unholy frenzy on self / update client)
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26626;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26626);
|
||||
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
|
||||
(26626, 0, 0, 0, 0, 0, 100, 0, 2000, 5000, 6000, 8000, 0, 0, 11, 50378, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scourge Reanimator - In Combat - Cast \'Frostbolt\''),
|
||||
(26626, 0, 1, 0, 0, 0, 100, 0, 7000, 10000, 15000, 15000, 0, 0, 11, 50379, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scourge Reanimator - In Combat - Cast \'Cripple\''),
|
||||
(26626, 0, 2, 0, 0, 0, 100, 0, 2000, 10000, 18000, 24000, 0, 0, 11, 49805, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scourge Reanimator - In Combat - Cast \'Unholy Frenzy\'');
|
||||
@ -135,6 +135,6 @@ void TotemAI::AttackStart(Unit* /*victim*/)
|
||||
data << me->GetGUID();
|
||||
data << me->GetPositionX();
|
||||
data << me->GetPositionY();
|
||||
me->GetOwner()->ToPlayer()->GetSession()->SendPacket(&data);
|
||||
me->GetOwner()->ToPlayer()->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -182,7 +182,7 @@ void CreatureAI::MoveInLineOfSight(Unit* who)
|
||||
if (me->IsMoveInLineOfSightDisabled())
|
||||
if (me->GetCreatureType() == CREATURE_TYPE_NON_COMBAT_PET || // nothing more to do, return
|
||||
!who->IsInCombat() || // if not in combat, nothing more to do
|
||||
!me->IsWithinDist(who, ATTACK_DISTANCE, true, false)) // if in combat and in dist - neutral to all can actually assist other creatures
|
||||
!me->IsWithinDist(who, ATTACK_DISTANCE, true, false, false)) // if in combat and in dist - neutral to all can actually assist other creatures
|
||||
return;
|
||||
|
||||
if (me->HasReactState(REACT_AGGRESSIVE) && me->CanStartAttack(who))
|
||||
|
||||
@ -566,7 +566,7 @@ Player* ScriptedAI::SelectTargetFromPlayerList(float maxdist, uint32 excludeAura
|
||||
std::vector<Player*> tList;
|
||||
for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
|
||||
{
|
||||
if (!me->IsWithinDistInMap(itr->GetSource(), maxdist, true, false) || !itr->GetSource()->IsAlive() || itr->GetSource()->IsGameMaster())
|
||||
if (!me->IsWithinDistInMap(itr->GetSource(), maxdist, true, false, false) || !itr->GetSource()->IsAlive() || itr->GetSource()->IsGameMaster())
|
||||
continue;
|
||||
if (excludeAura && itr->GetSource()->HasAura(excludeAura))
|
||||
continue;
|
||||
|
||||
@ -218,10 +218,10 @@ bool npc_escortAI::IsPlayerOrGroupInRange()
|
||||
{
|
||||
for (GroupReference* groupRef = group->GetFirstMember(); groupRef != nullptr; groupRef = groupRef->next())
|
||||
if (Player* member = groupRef->GetSource())
|
||||
if (me->IsWithinDistInMap(member, GetMaxPlayerDistance(), true, false))
|
||||
if (me->IsWithinDistInMap(member, GetMaxPlayerDistance(), true, false, false))
|
||||
return true;
|
||||
}
|
||||
else if (me->IsWithinDistInMap(player, GetMaxPlayerDistance(), true, false))
|
||||
else if (me->IsWithinDistInMap(player, GetMaxPlayerDistance(), true, false, false))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -202,7 +202,7 @@ void FollowerAI::UpdateAI(uint32 uiDiff)
|
||||
{
|
||||
Player* member = groupRef->GetSource();
|
||||
|
||||
if (member && me->IsWithinDistInMap(member, MAX_PLAYER_DISTANCE, true, false))
|
||||
if (member && me->IsWithinDistInMap(member, MAX_PLAYER_DISTANCE, true, false, false))
|
||||
{
|
||||
bIsMaxRangeExceeded = false;
|
||||
break;
|
||||
@ -211,7 +211,7 @@ void FollowerAI::UpdateAI(uint32 uiDiff)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (me->IsWithinDistInMap(player, MAX_PLAYER_DISTANCE, true, false))
|
||||
if (me->IsWithinDistInMap(player, MAX_PLAYER_DISTANCE, true, false, false))
|
||||
bIsMaxRangeExceeded = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2378,7 +2378,7 @@ void AchievementMgr::SendAllAchievementData() const
|
||||
{
|
||||
WorldPacket data(SMSG_ALL_ACHIEVEMENT_DATA, _completedAchievements.size() * 8 + 4 + _criteriaProgress.size() * 38 + 4);
|
||||
BuildAllDataPacket(&data);
|
||||
GetPlayer()->GetSession()->SendPacket(&data);
|
||||
GetPlayer()->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void AchievementMgr::SendRespondInspectAchievements(Player* player) const
|
||||
@ -2386,7 +2386,7 @@ void AchievementMgr::SendRespondInspectAchievements(Player* player) const
|
||||
WorldPacket data(SMSG_RESPOND_INSPECT_ACHIEVEMENTS, 9 + _completedAchievements.size() * 8 + 4 + _criteriaProgress.size() * 38 + 4);
|
||||
data << GetPlayer()->GetPackGUID();
|
||||
BuildAllDataPacket(&data);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -306,7 +306,7 @@ AC_GAME_API void ArenaSpectator::SendPacketTo(Player const* player, std::string&
|
||||
{
|
||||
WorldPacket data;
|
||||
CreatePacket(data, message);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
template<>
|
||||
|
||||
@ -354,7 +354,7 @@ void AuctionHouseSearcher::Update()
|
||||
{
|
||||
Player* player = ObjectAccessor::FindConnectedPlayer(response->playerGuid);
|
||||
if (player)
|
||||
player->GetSession()->SendPacket(&response->packet);
|
||||
player->SendDirectMessage(&response->packet);
|
||||
|
||||
delete response;
|
||||
}
|
||||
|
||||
@ -203,6 +203,6 @@ void AutobroadcastMgr::SendNotificationAnnouncement(uint8 textId)
|
||||
data << localizedMessage;
|
||||
|
||||
// Send packet to the player
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
});
|
||||
}
|
||||
|
||||
@ -458,7 +458,7 @@ void Battlefield::BroadcastPacketToZone(WorldPacket const* data) const
|
||||
for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team)
|
||||
for (GuidUnorderedSet::const_iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
|
||||
if (Player* player = ObjectAccessor::FindPlayer(*itr))
|
||||
player->GetSession()->SendPacket(data);
|
||||
player->SendDirectMessage(data);
|
||||
}
|
||||
|
||||
void Battlefield::BroadcastPacketToQueue(WorldPacket const* data) const
|
||||
@ -466,7 +466,7 @@ void Battlefield::BroadcastPacketToQueue(WorldPacket const* data) const
|
||||
for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team)
|
||||
for (GuidUnorderedSet::const_iterator itr = m_PlayersInQueue[team].begin(); itr != m_PlayersInQueue[team].end(); ++itr)
|
||||
if (Player* player = ObjectAccessor::FindPlayer(*itr))
|
||||
player->GetSession()->SendPacket(data);
|
||||
player->SendDirectMessage(data);
|
||||
}
|
||||
|
||||
void Battlefield::BroadcastPacketToWar(WorldPacket const* data) const
|
||||
@ -474,7 +474,7 @@ void Battlefield::BroadcastPacketToWar(WorldPacket const* data) const
|
||||
for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team)
|
||||
for (GuidUnorderedSet::const_iterator itr = m_PlayersInWar[team].begin(); itr != m_PlayersInWar[team].end(); ++itr)
|
||||
if (Player* player = ObjectAccessor::FindPlayer(*itr))
|
||||
player->GetSession()->SendPacket(data);
|
||||
player->SendDirectMessage(data);
|
||||
}
|
||||
|
||||
void Battlefield::SendWarning(uint8 id, WorldObject const* target /*= nullptr*/)
|
||||
@ -663,7 +663,7 @@ void Battlefield::SendAreaSpiritHealerQueryOpcode(Player* player, const ObjectGu
|
||||
|
||||
data << guid << time;
|
||||
ASSERT(player);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
// ----------------------
|
||||
|
||||
@ -349,7 +349,7 @@ void ArenaTeam::DelMember(ObjectGuid guid, bool cleanDb)
|
||||
playerMember->RemoveBattlegroundQueueId(bgQueue);
|
||||
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, nullptr, playerMember->GetBattlegroundQueueIndex(bgQueue), STATUS_NONE, 0, 0, 0, TEAM_NEUTRAL);
|
||||
queue.RemovePlayer(playerMember->GetGUID(), true);
|
||||
playerMember->GetSession()->SendPacket(&data);
|
||||
playerMember->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -567,7 +567,7 @@ void ArenaTeam::BroadcastPacket(WorldPacket* packet)
|
||||
{
|
||||
for (MemberList::const_iterator itr = Members.begin(); itr != Members.end(); ++itr)
|
||||
if (Player* player = ObjectAccessor::FindConnectedPlayer(itr->Guid))
|
||||
player->GetSession()->SendPacket(packet);
|
||||
player->SendDirectMessage(packet);
|
||||
}
|
||||
|
||||
void ArenaTeam::BroadcastEvent(ArenaTeamEvents event, ObjectGuid guid, uint8 strCount, std::string const& str1, std::string const& str2, std::string const& str3)
|
||||
|
||||
@ -608,7 +608,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
|
||||
{
|
||||
WorldPacket status;
|
||||
sBattlegroundMgr->BuildBattlegroundStatusPacket(&status, this, player->GetCurrentBattlegroundQueueSlot(), STATUS_IN_PROGRESS, 0, GetStartTime(), GetArenaType(), player->GetBgTeamId());
|
||||
player->GetSession()->SendPacket(&status);
|
||||
player->SendDirectMessage(&status);
|
||||
|
||||
player->RemoveAurasDueToSpell(SPELL_ARENA_PREPARATION);
|
||||
player->ResetAllPowers();
|
||||
@ -652,7 +652,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
|
||||
data << t->GetGUID();
|
||||
data << uint32(t->GetZoneId());
|
||||
data << uint32(15 * IN_MILLISECONDS);
|
||||
p->GetSession()->SendPacket(&data);
|
||||
p->SendDirectMessage(&data);
|
||||
}
|
||||
m_ToBeTeleported.clear();
|
||||
}
|
||||
@ -713,14 +713,14 @@ Position const* Battleground::GetTeamStartPosition(TeamId teamId) const
|
||||
void Battleground::SendPacketToAll(WorldPacket const* packet)
|
||||
{
|
||||
for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
|
||||
itr->second->GetSession()->SendPacket(packet);
|
||||
itr->second->SendDirectMessage(packet);
|
||||
}
|
||||
|
||||
void Battleground::SendPacketToTeam(TeamId teamId, WorldPacket const* packet, Player* sender, bool self)
|
||||
{
|
||||
for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
|
||||
if (itr->second->GetBgTeamId() == teamId && (self || sender != itr->second))
|
||||
itr->second->GetSession()->SendPacket(packet);
|
||||
itr->second->SendDirectMessage(packet);
|
||||
}
|
||||
|
||||
void Battleground::SendChatMessage(Creature* source, uint8 textId, WorldObject* target /*= nullptr*/)
|
||||
@ -937,7 +937,7 @@ void Battleground::EndBattleground(PvPTeamId winnerTeamId)
|
||||
|
||||
BlockMovement(player);
|
||||
|
||||
player->GetSession()->SendPacket(&pvpLogData);
|
||||
player->SendDirectMessage(&pvpLogData);
|
||||
|
||||
if (isBattleground() && sWorld->getBoolConfig(CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE))
|
||||
{
|
||||
@ -964,7 +964,7 @@ void Battleground::EndBattleground(PvPTeamId winnerTeamId)
|
||||
|
||||
WorldPacket data;
|
||||
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, this, player->GetCurrentBattlegroundQueueSlot(), STATUS_IN_PROGRESS, TIME_TO_AUTOREMOVE, GetStartTime(), GetArenaType(), player->GetBgTeamId());
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
|
||||
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND, player->GetMapId());
|
||||
}
|
||||
@ -1062,7 +1062,7 @@ void Battleground::RemovePlayerAtLeave(Player* player)
|
||||
|
||||
WorldPacket data;
|
||||
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, this, player->GetCurrentBattlegroundQueueSlot(), STATUS_NONE, 0, 0, 0, TEAM_NEUTRAL);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
|
||||
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(GetBgTypeID(), GetArenaType());
|
||||
|
||||
@ -1341,7 +1341,7 @@ bool Battleground::HasFreeSlots() const
|
||||
void Battleground::SpectatorsSendPacket(WorldPacket& data)
|
||||
{
|
||||
for (SpectatorList::const_iterator itr = m_Spectators.begin(); itr != m_Spectators.end(); ++itr)
|
||||
(*itr)->GetSession()->SendPacket(&data);
|
||||
(*itr)->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Battleground::ReadyMarkerClicked(Player* p)
|
||||
@ -1813,10 +1813,10 @@ void Battleground::PlayerAddedToBGCheckIfBGIsRunning(Player* player)
|
||||
BlockMovement(player);
|
||||
|
||||
BuildPvPLogDataPacket(data);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
|
||||
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, this, player->GetCurrentBattlegroundQueueSlot(), STATUS_IN_PROGRESS, GetEndTime(), GetStartTime(), GetArenaType(), player->GetBgTeamId());
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
uint32 Battleground::GetAlivePlayersCountByTeam(TeamId teamId) const
|
||||
|
||||
@ -670,7 +670,7 @@ void BattlegroundMgr::SendAreaSpiritHealerQueryOpcode(Player* player, Battlegrou
|
||||
if (time_ == uint32(-1))
|
||||
time_ = 0;
|
||||
data << guid << time_;
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
bool BattlegroundMgr::IsArenaType(BattlegroundTypeId bgTypeId)
|
||||
|
||||
@ -1274,7 +1274,7 @@ void BattlegroundQueue::InviteGroupToBG(GroupQueueInfo* ginfo, Battleground* bg,
|
||||
// send status packet
|
||||
WorldPacket data;
|
||||
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_JOIN, INVITE_ACCEPT_WAIT_TIME, 0, ginfo->ArenaType, TEAM_NEUTRAL, bg->isRated());
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
|
||||
// pussywizard:
|
||||
if (bg->isArena() && bg->isRated())
|
||||
@ -1312,7 +1312,7 @@ bool BGQueueInviteEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
|
||||
// send remaining time in queue
|
||||
WorldPacket data;
|
||||
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_JOIN, INVITE_ACCEPT_WAIT_TIME - INVITATION_REMIND_TIME, 0, m_ArenaType, TEAM_NEUTRAL, bg->isRated(), m_BgTypeId);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -307,7 +307,7 @@ void BattlegroundSA::StartShips()
|
||||
WorldPacket pkt;
|
||||
GetBGObject(i)->BuildValuesUpdateBlockForPlayer(&data, itr->second);
|
||||
data.BuildPacket(pkt);
|
||||
itr->second->GetSession()->SendPacket(&pkt);
|
||||
itr->second->SendDirectMessage(&pkt);
|
||||
}
|
||||
}
|
||||
ShipsStarted = true;
|
||||
@ -1141,7 +1141,7 @@ void BattlegroundSA::SendTransportInit(Player* player)
|
||||
GetBGObject(BG_SA_BOAT_TWO)->BuildCreateUpdateBlockForPlayer(&transData, player);
|
||||
WorldPacket packet;
|
||||
transData.BuildPacket(packet);
|
||||
player->GetSession()->SendPacket(&packet);
|
||||
player->SendDirectMessage(&packet);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1156,7 +1156,7 @@ void BattlegroundSA::SendTransportsRemove(Player* player)
|
||||
GetBGObject(BG_SA_BOAT_TWO)->BuildOutOfRangeUpdateBlock(&transData);
|
||||
WorldPacket packet;
|
||||
transData.BuildPacket(packet);
|
||||
player->GetSession()->SendPacket(&packet);
|
||||
player->SendDirectMessage(&packet);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -908,26 +908,26 @@ void Channel::SendToAll(WorldPacket* data, ObjectGuid guid)
|
||||
{
|
||||
for (PlayerContainer::const_iterator i = playersStore.begin(); i != playersStore.end(); ++i)
|
||||
if (!guid || !i->second.plrPtr->GetSocial()->HasIgnore(guid))
|
||||
i->second.plrPtr->GetSession()->SendPacket(data);
|
||||
i->second.plrPtr->SendDirectMessage(data);
|
||||
}
|
||||
|
||||
void Channel::SendToAllButOne(WorldPacket* data, ObjectGuid who)
|
||||
{
|
||||
for (PlayerContainer::const_iterator i = playersStore.begin(); i != playersStore.end(); ++i)
|
||||
if (i->first != who)
|
||||
i->second.plrPtr->GetSession()->SendPacket(data);
|
||||
i->second.plrPtr->SendDirectMessage(data);
|
||||
}
|
||||
|
||||
void Channel::SendToOne(WorldPacket* data, ObjectGuid who)
|
||||
{
|
||||
if (Player* player = ObjectAccessor::FindConnectedPlayer(who))
|
||||
player->GetSession()->SendPacket(data);
|
||||
player->SendDirectMessage(data);
|
||||
}
|
||||
|
||||
void Channel::SendToAllWatching(WorldPacket* data)
|
||||
{
|
||||
for (PlayersWatchingContainer::const_iterator i = playersWatchingStore.begin(); i != playersWatchingStore.end(); ++i)
|
||||
(*i)->GetSession()->SendPacket(data);
|
||||
(*i)->SendDirectMessage(data);
|
||||
}
|
||||
|
||||
bool Channel::ShouldAnnouncePlayer(Player const* player) const
|
||||
|
||||
@ -150,7 +150,7 @@ Channel* ChannelMgr::GetChannel(std::string const& name, Player* player, bool pk
|
||||
{
|
||||
WorldPacket data;
|
||||
MakeNotOnPacket(&data, name);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
||||
@ -961,7 +961,7 @@ namespace lfg
|
||||
RBCacheMap::iterator itr = RBCacheStore[player->GetTeamId()].find(dungeonId);
|
||||
if (itr != RBCacheStore[player->GetTeamId()].end())
|
||||
{
|
||||
player->GetSession()->SendPacket(&(itr->second));
|
||||
player->SendDirectMessage(&(itr->second));
|
||||
return;
|
||||
}
|
||||
// send empty packet if cache not found
|
||||
@ -973,7 +973,7 @@ namespace lfg
|
||||
data << (uint32)0;
|
||||
data << (uint32)0;
|
||||
data << (uint32)0;
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void LFGMgr::UpdateRaidBrowser(uint32 diff)
|
||||
@ -1220,7 +1220,7 @@ namespace lfg
|
||||
for (RBSearchersMap::const_iterator sitr = RBSearchersStore[team].begin(); sitr != RBSearchersStore[team].end(); ++sitr)
|
||||
if (sitr->second == dungeonId)
|
||||
if (Player* p = ObjectAccessor::FindConnectedPlayer(sitr->first))
|
||||
p->GetSession()->SendPacket(&differencePacket);
|
||||
p->SendDirectMessage(&differencePacket);
|
||||
|
||||
break; // one dungeon updated in one LFGMgr::UpdateRaidBrowser
|
||||
}
|
||||
|
||||
@ -771,7 +771,7 @@ void Creature::Update(uint32 diff)
|
||||
}
|
||||
|
||||
Unit* owner = GetCharmerOrOwner();
|
||||
if (IsCharmed() && !IsWithinDistInMap(owner, GetMap()->GetVisibilityRange(), true, false))
|
||||
if (IsCharmed() && !IsWithinDistInMap(owner, GetMap()->GetVisibilityRange(), true, false, false))
|
||||
{
|
||||
RemoveCharmAuras();
|
||||
}
|
||||
@ -1944,7 +1944,7 @@ bool Creature::CanStartAttack(Unit const* who) const
|
||||
if (!_IsTargetAcceptable(who))
|
||||
return false;
|
||||
|
||||
if (IsNeutralToAll() || !IsWithinDistInMap(who, GetAggroRange(who) + m_CombatDistance, true, false)) // pussywizard: +m_combatDistance for turrets and similar
|
||||
if (IsNeutralToAll() || !IsWithinDistInMap(who, GetAggroRange(who) + m_CombatDistance, true, false, false)) // pussywizard: +m_combatDistance for turrets and similar
|
||||
return false;
|
||||
|
||||
if (!CanCreatureAttack(who))
|
||||
|
||||
@ -517,7 +517,7 @@ void GameObject::Update(uint32 diff)
|
||||
WorldPacket packet;
|
||||
BuildValuesUpdateBlockForPlayer(&udata, caster->ToPlayer());
|
||||
udata.BuildPacket(packet);
|
||||
caster->ToPlayer()->GetSession()->SendPacket(&packet);
|
||||
caster->ToPlayer()->SendDirectMessage(&packet);
|
||||
|
||||
SendCustomAnim(GetGoAnimProgress());
|
||||
}
|
||||
@ -637,7 +637,7 @@ void GameObject::Update(uint32 diff)
|
||||
caster->ToPlayer()->RemoveGameObject(this, false);
|
||||
|
||||
WorldPacket data(SMSG_FISH_ESCAPED, 0);
|
||||
caster->ToPlayer()->GetSession()->SendPacket(&data);
|
||||
caster->ToPlayer()->SendDirectMessage(&data);
|
||||
}
|
||||
// can be delete
|
||||
m_lootState = GO_JUST_DEACTIVATED;
|
||||
@ -1628,7 +1628,7 @@ void GameObject::Use(Unit* user)
|
||||
{
|
||||
WorldPacket data(SMSG_GAMEOBJECT_PAGETEXT, 8);
|
||||
data << GetGUID();
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
else if (info->goober.gossipID)
|
||||
{
|
||||
@ -1798,7 +1798,7 @@ void GameObject::Use(Unit* user)
|
||||
SetLootState(GO_JUST_DEACTIVATED);
|
||||
|
||||
WorldPacket data(SMSG_FISH_NOT_HOOKED, 0);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2034,7 +2034,7 @@ void GameObject::Use(Unit* user)
|
||||
player->TeleportTo(GetMapId(), GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation(), TELE_TO_NOT_LEAVE_TRANSPORT | TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET);
|
||||
|
||||
WorldPacket data(SMSG_ENABLE_BARBER_SHOP, 0);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
|
||||
player->SetStandState(UNIT_STAND_STATE_SIT_LOW_CHAIR + info->barberChair.chairheight);
|
||||
return;
|
||||
@ -2311,7 +2311,7 @@ void GameObject::ModifyHealth(int32 change, Unit* attackerOrHealer /*= nullptr*/
|
||||
data << uint32(-change); // change < 0 triggers SPELL_BUILDING_HEAL combat log event
|
||||
// change >= 0 triggers SPELL_BUILDING_DAMAGE event
|
||||
data << uint32(spellId);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
GameObjectDestructibleState newState = GetDestructibleState();
|
||||
|
||||
@ -414,7 +414,7 @@ private:
|
||||
void UpdatePackedRotation();
|
||||
|
||||
//! Object distance/size - overridden from Object::_IsWithinDist. Needs to take in account proper GO size.
|
||||
bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool /*is3D*/, bool /*useBoundingRadius = true*/) const override
|
||||
bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool /*is3D*/, bool /*incOwnRadius = true*/, bool /*incTargetRadius = true*/) const override
|
||||
{
|
||||
//! Following check does check 3d distance
|
||||
dist2compare += obj->GetObjectSize();
|
||||
|
||||
@ -1066,7 +1066,7 @@ void Item::SendUpdateSockets()
|
||||
for (uint32 i = SOCK_ENCHANTMENT_SLOT; i <= BONUS_ENCHANTMENT_SLOT; ++i)
|
||||
data << uint32(GetEnchantmentId(EnchantmentSlot(i)));
|
||||
|
||||
GetOwner()->GetSession()->SendPacket(&data);
|
||||
GetOwner()->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
// Though the client has the information in the item's data field,
|
||||
@ -1081,7 +1081,7 @@ void Item::SendTimeUpdate(Player* owner)
|
||||
WorldPacket data(SMSG_ITEM_TIME_UPDATE, (8 + 4));
|
||||
data << GetGUID();
|
||||
data << uint32(duration);
|
||||
owner->GetSession()->SendPacket(&data);
|
||||
owner->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
Item* Item::CreateItem(uint32 item, uint32 count, Player const* player, bool clone, uint32 randomPropertyId)
|
||||
|
||||
@ -240,7 +240,7 @@ void Object::SendUpdateToPlayer(Player* player)
|
||||
|
||||
BuildCreateUpdateBlockForPlayer(&upd, player);
|
||||
upd.BuildPacket(packet);
|
||||
player->GetSession()->SendPacket(&packet);
|
||||
player->SendDirectMessage(&packet);
|
||||
}
|
||||
|
||||
void Object::BuildValuesUpdateBlockForPlayer(UpdateData* data, Player* target)
|
||||
@ -272,7 +272,7 @@ void Object::DestroyForPlayer(Player* target, bool onDeath) const
|
||||
{
|
||||
WorldPacket data(SMSG_ARENA_UNIT_DESTROYED, 8);
|
||||
data << GetGUID();
|
||||
target->GetSession()->SendPacket(&data);
|
||||
target->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -282,7 +282,7 @@ void Object::DestroyForPlayer(Player* target, bool onDeath) const
|
||||
//! If the following bool is true, the client will call "void CGUnit_C::OnDeath()" for this object.
|
||||
//! OnDeath() does for eg trigger death animation and interrupts certain spells/missiles/auras/sounds...
|
||||
data << uint8(onDeath ? 1 : 0);
|
||||
target->GetSession()->SendPacket(&data);
|
||||
target->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
[[nodiscard]] int32 Object::GetInt32Value(uint16 index) const
|
||||
@ -1232,10 +1232,14 @@ float WorldObject::GetDistanceZ(WorldObject const* obj) const
|
||||
return (dist > 0 ? dist : 0);
|
||||
}
|
||||
|
||||
bool WorldObject::_IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D, bool useBoundingRadius) const
|
||||
bool WorldObject::_IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D, bool incOwnRadius, bool incTargetRadius) const
|
||||
{
|
||||
float sizefactor = useBoundingRadius ? GetObjectSize() + obj->GetObjectSize() : 0.0f;
|
||||
float maxdist = dist2compare + sizefactor;
|
||||
float maxdist = dist2compare;
|
||||
if (incOwnRadius)
|
||||
maxdist += GetObjectSize();
|
||||
|
||||
if (incTargetRadius)
|
||||
maxdist += obj->GetObjectSize();
|
||||
|
||||
if (m_transport && obj->GetTransport() && obj->GetTransport()->GetGUID() == m_transport->GetGUID())
|
||||
{
|
||||
@ -1342,14 +1346,14 @@ bool WorldObject::IsWithinDist2d(const Position* pos, float dist) const
|
||||
}
|
||||
|
||||
// use only if you will sure about placing both object at same map
|
||||
bool WorldObject::IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D, bool useBoundingRadius) const
|
||||
bool WorldObject::IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D, bool incOwnRadius, bool incTargetRadius) const
|
||||
{
|
||||
return obj && _IsWithinDist(obj, dist2compare, is3D, useBoundingRadius);
|
||||
return obj && _IsWithinDist(obj, dist2compare, is3D, incOwnRadius, incTargetRadius);
|
||||
}
|
||||
|
||||
bool WorldObject::IsWithinDistInMap(WorldObject const* obj, float dist2compare, bool is3D, bool useBoundingRadius) const
|
||||
bool WorldObject::IsWithinDistInMap(WorldObject const* obj, float dist2compare, bool is3D, bool incOwnRadius, bool incTargetRadius) const
|
||||
{
|
||||
return obj && IsInMap(obj) && InSamePhase(obj) && _IsWithinDist(obj, dist2compare, is3D, useBoundingRadius);
|
||||
return obj && IsInMap(obj) && InSamePhase(obj) && _IsWithinDist(obj, dist2compare, is3D, incOwnRadius, incTargetRadius);
|
||||
}
|
||||
|
||||
bool WorldObject::IsWithinLOS(float ox, float oy, float oz, VMAP::ModelIgnoreFlags ignoreFlags, LineOfSightChecks checks) const
|
||||
@ -2065,7 +2069,7 @@ void WorldObject::SendPlayMusic(uint32 Music, bool OnlySelf)
|
||||
WorldPacket data(SMSG_PLAY_MUSIC, 4);
|
||||
data << Music;
|
||||
if (OnlySelf && IsPlayer())
|
||||
this->ToPlayer()->GetSession()->SendPacket(&data);
|
||||
ToPlayer()->SendDirectMessage(&data);
|
||||
else
|
||||
SendMessageToSet(&data, true); // ToSelf ignored in this case
|
||||
}
|
||||
|
||||
@ -541,8 +541,8 @@ public:
|
||||
[[nodiscard]] bool IsWithinDist2d(float x, float y, float dist) const;
|
||||
bool IsWithinDist2d(const Position* pos, float dist) const;
|
||||
// use only if you will sure about placing both object at same map
|
||||
bool IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D = true, bool useBoundingRadius = true) const;
|
||||
bool IsWithinDistInMap(WorldObject const* obj, float dist2compare, bool is3D = true, bool useBoundingRadius = true) const;
|
||||
bool IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D = true, bool incOwnRadius = true, bool incTargetRadius = true) const;
|
||||
bool IsWithinDistInMap(WorldObject const* obj, float dist2compare, bool is3D = true, bool incOwnRadius = true, bool incTargetRadius = true) const;
|
||||
[[nodiscard]] bool IsWithinLOS(float x, float y, float z, VMAP::ModelIgnoreFlags ignoreFlags = VMAP::ModelIgnoreFlags::Nothing, LineOfSightChecks checks = LINEOFSIGHT_ALL_CHECKS) const;
|
||||
[[nodiscard]] bool IsWithinLOSInMap(WorldObject const* obj, VMAP::ModelIgnoreFlags ignoreFlags = VMAP::ModelIgnoreFlags::Nothing, LineOfSightChecks checks = LINEOFSIGHT_ALL_CHECKS, Optional<float> collisionHeight = { }, Optional<float> combatReach = { }) const;
|
||||
[[nodiscard]] Position GetHitSpherePointFor(Position const& dest, Optional<float> collisionHeight = { }, Optional<float> combatReach = { }) const;
|
||||
@ -770,7 +770,7 @@ private:
|
||||
uint16 m_notifyflags;
|
||||
uint16 m_executed_notifies;
|
||||
|
||||
virtual bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D, bool useBoundingRadius = true) const;
|
||||
virtual bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D, bool incOwnRadius = true, bool incTargetRadius = true) const;
|
||||
|
||||
bool CanNeverSee(WorldObject const* obj) const;
|
||||
virtual bool CanAlwaysSee(WorldObject const* /*obj*/) const { return false; }
|
||||
|
||||
@ -1512,7 +1512,7 @@ void Pet::_LoadSpellCooldowns(PreparedQueryResult result)
|
||||
if (!cooldowns.empty() && GetOwner())
|
||||
{
|
||||
BuildCooldownPacket(data, SPELL_COOLDOWN_FLAG_NONE, cooldowns);
|
||||
GetOwner()->GetSession()->SendPacket(&data);
|
||||
GetOwner()->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,6 +78,7 @@
|
||||
#include "TicketMgr.h"
|
||||
#include "Tokenize.h"
|
||||
#include "Transport.h"
|
||||
#include "Unit.h"
|
||||
#include "UpdateData.h"
|
||||
#include "Util.h"
|
||||
#include "Vehicle.h"
|
||||
@ -418,7 +419,7 @@ Player::Player(WorldSession* session): Unit(), m_mover(this)
|
||||
|
||||
sScriptMgr->OnConstructPlayer(this);
|
||||
|
||||
m_expectingChangeTransport = false;
|
||||
_expectingChangeTransport = false;
|
||||
}
|
||||
|
||||
Player::~Player()
|
||||
@ -1342,7 +1343,7 @@ void Player::SendTeleportAckPacket()
|
||||
data << GetPackGUID();
|
||||
data << GetSession()->GetOrderCounter(); // movement counter
|
||||
BuildMovementPacket(&data);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
GetSession()->IncrementOrderCounter();
|
||||
}
|
||||
|
||||
@ -1549,6 +1550,8 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
||||
//remove auras before removing from map...
|
||||
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CHANGE_MAP | AURA_INTERRUPT_FLAG_MOVE | AURA_INTERRUPT_FLAG_TURNING);
|
||||
|
||||
SetMapChangeOrderCounter();
|
||||
|
||||
if (!GetSession()->PlayerLogout())
|
||||
{
|
||||
// send transfer packets
|
||||
@ -1557,7 +1560,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
||||
if (m_transport)
|
||||
data << m_transport->GetEntry() << GetMapId();
|
||||
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
// remove from old map now
|
||||
@ -1579,7 +1582,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
||||
else
|
||||
data << teleportStore_dest.PositionXYZOStream();
|
||||
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
SendSavedInstances();
|
||||
}
|
||||
|
||||
@ -2361,7 +2364,7 @@ void Player::SendLogXPGain(uint32 GivenXP, Unit* victim, uint32 BonusXP, bool re
|
||||
}
|
||||
|
||||
data << uint8(recruitAFriend ? 1 : 0); // does the GivenXP include a RaF bonus?
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::GiveXP(uint32 xp, Unit* victim, float group_rate, bool isLFGReward)
|
||||
@ -2838,7 +2841,7 @@ void Player::SendInitialSpells()
|
||||
data << uint32(itr->second.category ? cooldown : 0); // category cooldown
|
||||
}
|
||||
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::RemoveMail(uint32 id)
|
||||
@ -2867,7 +2870,7 @@ void Player::SendMailResult(uint32 mailId, MailResponseType mailAction, MailResp
|
||||
data << (uint32) item_guid; // item guid low?
|
||||
data << (uint32) item_count; // item count?
|
||||
}
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SendNewMail()
|
||||
@ -2875,7 +2878,7 @@ void Player::SendNewMail()
|
||||
// deliver undelivered mail
|
||||
WorldPacket data(SMSG_RECEIVED_MAIL, 4);
|
||||
data << (uint32) 0;
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::AddNewMailDeliverTime(time_t deliver_time)
|
||||
@ -3033,13 +3036,13 @@ void Player::SendLearnPacket(uint32 spellId, bool learn)
|
||||
WorldPacket data(SMSG_LEARNED_SPELL, 6);
|
||||
data << uint32(spellId);
|
||||
data << uint16(0);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
else
|
||||
{
|
||||
WorldPacket data(SMSG_REMOVED_SPELL, 4);
|
||||
data << uint32(spellId);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3071,7 +3074,7 @@ bool Player::addSpell(uint32 spellId, uint8 addSpecMask, bool updateActive, bool
|
||||
WorldPacket data(SMSG_SUPERCEDED_SPELL, 4 + 4);
|
||||
data << uint32(nextSpellInfo->Id);
|
||||
data << uint32(spellInfo->Id);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -4424,7 +4427,7 @@ void Player::SetMovement(PlayerMovementType pType)
|
||||
}
|
||||
data << guid;
|
||||
data << GetSession()->GetOrderCounter(); // movement counter
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
GetSession()->IncrementOrderCounter();
|
||||
}
|
||||
|
||||
@ -4436,7 +4439,7 @@ void Player::BuildPlayerRepop()
|
||||
{
|
||||
WorldPacket data(SMSG_PRE_RESURRECT, GetPackGUID().size());
|
||||
data << GetPackGUID();
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
if (getRace(true) == RACE_NIGHTELF)
|
||||
{
|
||||
CastSpell(this, 20584, true);
|
||||
@ -4491,7 +4494,7 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
|
||||
data << float(0);
|
||||
data << float(0);
|
||||
data << float(0);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
|
||||
// speed change, land walk
|
||||
|
||||
@ -4978,7 +4981,7 @@ void Player::RepopAtGraveyard()
|
||||
data << ClosestGrave->x;
|
||||
data << ClosestGrave->y;
|
||||
data << ClosestGrave->z;
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
else if (GetPositionZ() < GetMap()->GetMinHeight(GetPositionX(), GetPositionY()))
|
||||
@ -5588,7 +5591,7 @@ void Player::SendActionButtons(uint32 state) const
|
||||
}
|
||||
}
|
||||
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
LOG_DEBUG("entities.player", "Action Buttons for {} spec {} Sent", GetGUID().ToString(), m_activeSpec);
|
||||
}
|
||||
|
||||
@ -6215,7 +6218,7 @@ bool Player::RewardHonor(Unit* uVictim, uint32 groupsize, int32 honor, bool awar
|
||||
|
||||
// Xinef: non quest case, quest honor obtain is send in quest reward packet
|
||||
if (uVictim || groupsize > 0)
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
|
||||
// add honor points
|
||||
ModifyHonorPoints(honor);
|
||||
@ -6408,7 +6411,7 @@ void Player::CheckDuelDistance(time_t currTime)
|
||||
duel->OutOfBoundsTime = currTime + 10;
|
||||
|
||||
WorldPacket data(SMSG_DUEL_OUTOFBOUNDS, 0);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -6418,7 +6421,7 @@ void Player::CheckDuelDistance(time_t currTime)
|
||||
duel->OutOfBoundsTime = 0;
|
||||
|
||||
WorldPacket data(SMSG_DUEL_INBOUNDS, 0);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
else if (currTime >= duel->OutOfBoundsTime)
|
||||
DuelComplete(DUEL_FLED);
|
||||
@ -6593,13 +6596,13 @@ void Player::_ApplyItemMods(Item* item, uint8 slot, bool apply)
|
||||
|
||||
LOG_DEBUG("entities.player", "applying mods for item {} ", item->GetGUID().ToString());
|
||||
|
||||
uint8 attacktype = Player::GetAttackBySlot(slot);
|
||||
WeaponAttackType attacktype = Player::GetAttackBySlot(slot);
|
||||
|
||||
if (item->HasSocket()) //only (un)equipping of items with sockets can influence metagems, so no need to waste time with normal items
|
||||
CorrectMetaGemEnchants(slot, apply);
|
||||
|
||||
if (attacktype < MAX_ATTACK)
|
||||
_ApplyWeaponDependentAuraMods(item, WeaponAttackType(attacktype), apply);
|
||||
_ApplyWeaponDependentAuraMods(item, attacktype, apply);
|
||||
|
||||
_ApplyItemBonuses(proto, slot, apply);
|
||||
|
||||
@ -6886,7 +6889,7 @@ void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply
|
||||
if (proto->ArcaneRes)
|
||||
HandleStatModifier(UNIT_MOD_RESISTANCE_ARCANE, BASE_VALUE, float(proto->ArcaneRes), apply);
|
||||
|
||||
uint8 attType = Player::GetAttackBySlot(slot);
|
||||
WeaponAttackType attType = Player::GetAttackBySlot(slot);
|
||||
if (attType != MAX_ATTACK)
|
||||
{
|
||||
_ApplyWeaponDamage(slot, proto, ssv, apply);
|
||||
@ -6933,7 +6936,7 @@ void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const* proto, ScalingSt
|
||||
ssv = ScalingStatValue ? sScalingStatValuesStore.LookupEntry(ssd_level) : nullptr;
|
||||
}
|
||||
|
||||
uint8 attType = Player::GetAttackBySlot(slot);
|
||||
WeaponAttackType attType = Player::GetAttackBySlot(slot);
|
||||
if (!IsInFeralForm() && apply && !CanUseAttackType(attType))
|
||||
{
|
||||
return;
|
||||
@ -6964,12 +6967,12 @@ void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const* proto, ScalingSt
|
||||
|
||||
if (minDamage > 0.f)
|
||||
{
|
||||
SetBaseWeaponDamage(WeaponAttackType(attType), MINDAMAGE, minDamage, i);
|
||||
SetBaseWeaponDamage(attType, MINDAMAGE, minDamage, i);
|
||||
}
|
||||
|
||||
if (maxDamage > 0.f)
|
||||
{
|
||||
SetBaseWeaponDamage(WeaponAttackType(attType), MAXDAMAGE, maxDamage, i);
|
||||
SetBaseWeaponDamage(attType, MAXDAMAGE, maxDamage, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6978,8 +6981,8 @@ void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const* proto, ScalingSt
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ITEM_PROTO_DAMAGES; ++i)
|
||||
{
|
||||
SetBaseWeaponDamage(WeaponAttackType(attType), MINDAMAGE, 0.f, i);
|
||||
SetBaseWeaponDamage(WeaponAttackType(attType), MAXDAMAGE, 0.f, i);
|
||||
SetBaseWeaponDamage(attType, MINDAMAGE, 0.f, i);
|
||||
SetBaseWeaponDamage(attType, MAXDAMAGE, 0.f, i);
|
||||
}
|
||||
|
||||
if (attType == BASE_ATTACK)
|
||||
@ -7003,8 +7006,8 @@ void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const* proto, ScalingSt
|
||||
if (IsInFeralForm())
|
||||
return;
|
||||
|
||||
if (CanModifyStats() && (GetWeaponDamageRange(WeaponAttackType(attType), MAXDAMAGE) || proto->Delay))
|
||||
UpdateDamagePhysical(WeaponAttackType(attType));
|
||||
if (CanModifyStats() && (GetWeaponDamageRange(attType, MAXDAMAGE) || proto->Delay))
|
||||
UpdateDamagePhysical(attType);
|
||||
}
|
||||
|
||||
void Player::CastAllObtainSpells()
|
||||
@ -7597,9 +7600,9 @@ void Player::_RemoveAllItemMods()
|
||||
if (!proto)
|
||||
continue;
|
||||
|
||||
uint32 attacktype = Player::GetAttackBySlot(i);
|
||||
WeaponAttackType attacktype = Player::GetAttackBySlot(i);
|
||||
if (attacktype < MAX_ATTACK)
|
||||
_ApplyWeaponDependentAuraMods(m_items[i], WeaponAttackType(attacktype), false);
|
||||
_ApplyWeaponDependentAuraMods(m_items[i], attacktype, false);
|
||||
|
||||
_ApplyItemBonuses(proto, i, false);
|
||||
|
||||
@ -7626,9 +7629,9 @@ void Player::_ApplyAllItemMods()
|
||||
if (!proto)
|
||||
continue;
|
||||
|
||||
uint32 attacktype = Player::GetAttackBySlot(i);
|
||||
WeaponAttackType attacktype = Player::GetAttackBySlot(i);
|
||||
if (attacktype < MAX_ATTACK)
|
||||
_ApplyWeaponDependentAuraMods(m_items[i], WeaponAttackType(attacktype), true);
|
||||
_ApplyWeaponDependentAuraMods(m_items[i], attacktype, true);
|
||||
|
||||
_ApplyItemBonuses(proto, i, true);
|
||||
|
||||
@ -7781,7 +7784,7 @@ void Player::SendQuestGiverStatusMultiple()
|
||||
});
|
||||
|
||||
data.put<uint32>(0, count); // write real count
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
/* If in a battleground a player dies, and an enemy removes the insignia, the player's bones is lootable
|
||||
@ -8228,14 +8231,14 @@ void Player::SendLootError(ObjectGuid guid, LootError error)
|
||||
void Player::SendNotifyLootMoneyRemoved()
|
||||
{
|
||||
WorldPacket data(SMSG_LOOT_CLEAR_MONEY, 0);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SendNotifyLootItemRemoved(uint8 lootSlot)
|
||||
{
|
||||
WorldPacket data(SMSG_LOOT_REMOVED, 1);
|
||||
data << uint8(lootSlot);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
// TODO - InitWorldStates should NOT always send the same states
|
||||
@ -8940,7 +8943,7 @@ void Player::SetBindPoint(ObjectGuid guid)
|
||||
{
|
||||
WorldPacket data(SMSG_BINDER_CONFIRM, 8);
|
||||
data << guid;
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SendTalentWipeConfirm(ObjectGuid guid)
|
||||
@ -8949,7 +8952,7 @@ void Player::SendTalentWipeConfirm(ObjectGuid guid)
|
||||
data << guid;
|
||||
uint32 cost = sWorld->getBoolConfig(CONFIG_NO_RESET_TALENT_COST) ? 0 : resetTalentsCost();
|
||||
data << cost;
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::ResetPetTalents()
|
||||
@ -9212,7 +9215,7 @@ void Player::RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent)
|
||||
{
|
||||
WorldPacket data(SMSG_PET_SPELLS, 8);
|
||||
data << uint64(0);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
|
||||
if (GetGroup())
|
||||
SetGroupUpdateFlag(GROUP_UPDATE_PET);
|
||||
@ -9499,14 +9502,14 @@ void Player::Whisper(std::string_view text, Language language, Player* target, b
|
||||
|
||||
WorldPacket data;
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_WHISPER, language, this, this, _text);
|
||||
target->GetSession()->SendPacket(&data);
|
||||
target->SendDirectMessage(&data);
|
||||
|
||||
// rest stuff shouldn't happen in case of addon message
|
||||
if (isAddonMessage)
|
||||
return;
|
||||
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_WHISPER_INFORM, Language(language), target, target, _text);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
|
||||
if (!isAcceptWhispers() && !IsGameMaster() && !target->IsGameMaster())
|
||||
{
|
||||
@ -9615,7 +9618,7 @@ void Player::PetSpellInitialize()
|
||||
data << uint32(category ? cooldown : 0); // category cooldown
|
||||
}
|
||||
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::PossessSpellInitialize()
|
||||
@ -9643,7 +9646,7 @@ void Player::PossessSpellInitialize()
|
||||
data << uint8(0); // spells count
|
||||
data << uint8(0); // cooldowns count
|
||||
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::VehicleSpellInitialize()
|
||||
@ -9718,7 +9721,7 @@ void Player::VehicleSpellInitialize()
|
||||
data << uint32(category ? cooldown : 0); // category cooldown
|
||||
}
|
||||
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::CharmSpellInitialize()
|
||||
@ -9772,14 +9775,14 @@ void Player::CharmSpellInitialize()
|
||||
|
||||
data << uint8(0); // cooldowns count
|
||||
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SendRemoveControlBar()
|
||||
{
|
||||
WorldPacket data(SMSG_PET_SPELLS, 8);
|
||||
data << uint64(0);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
bool Player::HasSpellMod(SpellModifier* mod, Spell* spell)
|
||||
@ -10129,7 +10132,7 @@ void Player::SendProficiency(ItemClass itemClass, uint32 itemSubclassMask)
|
||||
{
|
||||
WorldPacket data(SMSG_SET_PROFICIENCY, 1 + 4);
|
||||
data << uint8(itemClass) << uint32(itemSubclassMask);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::RemovePetitionsAndSigns(ObjectGuid guid, uint32 type)
|
||||
@ -10581,7 +10584,7 @@ void Player::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs)
|
||||
if (!cooldowns.empty())
|
||||
{
|
||||
BuildCooldownPacket(data, SPELL_COOLDOWN_FLAG_NONE, cooldowns);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -10701,7 +10704,7 @@ inline bool Player::_StoreOrEquipNewItem(uint32 vendorslot, uint32 item, uint8 c
|
||||
data << uint32(vendorslot + 1); // numbered from 1 at client
|
||||
data << int32(crItem->maxcount > 0 ? new_count : 0xFFFFFFFF);
|
||||
data << uint32(count);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
SendNewItem(it, pProto->BuyCount * count, true, false, false);
|
||||
|
||||
if (!bStore)
|
||||
@ -11118,7 +11121,7 @@ void Player::ModifySpellCooldown(uint32 spellId, int32 cooldown)
|
||||
data << uint32(spellId); // Spell ID
|
||||
data << GetGUID(); // Player GUID
|
||||
data << int32(cooldown); // Cooldown mod in milliseconds
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SendCooldownEvent(SpellInfo const* spellInfo, uint32 itemId /*= 0*/, Spell* spell /*= nullptr*/, bool setCooldown /*= true*/)
|
||||
@ -11594,7 +11597,7 @@ void Player::SendInitialPacketsBeforeAddToMap()
|
||||
data << m_homebindX << m_homebindY << m_homebindZ;
|
||||
data << (uint32) m_homebindMapId;
|
||||
data << (uint32) m_homebindAreaId;
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
|
||||
// SMSG_SET_PROFICIENCY
|
||||
// SMSG_SET_PCT_SPELL_MODIFIER
|
||||
@ -11607,13 +11610,13 @@ void Player::SendInitialPacketsBeforeAddToMap()
|
||||
data.Initialize(SMSG_INSTANCE_DIFFICULTY, 4 + 4);
|
||||
data << uint32(GetMap()->GetDifficulty());
|
||||
data << uint32(GetMap()->GetEntry()->IsDynamicDifficultyMap() && GetMap()->IsHeroic()); // Raid dynamic difficulty
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
|
||||
SendInitialSpells();
|
||||
|
||||
data.Initialize(SMSG_SEND_UNLEARN_SPELLS, 4);
|
||||
data << uint32(0); // count, for (count) uint32;
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
|
||||
SendInitialActionButtons();
|
||||
m_reputationMgr->SendInitialReputations();
|
||||
@ -11625,7 +11628,7 @@ void Player::SendInitialPacketsBeforeAddToMap()
|
||||
data.AppendPackedTime(GameTime::GetGameTime().count());
|
||||
data << float(0.01666667f); // game speed
|
||||
data << uint32(0); // added in 3.1.2
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
|
||||
GetReputationMgr().SendForceReactions(); // SMSG_SET_FORCED_REACTIONS
|
||||
|
||||
@ -11777,7 +11780,7 @@ void Player::SendTransferAborted(uint32 mapid, TransferAbortReason reason, uint8
|
||||
default:
|
||||
break;
|
||||
}
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SendInstanceResetWarning(uint32 mapid, Difficulty difficulty, uint32 time, bool onEnterMap)
|
||||
@ -11812,7 +11815,7 @@ void Player::SendInstanceResetWarning(uint32 mapid, Difficulty difficulty, uint3
|
||||
data << uint8(bind && bind->perm); // is locked
|
||||
data << uint8(bind && bind->extended); // is extended, ignored if prev field is 0
|
||||
}
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::ApplyEquipCooldown(Item* pItem)
|
||||
@ -11859,7 +11862,7 @@ void Player::ApplyEquipCooldown(Item* pItem)
|
||||
WorldPacket data(SMSG_ITEM_COOLDOWN, 12);
|
||||
data << pItem->GetGUID();
|
||||
data << uint32(spellData.SpellId);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -12131,7 +12134,7 @@ void Player::GetAurasForTarget(Unit* target, bool force /*= false*/)
|
||||
auraApp->BuildUpdatePacket(data, false);
|
||||
}
|
||||
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SetDailyQuestStatus(uint32 quest_id)
|
||||
@ -12901,7 +12904,7 @@ void Player::SetClientControl(Unit* target, bool allowMove, bool packetOnly /*=
|
||||
WorldPacket data(SMSG_CLIENT_CONTROL_UPDATE, target->GetPackGUID().size() + 1);
|
||||
data << target->GetPackGUID();
|
||||
data << uint8((allowMove && !target->HasUnitState(UNIT_STATE_FLEEING | UNIT_STATE_CONFUSED)) ? 1 : 0);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
|
||||
// We want to set the packet only
|
||||
if (packetOnly)
|
||||
@ -13022,7 +13025,7 @@ void Player::SendCorpseReclaimDelay(uint32 delay)
|
||||
{
|
||||
WorldPacket data(SMSG_CORPSE_RECLAIM_DELAY, 4);
|
||||
data << uint32(delay);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
Player* Player::GetNextRandomRaidMember(float radius)
|
||||
@ -13249,7 +13252,7 @@ void Player::SetViewpoint(WorldObject* target, bool apply)
|
||||
SetSeer(this);
|
||||
|
||||
//WorldPacket data(SMSG_CLEAR_FAR_SIGHT_IMMEDIATE, 0);
|
||||
//GetSession()->SendPacket(&data);
|
||||
//SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -13405,7 +13408,7 @@ void Player::SetTitle(CharTitlesEntry const* title, bool lost)
|
||||
WorldPacket data(SMSG_TITLE_EARNED, 4 + 4);
|
||||
data << uint32(title->bit_index);
|
||||
data << uint32(lost ? 0 : 1); // 1 - earned, 0 - lost
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
|
||||
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK);
|
||||
}
|
||||
@ -13465,7 +13468,7 @@ void Player::ConvertRune(uint8 index, RuneType newType)
|
||||
WorldPacket data(SMSG_CONVERT_RUNE, 2);
|
||||
data << uint8(index);
|
||||
data << uint8(newType);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::ResyncRunes(uint8 count)
|
||||
@ -13477,14 +13480,14 @@ void Player::ResyncRunes(uint8 count)
|
||||
data << uint8(GetCurrentRune(i)); // rune type
|
||||
data << uint8(255 - (GetRuneCooldown(i) * 51)); // passed cooldown time (0-255)
|
||||
}
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::AddRunePower(uint8 index)
|
||||
{
|
||||
WorldPacket data(SMSG_ADD_RUNE_POWER, 4);
|
||||
data << uint32(1 << index); // mask (0x00-0x3F probably)
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
static RuneType runeSlotTypes[MAX_RUNES] =
|
||||
@ -14542,7 +14545,7 @@ void Player::SendTalentsInfoData(bool pet)
|
||||
BuildPetTalentsInfoData(&data);
|
||||
else
|
||||
BuildPlayerTalentsInfoData(&data);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::BuildEnchantmentsInfoData(WorldPacket* data)
|
||||
@ -14615,7 +14618,7 @@ void Player::SendEquipmentSetList()
|
||||
++count; // client have limit but it checked at loading and set
|
||||
}
|
||||
data.put<uint32>(count_pos, count);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SetEquipmentSet(uint32 index, EquipmentSet eqset)
|
||||
@ -14653,7 +14656,7 @@ void Player::SetEquipmentSet(uint32 index, EquipmentSet eqset)
|
||||
WorldPacket data(SMSG_EQUIPMENT_SET_SAVED, 4 + 1);
|
||||
data << uint32(index);
|
||||
data.appendPackGUID(eqslot.Guid);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
eqslot.state = old_state == EQUIPMENT_SET_NEW ? EQUIPMENT_SET_NEW : EQUIPMENT_SET_CHANGED;
|
||||
@ -15464,7 +15467,7 @@ void Player::SendDuelCountdown(uint32 counter)
|
||||
{
|
||||
WorldPacket data(SMSG_DUEL_COUNTDOWN, 4);
|
||||
data << uint32(counter); // seconds
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SetIsSpectator(bool on)
|
||||
@ -15668,7 +15671,7 @@ void Player::SendRefundInfo(Item* item)
|
||||
}
|
||||
data << uint32(0);
|
||||
data << uint32(GetTotalPlayedTime() - item->GetPlayedTime());
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
bool Player::AddItem(uint32 itemId, uint32 count)
|
||||
@ -15716,7 +15719,7 @@ void Player::RefundItem(Item* item)
|
||||
WorldPacket data(SMSG_ITEM_REFUND_RESULT, 8 + 4);
|
||||
data << item->GetGUID(); // Guid
|
||||
data << uint32(10); // Error!
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -15757,7 +15760,7 @@ void Player::RefundItem(Item* item)
|
||||
WorldPacket data(SMSG_ITEM_REFUND_RESULT, 8 + 4);
|
||||
data << item->GetGUID(); // Guid
|
||||
data << uint32(10); // Error!
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -15772,7 +15775,7 @@ void Player::RefundItem(Item* item)
|
||||
data << uint32(iece->reqitem[i]);
|
||||
data << uint32(iece->reqitemcount[i]);
|
||||
}
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
|
||||
uint32 moneyRefund = item->GetPaidMoney(); // item-> will be invalidated in DestroyItem
|
||||
|
||||
|
||||
@ -1257,7 +1257,7 @@ public:
|
||||
bool HasWeapon(WeaponAttackType type) const override { return GetWeaponForAttack(type, false); }
|
||||
bool HasWeaponForAttack(WeaponAttackType type) const override { return (Unit::HasWeaponForAttack(type) && GetWeaponForAttack(type, true)); }
|
||||
[[nodiscard]] Item* GetShield(bool useable = false) const;
|
||||
static uint8 GetAttackBySlot(uint8 slot); // MAX_ATTACK if not weapon slot
|
||||
static WeaponAttackType GetAttackBySlot(uint8 slot); // MAX_ATTACK if not weapon slot
|
||||
std::vector<Item*>& GetItemUpdateQueue() { return m_itemUpdateQueue; }
|
||||
static bool IsInventoryPos(uint16 pos) { return IsInventoryPos(pos >> 8, pos & 255); }
|
||||
static bool IsInventoryPos(uint8 bag, uint8 slot);
|
||||
@ -2633,8 +2633,14 @@ public:
|
||||
|
||||
std::string GetDebugInfo() const override;
|
||||
|
||||
bool IsExpectingChangeTransport() const { return m_expectingChangeTransport; }
|
||||
void SetExpectingChangeTransport(bool state) { m_expectingChangeTransport = state; }
|
||||
bool IsExpectingChangeTransport() const { return _expectingChangeTransport; }
|
||||
void SetExpectingChangeTransport(bool state) { _expectingChangeTransport = state; }
|
||||
|
||||
uint32 GetPendingFlightChange() const { return _pendingFlightChangeCounter; }
|
||||
void SetPendingFlightChange(uint32 counter) { _pendingFlightChangeCounter = counter; }
|
||||
|
||||
void SetMapChangeOrderCounter() { _mapChangeOrderCounter = GetSession()->GetOrderCounter(); }
|
||||
uint32 GetMapChangeOrderCounter() { return _mapChangeOrderCounter; }
|
||||
|
||||
/*********************************************************/
|
||||
/*** SPELL QUEUE SYSTEM ***/
|
||||
@ -3017,7 +3023,9 @@ private:
|
||||
|
||||
Seconds m_creationTime;
|
||||
|
||||
bool m_expectingChangeTransport;
|
||||
bool _expectingChangeTransport;
|
||||
uint32 _pendingFlightChangeCounter;
|
||||
uint32 _mapChangeOrderCounter;
|
||||
};
|
||||
|
||||
void AddItemsSetItem(Player* player, Item* item);
|
||||
|
||||
@ -78,7 +78,7 @@ bool Player::CanSpeak() const
|
||||
void Player::SendAttackSwingNotInRange()
|
||||
{
|
||||
WorldPacket data(SMSG_ATTACKSWING_NOTINRANGE, 0);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SavePositionInDB(uint32 mapid, float x, float y, float z, float o, uint32 zone, ObjectGuid guid)
|
||||
@ -128,25 +128,25 @@ void Player::Customize(CharacterCustomizeInfo const* customizeInfo, CharacterDat
|
||||
void Player::SendAttackSwingDeadTarget()
|
||||
{
|
||||
WorldPacket data(SMSG_ATTACKSWING_DEADTARGET, 0);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SendAttackSwingCantAttack()
|
||||
{
|
||||
WorldPacket data(SMSG_ATTACKSWING_CANT_ATTACK, 0);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SendAttackSwingCancelAttack()
|
||||
{
|
||||
WorldPacket data(SMSG_CANCEL_COMBAT, 0);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SendAttackSwingBadFacingAttack()
|
||||
{
|
||||
WorldPacket data(SMSG_ATTACKSWING_BADFACING, 0);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SendAutoRepeatCancel(Unit* target)
|
||||
@ -161,7 +161,7 @@ void Player::SendExplorationExperience(uint32 Area, uint32 Experience)
|
||||
WorldPacket data(SMSG_EXPLORATION_EXPERIENCE, 8);
|
||||
data << uint32(Area);
|
||||
data << uint32(Experience);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SendDungeonDifficulty(bool IsInGroup)
|
||||
@ -171,7 +171,7 @@ void Player::SendDungeonDifficulty(bool IsInGroup)
|
||||
data << (uint32)GetDungeonDifficulty();
|
||||
data << uint32(val);
|
||||
data << uint32(IsInGroup);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SendRaidDifficulty(bool IsInGroup, int32 forcedDifficulty)
|
||||
@ -181,14 +181,14 @@ void Player::SendRaidDifficulty(bool IsInGroup, int32 forcedDifficulty)
|
||||
data << uint32(forcedDifficulty == -1 ? GetRaidDifficulty() : forcedDifficulty);
|
||||
data << uint32(val);
|
||||
data << uint32(IsInGroup);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SendResetFailedNotify(uint32 mapid)
|
||||
{
|
||||
WorldPacket data(SMSG_RESET_FAILED_NOTIFY, 4);
|
||||
data << uint32(mapid);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
/// Reset all solo instances and optionally send a message on success for each
|
||||
@ -327,7 +327,7 @@ void Player::SendResetInstanceSuccess(uint32 MapId)
|
||||
{
|
||||
WorldPacket data(SMSG_INSTANCE_RESET, 4);
|
||||
data << uint32(MapId);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SendResetInstanceFailed(uint32 reason, uint32 MapId)
|
||||
@ -340,7 +340,7 @@ void Player::SendResetInstanceFailed(uint32 reason, uint32 MapId)
|
||||
WorldPacket data(SMSG_INSTANCE_RESET_FAILED, 4);
|
||||
data << uint32(reason);
|
||||
data << uint32(MapId);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
/*********************************************************/
|
||||
|
||||
@ -990,7 +990,7 @@ bool Player::SatisfyQuestLog(bool msg)
|
||||
if (msg)
|
||||
{
|
||||
WorldPacket data(SMSG_QUESTLOG_FULL, 0);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTLOG_FULL");
|
||||
}
|
||||
return false;
|
||||
@ -2349,7 +2349,7 @@ void Player::SendQuestComplete(uint32 quest_id)
|
||||
{
|
||||
WorldPacket data(SMSG_QUESTUPDATE_COMPLETE, 4);
|
||||
data << uint32(quest_id);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTUPDATE_COMPLETE quest = {}", quest_id);
|
||||
}
|
||||
}
|
||||
@ -2376,7 +2376,7 @@ void Player::SendQuestReward(Quest const* quest, uint32 XP)
|
||||
data << uint32(10 * quest->CalculateHonorGain(GetQuestLevel(quest)));
|
||||
data << uint32(quest->GetBonusTalents()); // bonus talents
|
||||
data << uint32(quest->GetRewArenaPoints());
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SendQuestFailed(uint32 questId, InventoryResult reason)
|
||||
@ -2386,7 +2386,7 @@ void Player::SendQuestFailed(uint32 questId, InventoryResult reason)
|
||||
WorldPacket data(SMSG_QUESTGIVER_QUEST_FAILED, 4 + 4);
|
||||
data << uint32(questId);
|
||||
data << uint32(reason); // failed reason (valid reasons: 4, 16, 50, 17, 74, other values show default message)
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_QUEST_FAILED");
|
||||
}
|
||||
}
|
||||
@ -2397,7 +2397,7 @@ void Player::SendQuestTimerFailed(uint32 quest_id)
|
||||
{
|
||||
WorldPacket data(SMSG_QUESTUPDATE_FAILEDTIMER, 4);
|
||||
data << uint32(quest_id);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTUPDATE_FAILEDTIMER");
|
||||
}
|
||||
}
|
||||
@ -2406,7 +2406,7 @@ void Player::SendCanTakeQuestResponse(uint32 msg) const
|
||||
{
|
||||
WorldPacket data(SMSG_QUESTGIVER_QUEST_INVALID, 4);
|
||||
data << uint32(msg);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_QUEST_INVALID");
|
||||
}
|
||||
|
||||
@ -2426,7 +2426,7 @@ void Player::SendQuestConfirmAccept(const Quest* quest, Player* pReceiver)
|
||||
data << uint32(quest->GetQuestId());
|
||||
data << quest->GetTitle();
|
||||
data << GetGUID();
|
||||
pReceiver->GetSession()->SendPacket(&data);
|
||||
pReceiver->SendDirectMessage(&data);
|
||||
|
||||
LOG_DEBUG("network", "WORLD: Sent SMSG_QUEST_CONFIRM_ACCEPT");
|
||||
}
|
||||
@ -2439,7 +2439,7 @@ void Player::SendPushToPartyResponse(Player const* player, uint8 msg) const
|
||||
WorldPacket data(MSG_QUEST_PUSH_RESULT, (8 + 1));
|
||||
data << player->GetGUID();
|
||||
data << uint8(msg); // valid values: 0-8
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
LOG_DEBUG("network", "WORLD: Sent MSG_QUEST_PUSH_RESULT");
|
||||
}
|
||||
}
|
||||
@ -2450,7 +2450,7 @@ void Player::SendQuestUpdateAddItem(Quest const* /*quest*/, uint32 /*item_idx*/,
|
||||
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTUPDATE_ADD_ITEM");
|
||||
//data << quest->RequiredItemId[item_idx];
|
||||
//data << count;
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SendQuestUpdateAddCreatureOrGo(Quest const* quest, ObjectGuid guid, uint32 creatureOrGO_idx, uint16 old_count, uint16 add_count)
|
||||
@ -2469,7 +2469,7 @@ void Player::SendQuestUpdateAddCreatureOrGo(Quest const* quest, ObjectGuid guid,
|
||||
data << uint32(old_count + add_count);
|
||||
data << uint32(quest->RequiredNpcOrGoCount[ creatureOrGO_idx ]);
|
||||
data << guid;
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
|
||||
uint16 log_slot = FindQuestSlot(quest->GetQuestId());
|
||||
if (log_slot < MAX_QUEST_LOG_SIZE)
|
||||
@ -2485,7 +2485,7 @@ void Player::SendQuestUpdateAddPlayer(Quest const* quest, uint16 old_count, uint
|
||||
data << uint32(quest->GetQuestId());
|
||||
data << uint32(old_count + add_count);
|
||||
data << uint32(quest->GetPlayersSlain());
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
|
||||
uint16 log_slot = FindQuestSlot(quest->GetQuestId());
|
||||
if (log_slot < MAX_QUEST_LOG_SIZE)
|
||||
|
||||
@ -51,6 +51,7 @@
|
||||
#include "QuestDef.h"
|
||||
#include "ReputationMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptObjectFwd.h"
|
||||
#include "SocialMgr.h"
|
||||
#include "Spell.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
@ -539,7 +540,7 @@ Item* Player::GetShield(bool useable) const
|
||||
return item;
|
||||
}
|
||||
|
||||
uint8 Player::GetAttackBySlot(uint8 slot)
|
||||
WeaponAttackType Player::GetAttackBySlot(uint8 slot)
|
||||
{
|
||||
switch (slot)
|
||||
{
|
||||
@ -2757,7 +2758,7 @@ Item* Player::EquipItem(uint16 pos, Item* pItem, bool update)
|
||||
|
||||
WorldPacket data;
|
||||
BuildCooldownPacket(data, SPELL_COOLDOWN_FLAG_INCLUDE_GCD, cooldownSpell, 0);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4051,7 +4052,7 @@ void Player::SendEquipError(InventoryResult msg, Item* pItem, Item* pItem2, uint
|
||||
break;
|
||||
}
|
||||
}
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SendBuyError(BuyResult msg, Creature* creature, uint32 item, uint32 param)
|
||||
@ -4063,7 +4064,7 @@ void Player::SendBuyError(BuyResult msg, Creature* creature, uint32 item, uint32
|
||||
if (param > 0)
|
||||
data << uint32(param);
|
||||
data << uint8(msg);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::SendSellError(SellResult msg, Creature* creature, ObjectGuid guid, uint32 param)
|
||||
@ -4075,7 +4076,7 @@ void Player::SendSellError(SellResult msg, Creature* creature, ObjectGuid guid,
|
||||
if (param > 0)
|
||||
data << uint32(param);
|
||||
data << uint8(msg);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::TradeCancel(bool sendback, TradeStatus status /*= TRADE_STATUS_TRADE_CANCELED*/)
|
||||
@ -4770,7 +4771,7 @@ void Player::SendNewItem(Item* item, uint32 count, bool received, bool created,
|
||||
if (broadcast && GetGroup())
|
||||
GetGroup()->BroadcastPacket(&data, true);
|
||||
else
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
/*********************************************************/
|
||||
@ -6520,7 +6521,7 @@ void Player::BindToInstance()
|
||||
|
||||
WorldPacket data(SMSG_INSTANCE_SAVE_CREATED, 4);
|
||||
data << uint32(0);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
sInstanceSaveMgr->PlayerBindToInstance(this->GetGUID(), mapSave, true, this);
|
||||
}
|
||||
|
||||
@ -6555,7 +6556,7 @@ void Player::SendRaidInfo()
|
||||
}
|
||||
}
|
||||
data.put<uint32>(p_counter, counter);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -6582,7 +6583,7 @@ void Player::SendSavedInstances()
|
||||
//Send opcode 811. true or false means, whether you have current raid/heroic instances
|
||||
data.Initialize(SMSG_UPDATE_INSTANCE_OWNERSHIP);
|
||||
data << uint32(hasBeenSaved);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
|
||||
if (!hasBeenSaved)
|
||||
return;
|
||||
@ -6596,7 +6597,7 @@ void Player::SendSavedInstances()
|
||||
{
|
||||
data.Initialize(SMSG_UPDATE_LAST_INSTANCE);
|
||||
data << uint32(itr->second.save->GetMapId());
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1401,7 +1401,7 @@ void Player::UpdateHomebindTime(uint32 time)
|
||||
WorldPacket data(SMSG_RAID_GROUP_ONLY, 4 + 4);
|
||||
data << uint32(0);
|
||||
data << uint32(0);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
// instance is valid, reset homebind timer
|
||||
m_HomebindTimer = 0;
|
||||
@ -1424,7 +1424,7 @@ void Player::UpdateHomebindTime(uint32 time)
|
||||
WorldPacket data(SMSG_RAID_GROUP_ONLY, 4 + 4);
|
||||
data << uint32(m_HomebindTimer);
|
||||
data << uint32(1);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendDirectMessage(&data);
|
||||
LOG_DEBUG(
|
||||
"maps",
|
||||
"PLAYER: Player '{}' ({}) will be teleported to homebind in 60 "
|
||||
@ -1771,7 +1771,7 @@ void Player::UpdateTriggerVisibility()
|
||||
|
||||
WorldPacket packet;
|
||||
udata.BuildPacket(packet);
|
||||
GetSession()->SendPacket(&packet);
|
||||
SendDirectMessage(&packet);
|
||||
}
|
||||
|
||||
void Player::UpdateForQuestWorldObjects()
|
||||
@ -1824,7 +1824,7 @@ void Player::UpdateForQuestWorldObjects()
|
||||
|
||||
WorldPacket packet;
|
||||
udata.BuildPacket(packet);
|
||||
GetSession()->SendPacket(&packet);
|
||||
SendDirectMessage(&packet);
|
||||
}
|
||||
|
||||
void Player::UpdateTitansGrip()
|
||||
|
||||
@ -172,7 +172,7 @@ void PlayerSocial::SendSocialList(Player* player, uint32 flags)
|
||||
}
|
||||
|
||||
data.put<uint32>(countPos, totalCount);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
LOG_DEBUG("network", "WORLD: Sent SMSG_CONTACT_LIST");
|
||||
}
|
||||
|
||||
@ -288,7 +288,7 @@ void SocialMgr::SendFriendStatus(Player* player, FriendsResult result, ObjectGui
|
||||
if (broadcast)
|
||||
BroadcastToFriendListers(player, &data);
|
||||
else
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void SocialMgr::BroadcastToFriendListers(Player* player, WorldPacket* packet)
|
||||
@ -311,7 +311,7 @@ void SocialMgr::BroadcastToFriendListers(Player* player, WorldPacket* packet)
|
||||
// PLAYER see his team only and PLAYER can't see MODERATOR, GAME MASTER, ADMINISTRATOR characters
|
||||
// MODERATOR, GAME MASTER, ADMINISTRATOR can see all
|
||||
if (pFriend && (!AccountMgr::IsPlayerAccount(pFriend->GetSession()->GetSecurity()) || ((pFriend->GetTeamId() == teamId || allowTwoSideWhoList) && security <= gmLevelInWhoList)) && player->IsVisibleGloballyFor(pFriend))
|
||||
pFriend->GetSession()->SendPacket(packet);
|
||||
pFriend->SendDirectMessage(packet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -8180,7 +8180,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
if (triggeredByAura->GetBase() && castItem->GetGUID() != triggeredByAura->GetBase()->GetCastItemGUID())
|
||||
return false;
|
||||
|
||||
WeaponAttackType attType = WeaponAttackType(player->GetAttackBySlot(castItem->GetSlot()));
|
||||
WeaponAttackType attType = player->GetAttackBySlot(castItem->GetSlot());
|
||||
if ((attType != BASE_ATTACK && attType != OFF_ATTACK)
|
||||
|| (attType == BASE_ATTACK && procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK)
|
||||
|| (attType == OFF_ATTACK && procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK))
|
||||
@ -8371,7 +8371,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
if (!IsPlayer() || !victim || !victim->IsAlive() || !castItem || !castItem->IsEquipped())
|
||||
return false;
|
||||
|
||||
WeaponAttackType attType = WeaponAttackType(Player::GetAttackBySlot(castItem->GetSlot()));
|
||||
WeaponAttackType attType = Player::GetAttackBySlot(castItem->GetSlot());
|
||||
if ((attType != BASE_ATTACK && attType != OFF_ATTACK)
|
||||
|| (attType == BASE_ATTACK && procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK)
|
||||
|| (attType == OFF_ATTACK && procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK))
|
||||
@ -13563,7 +13563,7 @@ void Unit::Mount(uint32 mount, uint32 VehicleId, uint32 creatureEntry)
|
||||
SendMessageToSet(&data, true);
|
||||
|
||||
data.Initialize(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
|
||||
// mounts can also have accessories
|
||||
GetVehicleKit()->InstallAllAccessories(false);
|
||||
@ -13591,7 +13591,7 @@ void Unit::Mount(uint32 mount, uint32 VehicleId, uint32 creatureEntry)
|
||||
data << GetPackGUID();
|
||||
data << player->GetSession()->GetOrderCounter(); // movement counter
|
||||
data << player->GetCollisionHeight();
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
player->GetSession()->IncrementOrderCounter();
|
||||
}
|
||||
|
||||
@ -13612,7 +13612,7 @@ void Unit::Dismount()
|
||||
data << GetPackGUID();
|
||||
data << player->GetSession()->GetOrderCounter(); // movement counter
|
||||
data << player->GetCollisionHeight();
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
player->GetSession()->IncrementOrderCounter();
|
||||
}
|
||||
|
||||
@ -16621,7 +16621,7 @@ void Unit::SendPetActionFeedback(uint8 msg) const
|
||||
|
||||
WorldPacket data(SMSG_PET_ACTION_FEEDBACK, 1);
|
||||
data << uint8(msg);
|
||||
owner->ToPlayer()->GetSession()->SendPacket(&data);
|
||||
owner->ToPlayer()->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Unit::SendPetActionSound(PetAction action) const
|
||||
@ -16644,7 +16644,7 @@ void Unit::SendPetAIReaction(ObjectGuid guid) const
|
||||
WorldPacket data(SMSG_AI_REACTION, 8 + 4);
|
||||
data << guid;
|
||||
data << uint32(AI_REACTION_HOSTILE);
|
||||
owner->ToPlayer()->GetSession()->SendPacket(&data);
|
||||
owner->ToPlayer()->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
///----------End of Pet responses methods----------
|
||||
@ -16750,7 +16750,7 @@ void Unit::SetStandState(uint8 state)
|
||||
{
|
||||
WorldPacket data(SMSG_STANDSTATE_UPDATE, 1);
|
||||
data << (uint8)state;
|
||||
ToPlayer()->GetSession()->SendPacket(&data);
|
||||
ToPlayer()->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -19191,7 +19191,7 @@ void Unit::KnockbackFrom(float x, float y, float speedXY, float speedZ)
|
||||
data << float(speedXY); // Horizontal speed
|
||||
data << float(-speedZ); // Z Movement speed (vertical)
|
||||
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
player->GetSession()->IncrementOrderCounter();
|
||||
|
||||
player->SetCanKnockback(true);
|
||||
@ -19291,7 +19291,7 @@ void Unit::JumpTo(float speedXY, float speedZ, bool forward)
|
||||
data << float(speedXY); // Horizontal speed
|
||||
data << float(-speedZ); // Z Movement speed (vertical)
|
||||
|
||||
ToPlayer()->GetSession()->SendPacket(&data);
|
||||
ToPlayer()->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -19449,7 +19449,7 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a
|
||||
bg->EventPlayerDroppedFlag(player);
|
||||
|
||||
WorldPacket data(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
ASSERT(!m_vehicle);
|
||||
@ -20404,11 +20404,12 @@ void Unit::SetCanFly(bool enable)
|
||||
if (Player const* player = GetClientControlling())
|
||||
{
|
||||
uint32 const counter = player->GetSession()->GetOrderCounter();
|
||||
const_cast<Player*>(player)->SetPendingFlightChange(counter);
|
||||
|
||||
WorldPacket data(enable ? SMSG_MOVE_SET_CAN_FLY : SMSG_MOVE_UNSET_CAN_FLY, GetPackGUID().size() + 4);
|
||||
data << GetPackGUID();
|
||||
data << counter;
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
player->GetSession()->IncrementOrderCounter();
|
||||
return;
|
||||
}
|
||||
@ -20444,7 +20445,7 @@ void Unit::SetFeatherFall(bool enable)
|
||||
|
||||
data << GetPackGUID();
|
||||
data << counter;
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
player->GetSession()->IncrementOrderCounter();
|
||||
|
||||
// start fall from current height
|
||||
@ -20502,7 +20503,7 @@ void Unit::SetHover(bool enable)
|
||||
|
||||
data << GetPackGUID();
|
||||
data << counter;
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
player->GetSession()->IncrementOrderCounter();
|
||||
return;
|
||||
}
|
||||
@ -20537,7 +20538,7 @@ void Unit::SetWaterWalking(bool enable)
|
||||
WorldPacket data(enable ? SMSG_MOVE_WATER_WALK : SMSG_MOVE_LAND_WALK, GetPackGUID().size() + 4);
|
||||
data << GetPackGUID();
|
||||
data << counter;
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
player->GetSession()->IncrementOrderCounter();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -967,7 +967,7 @@ public:
|
||||
inline bool HasMainhandWeaponForAttack() const { return HasWeaponForAttack(BASE_ATTACK); }
|
||||
inline bool HasOffhandWeaponForAttack() const { return HasWeaponForAttack(OFF_ATTACK); }
|
||||
inline bool HasRangedWeaponForAttack() const { return HasWeaponForAttack(RANGED_ATTACK); }
|
||||
[[nodiscard]] bool CanUseAttackType(uint8 attacktype) const
|
||||
[[nodiscard]] bool CanUseAttackType(WeaponAttackType attacktype) const
|
||||
{
|
||||
switch (attacktype)
|
||||
{
|
||||
|
||||
@ -83,7 +83,7 @@ void VisibleNotifier::SendToSelf()
|
||||
|
||||
WorldPacket packet;
|
||||
i_data.BuildPacket(packet);
|
||||
i_player.GetSession()->SendPacket(&packet);
|
||||
i_player.SendDirectMessage(&packet);
|
||||
|
||||
for (std::vector<Unit*>::const_iterator it = i_visibleNow.begin(); it != i_visibleNow.end(); ++it)
|
||||
i_player.GetInitialVisiblePackets(*it);
|
||||
|
||||
@ -126,7 +126,7 @@ namespace Acore
|
||||
if (!player->HaveAtClient(i_source))
|
||||
return;
|
||||
|
||||
player->GetSession()->SendPacket(i_message);
|
||||
player->SendDirectMessage(i_message);
|
||||
}
|
||||
};
|
||||
|
||||
@ -151,7 +151,7 @@ namespace Acore
|
||||
if (player == i_source || !player->HaveAtClient(i_source) || player->IsFriendlyTo(i_source))
|
||||
return;
|
||||
|
||||
player->GetSession()->SendPacket(i_message);
|
||||
player->SendDirectMessage(i_message);
|
||||
}
|
||||
};
|
||||
|
||||
@ -1092,10 +1092,9 @@ namespace Acore
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (i_funit->_IsValidAttackTarget(u, _spellInfo, i_obj->IsDynamicObject() ? i_obj : nullptr) && i_obj->IsWithinDistInMap(u, i_range,true,false))
|
||||
if (i_funit->_IsValidAttackTarget(u, _spellInfo, i_obj->IsDynamicObject() ? i_obj : nullptr) && i_obj->IsWithinDistInMap(u, i_range,true,false, true))
|
||||
|
||||
return true;
|
||||
|
||||
@ -1192,7 +1191,7 @@ namespace Acore
|
||||
}
|
||||
bool operator()(Unit* u)
|
||||
{
|
||||
if (!me->IsWithinDistInMap(u, m_range, true, false))
|
||||
if (!me->IsWithinDistInMap(u, m_range, true, false, false))
|
||||
return false;
|
||||
|
||||
if (!me->IsValidAttackTarget(u))
|
||||
@ -1218,7 +1217,7 @@ namespace Acore
|
||||
explicit NearestHostileUnitInAttackDistanceCheck(Creature const* creature, float dist) : me(creature), m_range(dist) {}
|
||||
bool operator()(Unit* u)
|
||||
{
|
||||
if (!me->IsWithinDistInMap(u, m_range, true, false))
|
||||
if (!me->IsWithinDistInMap(u, m_range, true, false, false))
|
||||
return false;
|
||||
|
||||
if (!me->CanStartAttack(u))
|
||||
|
||||
@ -580,14 +580,14 @@ bool Group::RemoveMember(ObjectGuid guid, const RemoveMethod& method /*= GROUP_R
|
||||
if (method == GROUP_REMOVEMETHOD_KICK || method == GROUP_REMOVEMETHOD_KICK_LFG)
|
||||
{
|
||||
data.Initialize(SMSG_GROUP_UNINVITE, 0);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
// Do we really need to send this opcode?
|
||||
data.Initialize(SMSG_GROUP_LIST, 1 + 1 + 1 + 1 + 8 + 4 + 4 + 8);
|
||||
data << uint8(0x10) << uint8(0) << uint8(0) << uint8(0);
|
||||
data << m_guid << uint32(m_counter) << uint32(0) << uint64(0);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
// Remove player from group in DB
|
||||
@ -799,7 +799,7 @@ void Group::Disband(bool hideDestroy /* = false */)
|
||||
if (!hideDestroy)
|
||||
{
|
||||
data.Initialize(SMSG_GROUP_DESTROYED, 0);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
//we already removed player from group and in player->GetGroup() is his original group, send update
|
||||
@ -812,7 +812,7 @@ void Group::Disband(bool hideDestroy /* = false */)
|
||||
data.Initialize(SMSG_GROUP_LIST, 1 + 1 + 1 + 1 + 8 + 4 + 4 + 8);
|
||||
data << uint8(0x10) << uint8(0) << uint8(0) << uint8(0);
|
||||
data << m_guid << uint32(m_counter) << uint32(0) << uint64(0);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
RollId.clear();
|
||||
@ -870,7 +870,7 @@ void Group::SendLootStartRoll(uint32 CountDown, uint32 mapid, const Roll& r)
|
||||
continue;
|
||||
|
||||
if (itr->second == NOT_EMITED_YET)
|
||||
p->GetSession()->SendPacket(&data);
|
||||
p->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -893,7 +893,7 @@ void Group::SendLootStartRollToPlayer(uint32 countDown, uint32 mapId, Player* p,
|
||||
voteMask &= ~ROLL_FLAG_TYPE_NEED;
|
||||
data << uint8(voteMask); // roll type mask
|
||||
|
||||
p->GetSession()->SendPacket(&data);
|
||||
p->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Group::SendLootRoll(ObjectGuid sourceGuid, ObjectGuid targetGuid, uint8 rollNumber, uint8 rollType, Roll const& roll, bool autoPass)
|
||||
@ -916,7 +916,7 @@ void Group::SendLootRoll(ObjectGuid sourceGuid, ObjectGuid targetGuid, uint8 rol
|
||||
continue;
|
||||
|
||||
if (itr->second != NOT_VALID)
|
||||
p->GetSession()->SendPacket(&data);
|
||||
p->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -939,7 +939,7 @@ void Group::SendLootRollWon(ObjectGuid sourceGuid, ObjectGuid targetGuid, uint8
|
||||
continue;
|
||||
|
||||
if (itr->second != NOT_VALID)
|
||||
p->GetSession()->SendPacket(&data);
|
||||
p->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -959,7 +959,7 @@ void Group::SendLootAllPassed(Roll const& roll)
|
||||
continue;
|
||||
|
||||
if (itr->second != NOT_VALID)
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1353,7 +1353,7 @@ void Group::MasterLoot(Loot* loot, WorldObject* pLootedObject)
|
||||
|
||||
for (Player* looter : looters)
|
||||
{
|
||||
looter->GetSession()->SendPacket(&data);
|
||||
looter->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1735,7 +1735,7 @@ void Group::SendUpdateToPlayer(ObjectGuid playerGUID, MemberSlot* slot)
|
||||
data << uint8(m_raidDifficulty >= RAID_DIFFICULTY_10MAN_HEROIC); // 3.3 Dynamic Raid Difficulty - 0 normal/1 heroic
|
||||
}
|
||||
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Group::UpdatePlayerOutOfRange(Player* player)
|
||||
@ -1750,7 +1750,7 @@ void Group::UpdatePlayerOutOfRange(Player* player)
|
||||
{
|
||||
Player* member = itr->GetSource();
|
||||
if (member && (!member->IsInMap(player) || !member->IsWithinDist(player, member->GetSightRange(player), false)))
|
||||
member->GetSession()->SendPacket(&data);
|
||||
member->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1763,7 +1763,7 @@ void Group::BroadcastPacket(WorldPacket const* packet, bool ignorePlayersInBGRai
|
||||
continue;
|
||||
|
||||
if (group == -1 || itr->getSubGroup() == group)
|
||||
player->GetSession()->SendPacket(packet);
|
||||
player->SendDirectMessage(packet);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1774,7 +1774,7 @@ void Group::BroadcastReadyCheck(WorldPacket const* packet)
|
||||
Player* player = itr->GetSource();
|
||||
if (player)
|
||||
if (IsLeader(player->GetGUID()) || IsAssistant(player->GetGUID()))
|
||||
player->GetSession()->SendPacket(packet);
|
||||
player->SendDirectMessage(packet);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2123,7 +2123,7 @@ void Guild::BroadcastToGuild(WorldSession* session, bool officerOnly, std::strin
|
||||
for (auto const& [guid, member] : m_members)
|
||||
if (Player* player = member.FindPlayer())
|
||||
if (_HasRankRight(player, officerOnly ? GR_RIGHT_OFFCHATLISTEN : GR_RIGHT_GCHATLISTEN) && !player->GetSocial()->HasIgnore(session->GetPlayer()->GetGUID()))
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2132,14 +2132,14 @@ void Guild::BroadcastPacketToRank(WorldPacket const* packet, uint8 rankId) const
|
||||
for (auto const& [guid, member] : m_members)
|
||||
if (member.IsRank(rankId))
|
||||
if (Player* player = member.FindPlayer())
|
||||
player->GetSession()->SendPacket(packet);
|
||||
player->SendDirectMessage(packet);
|
||||
}
|
||||
|
||||
void Guild::BroadcastPacket(WorldPacket const* packet) const
|
||||
{
|
||||
for (auto const& [guid, member] : m_members)
|
||||
if (Player* player = member.FindPlayer())
|
||||
player->GetSession()->SendPacket(packet);
|
||||
player->SendDirectMessage(packet);
|
||||
}
|
||||
|
||||
void Guild::MassInviteToEvent(WorldSession* session, uint32 minLevel, uint32 maxLevel, uint32 minRank)
|
||||
|
||||
@ -160,7 +160,7 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket& recvData)
|
||||
WorldPacket data(SMSG_ARENA_TEAM_INVITE, (8 + 10));
|
||||
data << GetPlayer()->GetName();
|
||||
data << arenaTeam->GetName();
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
|
||||
LOG_DEBUG("network", "WORLD: Sent SMSG_ARENA_TEAM_INVITE");
|
||||
}
|
||||
|
||||
@ -265,7 +265,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
|
||||
{
|
||||
WorldPacket data;
|
||||
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
|
||||
member->GetSession()->SendPacket(&data);
|
||||
member->SendDirectMessage(&data);
|
||||
});
|
||||
|
||||
return;
|
||||
@ -283,10 +283,10 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
|
||||
|
||||
// send status packet
|
||||
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, member->AddBattlegroundQueueId(bgQueueTypeId), STATUS_WAIT_QUEUE, avgWaitTime, 0, 0, TEAM_NEUTRAL);
|
||||
member->GetSession()->SendPacket(&data);
|
||||
member->SendDirectMessage(&data);
|
||||
|
||||
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
|
||||
member->GetSession()->SendPacket(&data);
|
||||
member->SendDirectMessage(&data);
|
||||
|
||||
sScriptMgr->OnPlayerJoinBG(member);
|
||||
});
|
||||
@ -879,7 +879,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
|
||||
if (err <= 0)
|
||||
{
|
||||
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
|
||||
member->GetSession()->SendPacket(&data);
|
||||
member->SendDirectMessage(&data);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -887,10 +887,10 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
|
||||
|
||||
// send status packet
|
||||
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bgt, queueSlot, STATUS_WAIT_QUEUE, avgWaitTime, 0, arenatype, TEAM_NEUTRAL, isRated);
|
||||
member->GetSession()->SendPacket(&data);
|
||||
member->SendDirectMessage(&data);
|
||||
|
||||
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
|
||||
member->GetSession()->SendPacket(&data);
|
||||
member->SendDirectMessage(&data);
|
||||
|
||||
LOG_DEBUG("bg.battleground", "Battleground: player joined queue for arena as group bg queue type {} bg type {}: {}, NAME {}", bgQueueTypeId, bgTypeId, member->GetGUID().ToString(), member->GetName());
|
||||
|
||||
|
||||
@ -803,7 +803,7 @@ void WorldSession::HandleChatIgnoredOpcode(WorldPacket& recvData)
|
||||
|
||||
WorldPacket data;
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_IGNORED, LANG_UNIVERSAL, _player, _player, GetPlayer()->GetName());
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleChannelDeclineInvite(WorldPacket& recvPacket)
|
||||
|
||||
@ -149,7 +149,7 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData)
|
||||
data << uint32(0); // unk
|
||||
data << uint8(0); // count
|
||||
data << uint32(0); // unk
|
||||
invitedPlayer->GetSession()->SendPacket(&data);
|
||||
invitedPlayer->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
return;
|
||||
@ -209,7 +209,7 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData)
|
||||
data << uint32(0); // unk
|
||||
data << uint8(0); // count
|
||||
data << uint32(0); // unk
|
||||
invitedPlayer->GetSession()->SendPacket(&data);
|
||||
invitedPlayer->SendDirectMessage(&data);
|
||||
|
||||
SendPartyResult(PARTY_OP_INVITE, membername, ERR_PARTY_RESULT_OK);
|
||||
}
|
||||
@ -292,7 +292,7 @@ void WorldSession::HandleGroupDeclineOpcode(WorldPacket& /*recvData*/)
|
||||
// report
|
||||
WorldPacket data(SMSG_GROUP_DECLINE, GetPlayer()->GetName().length());
|
||||
data << GetPlayer()->GetName();
|
||||
leader->GetSession()->SendPacket(&data);
|
||||
leader->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket& recvData)
|
||||
|
||||
@ -206,7 +206,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket& /*recvData*/)
|
||||
WorldPacket data(SMSG_LOOT_MONEY_NOTIFY, 4 + 1);
|
||||
data << uint32(goldPerPlayer);
|
||||
data << uint8(playersNear.size() > 1 ? 0 : 1); // Controls the text displayed in chat. 0 is "Your share is..." and 1 is "You loot..."
|
||||
(*i)->GetSession()->SendPacket(&data);
|
||||
(*i)->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@ -1519,12 +1519,19 @@ void WorldSession::HandleMoveFlagChangeOpcode(WorldPacket& recv_data)
|
||||
|
||||
mover->m_movementInfo.flags = movementInfo.GetMovementFlags();
|
||||
|
||||
// old map - async processing, ignore
|
||||
if (counter <= _player->GetMapChangeOrderCounter())
|
||||
return;
|
||||
|
||||
if (!ProcessMovementInfo(movementInfo, mover, plrMover, recv_data))
|
||||
{
|
||||
recv_data.rfinish(); // prevent warnings spam
|
||||
return;
|
||||
}
|
||||
|
||||
if (_player->GetPendingFlightChange() == counter && opcode == CMSG_MOVE_SET_CAN_FLY_ACK)
|
||||
_player->SetPendingFlightChange(false);
|
||||
|
||||
Opcodes response;
|
||||
|
||||
switch (recv_data.GetOpcode())
|
||||
|
||||
@ -105,6 +105,13 @@ void WorldSession::HandleMoveWorldportAck()
|
||||
GetPlayer()->UpdatePositionData();
|
||||
|
||||
GetPlayer()->SendInitialPacketsBeforeAddToMap();
|
||||
|
||||
if (GetPlayer()->GetPendingFlightChange() <= GetPlayer()->GetMapChangeOrderCounter())
|
||||
{
|
||||
if (!GetPlayer()->HasIncreaseMountedFlightSpeedAura() && !GetPlayer()->HasFlyAura())
|
||||
GetPlayer()->m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_CAN_FLY);
|
||||
}
|
||||
|
||||
if (!GetPlayer()->GetMap()->AddPlayerToMap(GetPlayer()))
|
||||
{
|
||||
LOG_ERROR("network.opcode", "WORLD: failed to teleport player {} ({}) to map {} because of unknown reason!",
|
||||
@ -679,6 +686,10 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
// old map - async processing, ignore
|
||||
if (counter <= _player->GetMapChangeOrderCounter())
|
||||
return;
|
||||
|
||||
if (!ProcessMovementInfo(movementInfo, mover, _player, recvData))
|
||||
{
|
||||
recvData.rfinish(); // prevent warnings spam
|
||||
@ -991,6 +1002,10 @@ void WorldSession::HandleMoveRootAck(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
// old map - async processing, ignore
|
||||
if (counter <= _player->GetMapChangeOrderCounter())
|
||||
return;
|
||||
|
||||
if (!ProcessMovementInfo(movementInfo, mover, _player, recvData))
|
||||
return;
|
||||
|
||||
|
||||
@ -494,7 +494,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
|
||||
|
||||
// update for owner if online
|
||||
if (Player* owner = ObjectAccessor::FindConnectedPlayer(petition->ownerGuid))
|
||||
owner->GetSession()->SendPacket(&data);
|
||||
owner->SendDirectMessage(&data);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -527,7 +527,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
|
||||
|
||||
// update for owner if online
|
||||
if (Player* owner = ObjectAccessor::FindConnectedPlayer(petition->ownerGuid))
|
||||
owner->GetSession()->SendPacket(&data);
|
||||
owner->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandlePetitionDeclineOpcode(WorldPacket& recvData)
|
||||
@ -547,7 +547,7 @@ void WorldSession::HandlePetitionDeclineOpcode(WorldPacket& recvData)
|
||||
{
|
||||
WorldPacket data(MSG_PETITION_DECLINE, 8);
|
||||
data << _player->GetGUID();
|
||||
owner->GetSession()->SendPacket(&data);
|
||||
owner->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -639,7 +639,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket& recvData)
|
||||
data << uint32(0); // there 0 ...
|
||||
}
|
||||
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
|
||||
|
||||
@ -625,7 +625,7 @@ void WorldSession::HandleQuestPushResult(WorldPacket& recvPacket)
|
||||
WorldPacket data(MSG_QUEST_PUSH_RESULT, 8 + 4 + 1);
|
||||
data << _player->GetGUID();
|
||||
data << uint8(msg); // valid values: 0-8
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
_player->SetDivider();
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ void WorldSession::HandleGrantLevel(WorldPacket& recvData)
|
||||
|
||||
WorldPacket data2(SMSG_PROPOSE_LEVEL_GRANT, 8);
|
||||
data2 << _player->GetPackGUID();
|
||||
target->GetSession()->SendPacket(&data2);
|
||||
target->SendDirectMessage(&data2);
|
||||
}
|
||||
|
||||
void WorldSession::HandleAcceptGrantLevel(WorldPacket& recvData)
|
||||
|
||||
@ -646,7 +646,7 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
|
||||
WorldPacket data(SMSG_TRADE_STATUS, 12);
|
||||
data << uint32(TRADE_STATUS_BEGIN_TRADE);
|
||||
data << _player->GetGUID();
|
||||
pOther->GetSession()->SendPacket(&data);
|
||||
pOther->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleSetTradeGoldOpcode(WorldPacket& recvPacket)
|
||||
|
||||
@ -1691,7 +1691,7 @@ void Map::SendInitTransports(Player* player)
|
||||
|
||||
WorldPacket packet;
|
||||
transData.BuildPacket(packet);
|
||||
player->GetSession()->SendPacket(&packet);
|
||||
player->SendDirectMessage(&packet);
|
||||
}
|
||||
|
||||
void Map::SendRemoveTransports(Player* player)
|
||||
@ -1710,7 +1710,7 @@ void Map::SendRemoveTransports(Player* player)
|
||||
|
||||
WorldPacket packet;
|
||||
transData.BuildPacket(packet);
|
||||
player->GetSession()->SendPacket(&packet);
|
||||
player->SendDirectMessage(&packet);
|
||||
}
|
||||
|
||||
void Map::SendObjectUpdates()
|
||||
@ -1730,7 +1730,7 @@ void Map::SendObjectUpdates()
|
||||
for (UpdateDataMapType::iterator iter = update_players.begin(); iter != update_players.end(); ++iter)
|
||||
{
|
||||
iter->second.BuildPacket(packet);
|
||||
iter->first->GetSession()->SendPacket(&packet);
|
||||
iter->first->SendDirectMessage(&packet);
|
||||
packet.clear(); // clean the string
|
||||
}
|
||||
}
|
||||
@ -1850,7 +1850,7 @@ uint32 Map::GetPlayersCountExceptGMs() const
|
||||
void Map::SendToPlayers(WorldPacket const* data) const
|
||||
{
|
||||
for (MapRefMgr::const_iterator itr = m_mapRefMgr.begin(); itr != m_mapRefMgr.end(); ++itr)
|
||||
itr->GetSource()->GetSession()->SendPacket(data);
|
||||
itr->GetSource()->SendDirectMessage(data);
|
||||
}
|
||||
|
||||
template bool Map::AddToMap(Corpse*, bool);
|
||||
@ -2055,7 +2055,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
|
||||
data << uint32(60000);
|
||||
data << uint32(instance_data ? instance_data->GetCompletedEncounterMask() : 0);
|
||||
data << uint8(0);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
player->SetPendingBind(mapSave->GetInstanceId(), 60000);
|
||||
}
|
||||
}
|
||||
@ -2227,7 +2227,7 @@ void InstanceMap::PermBindAllPlayers()
|
||||
{
|
||||
WorldPacket data(SMSG_INSTANCE_SAVE_CREATED, 4);
|
||||
data << uint32(0);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
sInstanceSaveMgr->PlayerBindToInstance(player->GetGUID(), save, true, player);
|
||||
}
|
||||
|
||||
|
||||
@ -205,7 +205,7 @@ Map::EnterState MapMgr::PlayerCannotEnter(uint32 mapid, Player* player, bool log
|
||||
if (!corpseMap)
|
||||
{
|
||||
WorldPacket data(SMSG_CORPSE_NOT_IN_INSTANCE, 0);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
LOG_DEBUG("maps", "MAP: Player '{}' does not have a corpse in instance '{}' and cannot enter.", player->GetName(), mapName);
|
||||
return Map::CANNOT_ENTER_CORPSE_IN_DIFFERENT_INSTANCE;
|
||||
}
|
||||
|
||||
@ -635,7 +635,7 @@ void OutdoorPvP::BroadcastPacket(WorldPacket& data) const
|
||||
for (auto const& playerSet : _players)
|
||||
for (auto itr : playerSet)
|
||||
if (Player* const player = ObjectAccessor::FindPlayer(itr))
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void OutdoorPvP::RegisterZone(uint32 zoneId)
|
||||
|
||||
@ -374,7 +374,7 @@ void OpcodeTable::Initialize()
|
||||
/*0x0F3*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_MOVE_NORMAL_FALL, STATUS_NEVER);
|
||||
/*0x0F4*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_MOVE_SET_HOVER, STATUS_NEVER);
|
||||
/*0x0F5*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_MOVE_UNSET_HOVER, STATUS_NEVER);
|
||||
/*0x0F6*/ DEFINE_HANDLER(CMSG_MOVE_HOVER_ACK, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleMoveFlagChangeOpcode );
|
||||
/*0x0F6*/ DEFINE_HANDLER(CMSG_MOVE_HOVER_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleMoveFlagChangeOpcode );
|
||||
/*0x0F7*/ DEFINE_SERVER_OPCODE_HANDLER(MSG_MOVE_HOVER, STATUS_NEVER);
|
||||
/*0x0F8*/ DEFINE_HANDLER(CMSG_TRIGGER_CINEMATIC_CHEAT, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL );
|
||||
/*0x0F9*/ DEFINE_HANDLER(CMSG_OPENING_CINEMATIC, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL );
|
||||
@ -1245,7 +1245,7 @@ void OpcodeTable::Initialize()
|
||||
/*0x45A*/ DEFINE_HANDLER(MSG_MOVE_SET_PITCH_RATE_CHEAT, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL );
|
||||
/*0x45B*/ DEFINE_HANDLER(MSG_MOVE_SET_PITCH_RATE, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL );
|
||||
/*0x45C*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_FORCE_PITCH_RATE_CHANGE, STATUS_NEVER);
|
||||
/*0x45D*/ DEFINE_HANDLER(CMSG_FORCE_PITCH_RATE_CHANGE_ACK, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleForceSpeedChangeAck );
|
||||
/*0x45D*/ DEFINE_HANDLER(CMSG_FORCE_PITCH_RATE_CHANGE_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleForceSpeedChangeAck );
|
||||
/*0x45E*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPLINE_SET_PITCH_RATE, STATUS_NEVER);
|
||||
/*0x45F*/ DEFINE_HANDLER(CMSG_CALENDAR_EVENT_INVITE_NOTES, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL );
|
||||
/*0x460*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_CALENDAR_EVENT_INVITE_NOTES, STATUS_NEVER);
|
||||
@ -1359,9 +1359,9 @@ void OpcodeTable::Initialize()
|
||||
/*0x4CC*/ DEFINE_HANDLER(CMSG_END_BATTLEFIELD_CHEAT, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL );
|
||||
/*0x4CD*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_MULTIPLE_PACKETS, STATUS_NEVER);
|
||||
/*0x4CE*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_MOVE_GRAVITY_DISABLE, STATUS_NEVER);
|
||||
/*0x4CF*/ DEFINE_HANDLER(CMSG_MOVE_GRAVITY_DISABLE_ACK, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleMoveFlagChangeOpcode );
|
||||
/*0x4CF*/ DEFINE_HANDLER(CMSG_MOVE_GRAVITY_DISABLE_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleMoveFlagChangeOpcode );
|
||||
/*0x4D0*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_MOVE_GRAVITY_ENABLE, STATUS_NEVER);
|
||||
/*0x4D1*/ DEFINE_HANDLER(CMSG_MOVE_GRAVITY_ENABLE_ACK, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleMoveFlagChangeOpcode );
|
||||
/*0x4D1*/ DEFINE_HANDLER(CMSG_MOVE_GRAVITY_ENABLE_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleMoveFlagChangeOpcode );
|
||||
/*0x4D2*/ DEFINE_SERVER_OPCODE_HANDLER(MSG_MOVE_GRAVITY_CHNG, STATUS_NEVER);
|
||||
/*0x4D3*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPLINE_MOVE_GRAVITY_DISABLE, STATUS_NEVER);
|
||||
/*0x4D4*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPLINE_MOVE_GRAVITY_ENABLE, STATUS_NEVER);
|
||||
@ -1431,7 +1431,7 @@ void OpcodeTable::Initialize()
|
||||
/*0x514*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_SEND_ALL_COMBAT_LOG, STATUS_NEVER);
|
||||
/*0x515*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_OPEN_LFG_DUNGEON_FINDER, STATUS_NEVER);
|
||||
/*0x516*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_MOVE_SET_COLLISION_HGT, STATUS_NEVER);
|
||||
/*0x517*/ DEFINE_HANDLER(CMSG_MOVE_SET_COLLISION_HGT_ACK, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleForceSpeedChangeAck );
|
||||
/*0x517*/ DEFINE_HANDLER(CMSG_MOVE_SET_COLLISION_HGT_ACK, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleForceSpeedChangeAck );
|
||||
/*0x518*/ DEFINE_HANDLER(MSG_MOVE_SET_COLLISION_HGT, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL );
|
||||
/*0x519*/ DEFINE_HANDLER(CMSG_CLEAR_RANDOM_BG_WIN_TIME, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL );
|
||||
/*0x51A*/ DEFINE_HANDLER(CMSG_CLEAR_HOLIDAY_BG_WIN_TIME, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL );
|
||||
|
||||
@ -3002,12 +3002,12 @@ void AuraEffect::HandleAuraModDisarm(AuraApplication const* aurApp, uint8 mode,
|
||||
{
|
||||
if (Item* pItem = target->ToPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, slot))
|
||||
{
|
||||
uint8 attacktype = Player::GetAttackBySlot(slot);
|
||||
WeaponAttackType attacktype = Player::GetAttackBySlot(slot);
|
||||
|
||||
if (attacktype < MAX_ATTACK)
|
||||
{
|
||||
target->ToPlayer()->_ApplyWeaponDamage(slot, pItem->GetTemplate(), nullptr, !apply);
|
||||
target->ToPlayer()->_ApplyWeaponDependentAuraMods(pItem, WeaponAttackType(attacktype), !apply);
|
||||
target->ToPlayer()->_ApplyWeaponDependentAuraMods(pItem, attacktype, !apply);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6177,7 +6177,7 @@ void AuraEffect::HandleAuraSetVehicle(AuraApplication const* aurApp, uint8 mode,
|
||||
if (apply)
|
||||
{
|
||||
data.Initialize(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0);
|
||||
target->ToPlayer()->GetSession()->SendPacket(&data);
|
||||
target->ToPlayer()->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4612,7 +4612,7 @@ void Spell::SendCastResult(Player* caster, SpellInfo const* spellInfo, uint8 cas
|
||||
WorldPacket data(SMSG_CAST_FAILED, 1 + 4 + 1);
|
||||
WriteCastResultInfo(data, caster, spellInfo, castCount, result, customError);
|
||||
|
||||
caster->GetSession()->SendPacket(&data);
|
||||
caster->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Spell::SendCastResult(SpellCastResult result)
|
||||
@ -4649,7 +4649,7 @@ void Spell::SendPetCastResult(SpellCastResult result)
|
||||
WorldPacket data(SMSG_PET_CAST_FAILED, 1 + 4 + 1);
|
||||
WriteCastResultInfo(data, player, m_spellInfo, m_cast_count, result, m_customError);
|
||||
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Spell::SendSpellStart()
|
||||
@ -5184,7 +5184,7 @@ void Spell::SendResurrectRequest(Player* target)
|
||||
// override delay sent with SMSG_CORPSE_RECLAIM_DELAY, set instant resurrection for spells with this attribute
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR3_NO_RES_TIMER))
|
||||
data << uint32(0);
|
||||
target->GetSession()->SendPacket(&data);
|
||||
target->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Spell::TakeCastItem()
|
||||
|
||||
@ -4162,8 +4162,8 @@ void Spell::EffectDuel(SpellEffIndex effIndex)
|
||||
WorldPacket data(SMSG_DUEL_REQUESTED, 8 + 8);
|
||||
data << pGameObj->GetGUID();
|
||||
data << caster->GetGUID();
|
||||
caster->GetSession()->SendPacket(&data);
|
||||
target->GetSession()->SendPacket(&data);
|
||||
caster->SendDirectMessage(&data);
|
||||
target->SendDirectMessage(&data);
|
||||
|
||||
// create duel-info
|
||||
bool isMounted = (GetSpellInfo()->Id == 62875);
|
||||
@ -4245,7 +4245,7 @@ void Spell::EffectSummonPlayer(SpellEffIndex /*effIndex*/)
|
||||
data << m_caster->GetGUID(); // summoner guid
|
||||
data << uint32(m_caster->GetZoneId()); // summoner zone
|
||||
data << uint32(MAX_PLAYER_SUMMON_DELAY * IN_MILLISECONDS); // auto decline after msecs
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Spell::EffectActivateObject(SpellEffIndex effIndex)
|
||||
@ -6345,5 +6345,5 @@ void Spell::EffectSummonRaFFriend(SpellEffIndex /*effIndex*/)
|
||||
data << m_caster->GetGUID();
|
||||
data << uint32(m_caster->GetZoneId());
|
||||
data << uint32(MAX_PLAYER_SUMMON_DELAY * IN_MILLISECONDS); // auto decline after msecs
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
@ -1824,7 +1824,7 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, WorldObject const* ta
|
||||
{
|
||||
if (Player const* player = unitTarget->ToPlayer())
|
||||
{
|
||||
if (player->GetWeaponForAttack(WeaponAttackType(BASE_ATTACK + i), true))
|
||||
if (player->GetWeaponForAttack(WeaponAttackType(i), true))
|
||||
{
|
||||
valid = true;
|
||||
break;
|
||||
|
||||
@ -309,7 +309,7 @@ void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket const*
|
||||
if (!target || !target->IsPlayer())
|
||||
return;
|
||||
|
||||
target->ToPlayer()->GetSession()->SendPacket(data);
|
||||
target->ToPlayer()->SendDirectMessage(data);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@ -326,7 +326,7 @@ void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket const*
|
||||
Map::PlayerList const& players = source->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
if (itr->GetSource()->GetAreaId() == areaId && (teamId == TEAM_NEUTRAL || itr->GetSource()->GetTeamId() == teamId) && (!gmOnly || itr->GetSource()->IsGameMaster()))
|
||||
itr->GetSource()->GetSession()->SendPacket(data);
|
||||
itr->GetSource()->SendDirectMessage(data);
|
||||
return;
|
||||
}
|
||||
case TEXT_RANGE_ZONE:
|
||||
@ -335,7 +335,7 @@ void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket const*
|
||||
Map::PlayerList const& players = source->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
if (itr->GetSource()->GetZoneId() == zoneId && (teamId == TEAM_NEUTRAL || itr->GetSource()->GetTeamId() == teamId) && (!gmOnly || itr->GetSource()->IsGameMaster()))
|
||||
itr->GetSource()->GetSession()->SendPacket(data);
|
||||
itr->GetSource()->SendDirectMessage(data);
|
||||
return;
|
||||
}
|
||||
case TEXT_RANGE_MAP:
|
||||
@ -343,7 +343,7 @@ void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket const*
|
||||
Map::PlayerList const& players = source->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
if ((teamId == TEAM_NEUTRAL || itr->GetSource()->GetTeamId() == teamId) && (!gmOnly || itr->GetSource()->IsGameMaster()))
|
||||
itr->GetSource()->GetSession()->SendPacket(data);
|
||||
itr->GetSource()->SendDirectMessage(data);
|
||||
return;
|
||||
}
|
||||
case TEXT_RANGE_WORLD:
|
||||
@ -352,7 +352,7 @@ void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket const*
|
||||
for (WorldSessionMgr::SessionMap::const_iterator itr = sessionMap.begin(); itr != sessionMap.end(); ++itr)
|
||||
if (Player* player = itr->second->GetPlayer())
|
||||
if ((teamId == TEAM_NEUTRAL || player->GetTeamId() == teamId) && (!gmOnly || player->IsGameMaster()))
|
||||
player->GetSession()->SendPacket(data);
|
||||
player->SendDirectMessage(data);
|
||||
return;
|
||||
}
|
||||
case TEXT_RANGE_NORMAL:
|
||||
|
||||
@ -433,7 +433,7 @@ public:
|
||||
}
|
||||
|
||||
data.hexlike();
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
handler->PSendSysMessage(LANG_COMMAND_OPCODESENT, data.GetOpcode(), unit->GetName());
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -487,7 +487,7 @@ public:
|
||||
uint32 queueSlot = 0;
|
||||
WorldPacket data;
|
||||
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_IN_PROGRESS, 0, bg->GetStartTime(), bg->GetArenaType(), teamId);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
|
||||
// Remove from LFG queues
|
||||
sLFGMgr->LeaveAllLfgQueues(player->GetGUID(), false);
|
||||
|
||||
@ -328,7 +328,7 @@ public:
|
||||
data << uint8(op);
|
||||
data << uint16(val);
|
||||
data << uint16(mark ? *mark : 65535);
|
||||
target->GetSession()->SendPacket(&data);
|
||||
target->SendDirectMessage(&data);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -146,7 +146,7 @@ public:
|
||||
{
|
||||
WorldPacket data(SMSG_GMTICKET_DELETETICKET, 4);
|
||||
data << uint32(GMTICKET_RESPONSE_TICKET_DELETED);
|
||||
submitter->GetSession()->SendPacket(&data);
|
||||
submitter->SendDirectMessage(&data);
|
||||
ChatHandler(submitter->GetSession()).SendSysMessage(LANG_TICKET_CLOSED);
|
||||
}
|
||||
return true;
|
||||
@ -259,7 +259,7 @@ public:
|
||||
// Force abandon ticket
|
||||
WorldPacket data(SMSG_GMTICKET_DELETETICKET, 4);
|
||||
data << uint32(GMTICKET_RESPONSE_TICKET_DELETED);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@ -53,7 +53,7 @@ enum Spells
|
||||
SPELL_FAERIE_DRAGON_FORM = 27546,
|
||||
SPELL_ARCANE_EXPLOSION = 22271,
|
||||
SPELL_REFLECTION = 27564,
|
||||
SPELL_CHAIN_LIGHTING = 27567,
|
||||
SPELL_CHAIN_LIGHTNING = 27567,
|
||||
SPELL_SLEEP = 20663 // Guessed
|
||||
};
|
||||
|
||||
@ -68,7 +68,7 @@ enum Phases
|
||||
std::vector<uint32> catSpells = { SPELL_SHRED, SPELL_RAKE, SPELL_FEROCIOUS_BITE };
|
||||
std::vector<uint32> humanSpells = { SPELL_HURRICANE, SPELL_MOONFIRE, SPELL_SHOCK, SPELL_HEALING_TOUCH, SPELL_REJUVENATION };
|
||||
std::vector<uint32> bearSpells = { SPELL_DEMORALIZING_ROAR, SPELL_MAUL, SPELL_SWIPE };
|
||||
std::vector<uint32> faerieSpells = { SPELL_ARCANE_EXPLOSION, SPELL_REFLECTION, SPELL_CHAIN_LIGHTING, SPELL_SLEEP };
|
||||
std::vector<uint32> faerieSpells = { SPELL_ARCANE_EXPLOSION, SPELL_REFLECTION, SPELL_CHAIN_LIGHTNING, SPELL_SLEEP };
|
||||
|
||||
struct boss_mor_grayhoof : public BossAI
|
||||
{
|
||||
|
||||
@ -234,7 +234,7 @@ public:
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case 5:
|
||||
case 6:
|
||||
events.ScheduleEvent(EVENT_TELEPORT_1, 2s);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ public:
|
||||
|
||||
void MovementInform(uint32 type, uint32 id) override
|
||||
{
|
||||
if (type != WAYPOINT_MOTION_TYPE || id != 12)
|
||||
if (type != WAYPOINT_MOTION_TYPE || id != 13)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@ -592,12 +592,12 @@ struct boss_nefarian : public BossAI
|
||||
return;
|
||||
}
|
||||
|
||||
if (id == 3)
|
||||
if (id == 4)
|
||||
{
|
||||
Talk(SAY_INTRO);
|
||||
}
|
||||
|
||||
if (id == 5)
|
||||
if (id == 6)
|
||||
{
|
||||
DoCastAOE(SPELL_SHADOWFLAME_INITIAL);
|
||||
Talk(SAY_SHADOWFLAME);
|
||||
|
||||
@ -64,12 +64,12 @@ enum Koltira
|
||||
//NPC_DEATH_KNIGHT_MOUNT = 29201,
|
||||
MODEL_DEATH_KNIGHT_MOUNT = 25278,
|
||||
|
||||
POINT_STAND_UP = 0,
|
||||
POINT_BOX = 1,
|
||||
POINT_ANTI_MAGIC_ZONE = 2,
|
||||
POINT_STAND_UP = 1,
|
||||
POINT_BOX = 2,
|
||||
POINT_ANTI_MAGIC_ZONE = 3,
|
||||
|
||||
POINT_MOUNT = 0,
|
||||
POINT_DESPAWN = 1
|
||||
POINT_MOUNT = 1,
|
||||
POINT_DESPAWN = 2
|
||||
};
|
||||
|
||||
class npc_koltira_deathweaver : public CreatureScript
|
||||
|
||||
@ -56,7 +56,7 @@ enum Events
|
||||
enum Misc
|
||||
{
|
||||
WEAPON_KIRTONOS_STAFF = 11365,
|
||||
POINT_KIRTONOS_LAND = 13,
|
||||
POINT_KIRTONOS_LAND = 14,
|
||||
KIRTONOS_PATH = 105061,
|
||||
|
||||
EMOTE_SUMMONED = 0
|
||||
|
||||
@ -382,7 +382,7 @@ class spell_madrigosa_activate_barrier : public SpellScript
|
||||
WorldPacket pkt;
|
||||
go->BuildValuesUpdateBlockForPlayer(&data, player);
|
||||
data.BuildPacket(pkt);
|
||||
player->GetSession()->SendPacket(&pkt);
|
||||
player->SendDirectMessage(&pkt);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -409,7 +409,7 @@ class spell_madrigosa_deactivate_barrier : public SpellScript
|
||||
WorldPacket pkt;
|
||||
go->BuildValuesUpdateBlockForPlayer(&data, player);
|
||||
data.BuildPacket(pkt);
|
||||
player->GetSession()->SendPacket(&pkt);
|
||||
player->SendDirectMessage(&pkt);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -486,7 +486,7 @@ struct npc_harrison_jones : public ScriptedAI
|
||||
void MovementInform(uint32 type, uint32 id) override
|
||||
{
|
||||
// at gong
|
||||
if (type == WAYPOINT_MOTION_TYPE && id == 2 && _phase == PHASE_GONG)
|
||||
if (type == WAYPOINT_MOTION_TYPE && id == 3 && _phase == PHASE_GONG)
|
||||
{
|
||||
if (GameObject* gong = _instance->GetGameObject(DATA_STRANGE_GONG))
|
||||
me->SetFacingToObject(gong);
|
||||
@ -503,13 +503,13 @@ struct npc_harrison_jones : public ScriptedAI
|
||||
});
|
||||
}
|
||||
// to the massive gate
|
||||
else if (type == WAYPOINT_MOTION_TYPE && id == 1 && _phase == PHASE_GATE_CLOSED)
|
||||
else if (type == WAYPOINT_MOTION_TYPE && id == 2 && _phase == PHASE_GATE_CLOSED)
|
||||
{
|
||||
me->SetEntry(NPC_HARRISON_JONES_1);
|
||||
Talk(SAY_HARRISON_2);
|
||||
}
|
||||
// at massive gate
|
||||
else if (type == WAYPOINT_MOTION_TYPE && id == 2 && _phase == PHASE_GATE_CLOSED)
|
||||
else if (type == WAYPOINT_MOTION_TYPE && id == 3 && _phase == PHASE_GATE_CLOSED)
|
||||
{
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING);
|
||||
Talk(SAY_HARRISON_3);
|
||||
@ -599,7 +599,7 @@ struct npc_amanishi_lookout : public NullCreatureAI
|
||||
void MovementInform(uint32 type, uint32 id) override
|
||||
{
|
||||
// at boss
|
||||
if (type == WAYPOINT_MOTION_TYPE && id == 8) // should despawn with waypoint script
|
||||
if (type == WAYPOINT_MOTION_TYPE && id == 9) // should despawn with waypoint script
|
||||
me->DespawnOrUnsummon(0s, 0s);
|
||||
}
|
||||
private:
|
||||
|
||||
@ -80,7 +80,7 @@ enum Misc
|
||||
|
||||
MODEL_OHGAN_MOUNT = 15271,
|
||||
PATH_MANDOKIR = 492861,
|
||||
POINT_MANDOKIR_END = 24,
|
||||
POINT_MANDOKIR_END = 25,
|
||||
CHAINED_SPIRIT_COUNT = 20,
|
||||
ACTION_CHARGE = 1
|
||||
};
|
||||
|
||||
@ -149,13 +149,13 @@ struct npc_sentinel_leader : public ScriptedAI
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case 1:
|
||||
case 4:
|
||||
case 7:
|
||||
case 2:
|
||||
case 5:
|
||||
case 8:
|
||||
case 13:
|
||||
case 9:
|
||||
case 14:
|
||||
case 17:
|
||||
case 15:
|
||||
case 18:
|
||||
Creature* SentinelSpy = me->FindNearestCreature(NPC_SENTINEL_SPY, 2.0f, true);
|
||||
if (SentinelSpy)
|
||||
{
|
||||
@ -282,10 +282,10 @@ struct npc_sentinel_infiltrator : public ScriptedAI
|
||||
case PATH_ONE:
|
||||
switch (id)
|
||||
{
|
||||
case 5:
|
||||
case 8:
|
||||
case 14:
|
||||
case 18:
|
||||
case 6:
|
||||
case 9:
|
||||
case 15:
|
||||
case 19:
|
||||
Creature* SentinelInfiltrator = me->FindNearestCreature(NPC_SENTINEL_INFILTRATOR, 3.5f, true);
|
||||
if (SentinelInfiltrator)
|
||||
{
|
||||
@ -299,10 +299,10 @@ struct npc_sentinel_infiltrator : public ScriptedAI
|
||||
case PATH_TWO:
|
||||
switch (id)
|
||||
{
|
||||
case 5:
|
||||
case 7:
|
||||
case 14:
|
||||
case 17:
|
||||
case 6:
|
||||
case 8:
|
||||
case 15:
|
||||
case 18:
|
||||
Creature* SentinelInfiltrator = me->FindNearestCreature(NPC_SENTINEL_INFILTRATOR, 3.5f, true);
|
||||
if (SentinelInfiltrator)
|
||||
{
|
||||
|
||||
@ -1085,9 +1085,9 @@ struct boss_headless_horseman : public ScriptedAI
|
||||
{
|
||||
if (type == WAYPOINT_MOTION_TYPE)
|
||||
{
|
||||
if (point == 0)
|
||||
if (point == 1)
|
||||
me->CastSpell(me, SPELL_HEAD_VISUAL, true);
|
||||
else if (point == 11)
|
||||
else if (point == 12)
|
||||
{
|
||||
me->ReplaceAllUnitFlags(UNIT_FLAG_NONE);
|
||||
me->StopMoving();
|
||||
|
||||
@ -18,17 +18,16 @@
|
||||
#include "CreatureScript.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "culling_of_stratholme.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_CURSE_OF_EXERTION = 52772,
|
||||
SPELL_WOUNDING_STRIKE_N = 52771,
|
||||
SPELL_WOUNDING_STRIKE_H = 58830,
|
||||
SPELL_WOUNDING_STRIKE = 52771,
|
||||
SPELL_TIME_STOP = 58848,
|
||||
SPELL_TIME_WARP = 52766,
|
||||
SPELL_TIME_STEP_N = 52737,
|
||||
SPELL_TIME_STEP_H = 58829,
|
||||
SPELL_TIME_STEP = 52737,
|
||||
};
|
||||
|
||||
enum Events
|
||||
@ -87,7 +86,7 @@ public:
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Id == SPELL_TIME_STEP_H || spellInfo->Id == SPELL_TIME_STEP_N)
|
||||
if (spellInfo->Id == sSpellMgr->GetSpellIdForDifficulty(SPELL_TIME_STEP, me))
|
||||
{
|
||||
if (target == me)
|
||||
return;
|
||||
@ -98,7 +97,7 @@ public:
|
||||
return;
|
||||
}
|
||||
warps++;
|
||||
me->CastSpell(target, DUNGEON_MODE(SPELL_TIME_STEP_N, SPELL_TIME_STEP_H), true);
|
||||
me->CastSpell(target, SPELL_TIME_STEP, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -119,7 +118,7 @@ public:
|
||||
events.Repeat(9s);
|
||||
break;
|
||||
case EVENT_SPELL_WOUNDING_STRIKE:
|
||||
me->CastSpell(me->GetVictim(), DUNGEON_MODE(SPELL_WOUNDING_STRIKE_N, SPELL_WOUNDING_STRIKE_H), false);
|
||||
me->CastSpell(me->GetVictim(), SPELL_WOUNDING_STRIKE, false);
|
||||
events.Repeat(6s);
|
||||
break;
|
||||
case EVENT_SPELL_TIME_STOP:
|
||||
@ -130,7 +129,7 @@ public:
|
||||
Talk(SAY_TIME_WARP);
|
||||
me->CastSpell(me, SPELL_TIME_WARP, false);
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true))
|
||||
me->CastSpell(target, DUNGEON_MODE(SPELL_TIME_STEP_N, SPELL_TIME_STEP_H), true);
|
||||
me->CastSpell(target, SPELL_TIME_STEP, true);
|
||||
|
||||
events.Repeat(25s);
|
||||
break;
|
||||
|
||||
@ -22,12 +22,9 @@
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_CARRION_SWARM_N = 52720,
|
||||
SPELL_CARRION_SWARM_H = 58852,
|
||||
SPELL_MIND_BLAST_N = 52722,
|
||||
SPELL_MIND_BLAST_H = 58850,
|
||||
SPELL_SLEEP_N = 52721,
|
||||
SPELL_SLEEP_H = 58849,
|
||||
SPELL_CARRION_SWARM = 52720,
|
||||
SPELL_MIND_BLAST = 52722,
|
||||
SPELL_SLEEP = 52721,
|
||||
SPELL_VAMPIRIC_TOUCH = 52723,
|
||||
};
|
||||
|
||||
@ -145,18 +142,18 @@ public:
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_SPELL_CARRION_SWARM:
|
||||
me->CastSpell(me->GetVictim(), DUNGEON_MODE(SPELL_CARRION_SWARM_N, SPELL_CARRION_SWARM_H), false);
|
||||
me->CastSpell(me->GetVictim(), SPELL_CARRION_SWARM, false);
|
||||
events.Repeat(7s);
|
||||
break;
|
||||
case EVENT_SPELL_MIND_BLAST:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true))
|
||||
me->CastSpell(target, DUNGEON_MODE(SPELL_MIND_BLAST_N, SPELL_MIND_BLAST_H), false);
|
||||
me->CastSpell(target, SPELL_MIND_BLAST, false);
|
||||
events.Repeat(6s);
|
||||
break;
|
||||
case EVENT_SPELL_SLEEP:
|
||||
Talk(SAY_SLEEP);
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true))
|
||||
me->CastSpell(target, DUNGEON_MODE(SPELL_SLEEP_N, SPELL_SLEEP_H), false);
|
||||
me->CastSpell(target, SPELL_SLEEP, false);
|
||||
events.Repeat(17s);
|
||||
break;
|
||||
case EVENT_SPELL_VAMPIRIC_TOUCH:
|
||||
|
||||
@ -21,10 +21,8 @@
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_CONSTRICTING_CHAINS_N = 52696,
|
||||
SPELL_CONSTRICTING_CHAINS_H = 58823,
|
||||
SPELL_DISEASE_EXPULSION_N = 52666,
|
||||
SPELL_DISEASE_EXPULSION_H = 58824,
|
||||
SPELL_CONSTRICTING_CHAINS = 52696,
|
||||
SPELL_DISEASE_EXPULSION = 52666,
|
||||
SPELL_FRENZY = 58841,
|
||||
};
|
||||
|
||||
@ -97,7 +95,7 @@ public:
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_SPELL_DISEASE_EXPULSION:
|
||||
me->CastSpell(me, DUNGEON_MODE(SPELL_DISEASE_EXPULSION_N, SPELL_DISEASE_EXPULSION_H), false);
|
||||
me->CastSpell(me, SPELL_DISEASE_EXPULSION, false);
|
||||
events.Repeat(6s);
|
||||
break;
|
||||
case EVENT_SPELL_FRENZY:
|
||||
@ -106,7 +104,7 @@ public:
|
||||
break;
|
||||
case EVENT_SPELL_CONSTRICTING_CHAINS:
|
||||
if (Unit* pTarget = SelectTarget(SelectTargetMethod::MinThreat, 0, 50.0f, true))
|
||||
me->CastSpell(pTarget, DUNGEON_MODE(SPELL_CONSTRICTING_CHAINS_N, SPELL_CONSTRICTING_CHAINS_H), false);
|
||||
me->CastSpell(pTarget, SPELL_CONSTRICTING_CHAINS, false);
|
||||
events.Repeat(14s);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -23,14 +23,12 @@
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_SHADOW_BOLT_N = 57725,
|
||||
SPELL_SHADOW_BOLT_H = 58827,
|
||||
SPELL_SHADOW_BOLT = 57725,
|
||||
SPELL_STEAL_FLESH_CHANNEL = 52708,
|
||||
SPELL_STEAL_FLESH_TARGET = 52711,
|
||||
SPELL_STEAL_FLESH_CASTER = 52712,
|
||||
SPELL_SUMMON_GHOULS = 52451,
|
||||
SPELL_EXPLODE_GHOUL_N = 52480,
|
||||
SPELL_EXPLODE_GHOUL_H = 58825,
|
||||
SPELL_EXPLODE_GHOUL = 52480,
|
||||
SPELL_CURSE_OF_TWISTED_FAITH = 58845,
|
||||
};
|
||||
|
||||
@ -112,7 +110,7 @@ public:
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*me, (*itr)))
|
||||
if (cr->IsAlive())
|
||||
{
|
||||
me->CastSpell(cr, DUNGEON_MODE(SPELL_EXPLODE_GHOUL_N, SPELL_EXPLODE_GHOUL_H), false);
|
||||
me->CastSpell(cr, SPELL_EXPLODE_GHOUL, false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -129,7 +127,7 @@ public:
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_SPELL_SHADOW_BOLT:
|
||||
me->CastSpell(me->GetVictim(), DUNGEON_MODE(SPELL_SHADOW_BOLT_N, SPELL_SHADOW_BOLT_H), false);
|
||||
me->CastSpell(me->GetVictim(), SPELL_SHADOW_BOLT, false);
|
||||
events.Repeat(10s);
|
||||
break;
|
||||
case EVENT_SPELL_STEAL_FLESH:
|
||||
|
||||
@ -141,8 +141,7 @@ enum Spells
|
||||
{
|
||||
// Combat spells
|
||||
SPELL_ARTHAS_AURA = 52442,
|
||||
SPELL_ARTHAS_EXORCISM_N = 52445,
|
||||
SPELL_ARTHAS_EXORCISM_H = 58822,
|
||||
SPELL_ARTHAS_EXORCISM = 52445,
|
||||
SPELL_ARTHAS_HOLY_LIGHT = 52444,
|
||||
|
||||
// Visuals
|
||||
@ -1178,7 +1177,7 @@ public:
|
||||
{
|
||||
case EVENT_COMBAT_EXORCISM:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
me->CastSpell(target, DUNGEON_MODE(SPELL_ARTHAS_EXORCISM_N, SPELL_ARTHAS_EXORCISM_H), false);
|
||||
me->CastSpell(target, SPELL_ARTHAS_EXORCISM, false);
|
||||
|
||||
combatEvents.Repeat(7300ms);
|
||||
break;
|
||||
|
||||
@ -114,10 +114,10 @@ struct boss_lieutenant_drake : public BossAI
|
||||
{
|
||||
switch (point)
|
||||
{
|
||||
case 7:
|
||||
case 8:
|
||||
Talk(SAY_ENTER);
|
||||
break;
|
||||
case 10:
|
||||
case 11:
|
||||
pathId = (me->GetEntry() * 10) + 1;
|
||||
runSecondPath = true;
|
||||
break;
|
||||
|
||||
@ -51,7 +51,7 @@ enum Belnistrasz
|
||||
EVENT_FROST_NOVA = 6,
|
||||
|
||||
PATH_ESCORT = 871710,
|
||||
POINT_REACH_IDOL = 17,
|
||||
POINT_REACH_IDOL = 18,
|
||||
|
||||
QUEST_EXTINGUISHING_THE_IDOL = 3525,
|
||||
|
||||
|
||||
@ -70,7 +70,7 @@ enum Emotes
|
||||
enum Points
|
||||
{
|
||||
POINT_AIR = 0,
|
||||
POINT_GROUND = 2,
|
||||
POINT_GROUND = 3,
|
||||
POINT_PARALYZE = 2
|
||||
};
|
||||
|
||||
|
||||
@ -54,12 +54,9 @@ enum Spells
|
||||
|
||||
// FIGHT
|
||||
SPELL_GIFT_OF_THE_HERALD = 56219,
|
||||
SPELL_CYCLONE_STRIKE = 56855, // Self
|
||||
SPELL_CYCLONE_STRIKE_H = 60030,
|
||||
SPELL_LIGHTNING_BOLT = 56891, // 40Y
|
||||
SPELL_LIGHTNING_BOLT_H = 60032, // 40Y
|
||||
SPELL_THUNDERSHOCK = 56926, // 30Y
|
||||
SPELL_THUNDERSHOCK_H = 60029 // 30Y
|
||||
SPELL_CYCLONE_STRIKE = 56855,
|
||||
SPELL_LIGHTNING_BOLT = 56891,
|
||||
SPELL_THUNDERSHOCK = 56926,
|
||||
};
|
||||
|
||||
enum Events
|
||||
@ -461,7 +458,7 @@ struct boss_jedoga_shadowseeker : public BossAI
|
||||
// Normal phase
|
||||
case EVENT_JEDOGA_CYCLONE:
|
||||
{
|
||||
DoCastSelf(DUNGEON_MODE(SPELL_CYCLONE_STRIKE, SPELL_CYCLONE_STRIKE_H), false);
|
||||
DoCastSelf(SPELL_CYCLONE_STRIKE, false);
|
||||
events.Repeat(10s, 14s);
|
||||
break;
|
||||
}
|
||||
@ -469,7 +466,7 @@ struct boss_jedoga_shadowseeker : public BossAI
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
{
|
||||
DoCast(pTarget, DUNGEON_MODE(SPELL_LIGHTNING_BOLT, SPELL_LIGHTNING_BOLT_H), false);
|
||||
DoCast(pTarget, SPELL_LIGHTNING_BOLT, false);
|
||||
}
|
||||
events.Repeat(11s, 15s);
|
||||
break;
|
||||
@ -478,7 +475,7 @@ struct boss_jedoga_shadowseeker : public BossAI
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
{
|
||||
DoCast(pTarget, DUNGEON_MODE(SPELL_THUNDERSHOCK, SPELL_THUNDERSHOCK_H), false);
|
||||
DoCast(pTarget, SPELL_THUNDERSHOCK, false);
|
||||
}
|
||||
|
||||
events.Repeat(16s, 22s);
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "ahnkahet.h"
|
||||
@ -38,11 +39,10 @@ enum Spells
|
||||
SPELL_BEAM_VISUAL = 60342,
|
||||
SPELL_VANISH = 55964,
|
||||
SPELL_SHADOWSTEP = 55966,
|
||||
SPELL_HOVER_FALL = 60425
|
||||
SPELL_HOVER_FALL = 60425,
|
||||
SPELL_EMBRACE_OF_THE_VAMPYR = 55959,
|
||||
};
|
||||
|
||||
#define SPELL_EMBRACE_OF_THE_VAMPYR DUNGEON_MODE(55959, 59513)
|
||||
|
||||
enum Spheres
|
||||
{
|
||||
NPC_FLAME_SPHERE_1 = 30106,
|
||||
@ -291,7 +291,7 @@ struct boss_taldaram : public BossAI
|
||||
{
|
||||
BossAI::DamageTaken(attacker, damage, damageType, school);
|
||||
|
||||
if (me->FindCurrentSpellBySpellId(SPELL_EMBRACE_OF_THE_VAMPYR))
|
||||
if (me->FindCurrentSpellBySpellId(sSpellMgr->GetSpellIdForDifficulty(SPELL_EMBRACE_OF_THE_VAMPYR, me)))
|
||||
{
|
||||
vanishDamage += damage;
|
||||
if (vanishDamage >= DUNGEON_MODE<uint32>(MAX_EMBRACE_DMG, MAX_EMBRACE_DMG_H))
|
||||
|
||||
@ -130,9 +130,9 @@ enum Misc
|
||||
ACTION_DRAKE_DIED = 3,
|
||||
|
||||
// Movement points
|
||||
POINT_FINAL_TENEBRON = 8,
|
||||
POINT_FINAL_SHADRON = 4,
|
||||
POINT_FINAL_VESPERON = 4,
|
||||
POINT_FINAL_TENEBRON = 9,
|
||||
POINT_FINAL_SHADRON = 5,
|
||||
POINT_FINAL_VESPERON = 5,
|
||||
|
||||
// Lava directions. Its used to identify to which side lava was moving by last time
|
||||
LAVA_LEFT_SIDE = 0,
|
||||
|
||||
@ -199,7 +199,7 @@ public:
|
||||
|
||||
WorldPacket data(SMSG_UPDATE_INSTANCE_ENCOUNTER_UNIT, 4);
|
||||
data << uint32(ENCOUNTER_FRAME_REFRESH_FRAMES);
|
||||
_owner->GetSession()->SendPacket(&data);
|
||||
_owner->SendDirectMessage(&data);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -45,12 +45,9 @@ enum EadricEvents
|
||||
|
||||
enum PaletressSpells
|
||||
{
|
||||
SPELL_SMITE_N = 66536,
|
||||
SPELL_SMITE_H = 67674,
|
||||
SPELL_HOLY_FIRE_N = 66538,
|
||||
SPELL_HOLY_FIRE_H = 67676,
|
||||
SPELL_RENEW_N = 66537,
|
||||
SPELL_RENEW_H = 67675,
|
||||
SPELL_SMITE = 66536,
|
||||
SPELL_HOLY_FIRE = 66538,
|
||||
SPELL_RENEW = 66537,
|
||||
|
||||
SPELL_HOLY_NOVA = 66546,
|
||||
SPELL_SHIELD = 66515,
|
||||
@ -58,21 +55,11 @@ enum PaletressSpells
|
||||
SPELL_SUMMON_MEMORY = 66545,
|
||||
|
||||
//Memory
|
||||
SPELL_OLD_WOUNDS_N = 66620,
|
||||
SPELL_OLD_WOUNDS_H = 67679,
|
||||
SPELL_SHADOWS_PAST_N = 66619,
|
||||
SPELL_SHADOWS_PAST_H = 67678,
|
||||
SPELL_WAKING_NIGHTMARE_N = 66552,
|
||||
SPELL_WAKING_NIGHTMARE_H = 67677,
|
||||
SPELL_OLD_WOUNDS = 66620,
|
||||
SPELL_SHADOWS_PAST = 66619,
|
||||
SPELL_WAKING_NIGHTMARE = 66552,
|
||||
};
|
||||
|
||||
#define SPELL_SMITE DUNGEON_MODE(SPELL_SMITE_N, SPELL_SMITE_H)
|
||||
#define SPELL_HOLY_FIRE DUNGEON_MODE(SPELL_HOLY_FIRE_N, SPELL_HOLY_FIRE_H)
|
||||
#define SPELL_RENEW DUNGEON_MODE(SPELL_RENEW_N, SPELL_RENEW_H)
|
||||
#define SPELL_OLD_WOUNDS DUNGEON_MODE(SPELL_OLD_WOUNDS_N, SPELL_OLD_WOUNDS_H)
|
||||
#define SPELL_SHADOWS_PAST DUNGEON_MODE(SPELL_SHADOWS_PAST_N, SPELL_SHADOWS_PAST_H)
|
||||
#define SPELL_WAKING_NIGHTMARE DUNGEON_MODE(SPELL_WAKING_NIGHTMARE_N, SPELL_WAKING_NIGHTMARE_H)
|
||||
|
||||
enum PaletressEvents
|
||||
{
|
||||
EVENT_SPELL_SMITE = 1,
|
||||
@ -477,29 +464,22 @@ enum ArgentSoldierSpells
|
||||
// monk
|
||||
SPELL_FLURRY_OF_BLOWS = 67233,
|
||||
SPELL_PUMMEL = 67235,
|
||||
SPELL_DIVINE_SHIELD_H = 67251,
|
||||
SPELL_FINAL_MEDITATION_H = 67255,
|
||||
SPELL_DIVINE_SHIELD = 67251,
|
||||
SPELL_FINAL_MEDITATION = 67255,
|
||||
|
||||
// priestess
|
||||
SPELL_HOLY_SMITE_N = 36176,
|
||||
SPELL_HOLY_SMITE_H = 67289,
|
||||
SPELL_HOLY_SMITE = 36176,
|
||||
SPELL_FOUNTAIN_OF_LIGHT = 67194,
|
||||
NPC_FOUNTAIN_OF_LIGHT = 35311,
|
||||
SPELL_SHADOW_WORD_PAIN_N = 34941,
|
||||
SPELL_SHADOW_WORD_PAIN_H = 34942,
|
||||
SPELL_MIND_CONTROL_H = 67229,
|
||||
SPELL_SHADOW_WORD_PAIN = 34941,
|
||||
SPELL_MIND_CONTROL = 67229,
|
||||
|
||||
// lightwielder
|
||||
SPELL_BLAZING_LIGHT_N = 67247,
|
||||
SPELL_BLAZING_LIGHT_H = 67290,
|
||||
SPELL_BLAZING_LIGHT = 67247,
|
||||
SPELL_CLEAVE = 15284,
|
||||
SPELL_UNBALANCING_STRIKE_H = 67237,
|
||||
SPELL_UNBALANCING_STRIKE = 67237,
|
||||
};
|
||||
|
||||
#define SPELL_HOLY_SMITE DUNGEON_MODE(SPELL_HOLY_SMITE_N, SPELL_HOLY_SMITE_H)
|
||||
#define SPELL_SHADOW_WORD_PAIN DUNGEON_MODE(SPELL_SHADOW_WORD_PAIN_N, SPELL_SHADOW_WORD_PAIN_H)
|
||||
#define SPELL_BLAZING_LIGHT DUNGEON_MODE(SPELL_BLAZING_LIGHT_N, SPELL_BLAZING_LIGHT_H)
|
||||
|
||||
enum ArgentSoldierEvents
|
||||
{
|
||||
EVENT_MONK_SPELL_FLURRY_OF_BLOWS = 1,
|
||||
@ -507,10 +487,10 @@ enum ArgentSoldierEvents
|
||||
EVENT_PRIESTESS_SPELL_HOLY_SMITE,
|
||||
EVENT_PRIESTESS_SPELL_SHADOW_WORD_PAIN,
|
||||
EVENT_PRIESTESS_SPELL_FOUNTAIN_OF_LIGHT,
|
||||
EVENT_PRIESTESS_SPELL_MIND_CONTROL_H,
|
||||
EVENT_PRIESTESS_SPELL_MIND_CONTROL,
|
||||
EVENT_LIGHTWIELDER_SPELL_BLAZING_LIGHT,
|
||||
EVENT_LIGHTWIELDER_SPELL_CLEAVE,
|
||||
EVENT_LIGHTWIELDER_SPELL_UNBALANCING_STRIKE_H,
|
||||
EVENT_LIGHTWIELDER_SPELL_UNBALANCING_STRIKE,
|
||||
};
|
||||
|
||||
class npc_argent_soldier : public CreatureScript
|
||||
@ -619,8 +599,8 @@ public:
|
||||
bCheck = false;
|
||||
damage = me->GetHealth() - 1;
|
||||
events.DelayEvents(10s);
|
||||
me->CastSpell(me, SPELL_DIVINE_SHIELD_H, true);
|
||||
me->CastSpell((Unit*)nullptr, SPELL_FINAL_MEDITATION_H, true);
|
||||
me->CastSpell(me, SPELL_DIVINE_SHIELD, true);
|
||||
me->CastSpell((Unit*)nullptr, SPELL_FINAL_MEDITATION, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -639,13 +619,13 @@ public:
|
||||
events.RescheduleEvent(EVENT_PRIESTESS_SPELL_SHADOW_WORD_PAIN, 3s, 6s);
|
||||
events.RescheduleEvent(EVENT_PRIESTESS_SPELL_FOUNTAIN_OF_LIGHT, 8s, 15s);
|
||||
if (IsHeroic())
|
||||
events.RescheduleEvent(EVENT_PRIESTESS_SPELL_MIND_CONTROL_H, 12s);
|
||||
events.RescheduleEvent(EVENT_PRIESTESS_SPELL_MIND_CONTROL, 12s);
|
||||
break;
|
||||
case NPC_ARGENT_LIGHTWIELDER:
|
||||
events.RescheduleEvent(EVENT_LIGHTWIELDER_SPELL_BLAZING_LIGHT, 12s, 15s);
|
||||
events.RescheduleEvent(EVENT_LIGHTWIELDER_SPELL_CLEAVE, 3s, 5s);
|
||||
if (IsHeroic())
|
||||
events.RescheduleEvent(EVENT_LIGHTWIELDER_SPELL_UNBALANCING_STRIKE_H, 8s, 12s);
|
||||
events.RescheduleEvent(EVENT_LIGHTWIELDER_SPELL_UNBALANCING_STRIKE, 8s, 12s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -691,9 +671,9 @@ public:
|
||||
me->CastSpell((Unit*)nullptr, SPELL_FOUNTAIN_OF_LIGHT, false);
|
||||
events.Repeat(35s, 45s);
|
||||
break;
|
||||
case EVENT_PRIESTESS_SPELL_MIND_CONTROL_H:
|
||||
case EVENT_PRIESTESS_SPELL_MIND_CONTROL:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true))
|
||||
me->CastSpell(target, SPELL_MIND_CONTROL_H, false);
|
||||
me->CastSpell(target, SPELL_MIND_CONTROL, false);
|
||||
events.Repeat(22s, 30s);
|
||||
break;
|
||||
|
||||
@ -711,9 +691,9 @@ public:
|
||||
me->CastSpell(me->GetVictim(), SPELL_CLEAVE, false);
|
||||
events.Repeat(6s, 8s);
|
||||
break;
|
||||
case EVENT_LIGHTWIELDER_SPELL_UNBALANCING_STRIKE_H:
|
||||
case EVENT_LIGHTWIELDER_SPELL_UNBALANCING_STRIKE:
|
||||
if (me->GetVictim())
|
||||
me->CastSpell(me->GetVictim(), SPELL_UNBALANCING_STRIKE_H, false);
|
||||
me->CastSpell(me->GetVictim(), SPELL_UNBALANCING_STRIKE, false);
|
||||
events.Repeat(12s, 15s);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -18,7 +18,11 @@
|
||||
#include "CreatureScript.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "Spell.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "trial_of_the_champion.h"
|
||||
|
||||
enum Spells
|
||||
@ -30,49 +34,29 @@ enum Spells
|
||||
SPELL_BK_KILL_CREDIT = 68663,
|
||||
|
||||
// phase 1
|
||||
SPELL_PLAGUE_STRIKE_N = 67724,
|
||||
SPELL_PLAGUE_STRIKE_H = 67884,
|
||||
SPELL_ICY_TOUCH_N = 67718,
|
||||
SPELL_ICY_TOUCH_H = 67881,
|
||||
SPELL_DEATH_RESPITE_N = 67745,
|
||||
SPELL_DEATH_RESPITE_H = 68306,
|
||||
SPELL_PLAGUE_STRIKE = 67724,
|
||||
SPELL_ICY_TOUCH = 67718,
|
||||
SPELL_DEATH_RESPITE = 67745,
|
||||
SPELL_DEATH_RESPITE_DUMMY = 66798,
|
||||
SPELL_OBLITERATE_N = 67725,
|
||||
SPELL_OBLITERATE_H = 67883,
|
||||
SPELL_OBLITERATE = 67725,
|
||||
|
||||
// phase 2 (+ abilities from phase 1 without death respite)
|
||||
SPELL_ARMY_DEAD_N = 67761,
|
||||
SPELL_ARMY_DEAD_H = 67874,
|
||||
SPELL_DESECRATION_N = 67778,
|
||||
SPELL_DESECRATION_H = 67877,
|
||||
SPELL_ARMY_DEAD = 67761,
|
||||
SPELL_DESECRATION = 67778,
|
||||
SPELL_DESECRATION_SUMMON = 67779,
|
||||
SPELL_BK_GHOUL_EXPLODE = 67751,
|
||||
|
||||
// phase 3
|
||||
SPELL_DEATH_BITE_N = 67808,
|
||||
SPELL_DEATH_BITE_H = 67875,
|
||||
SPELL_MARKED_DEATH_N = 67823,
|
||||
SPELL_MARKED_DEATH_H = 67882,
|
||||
SPELL_DEATH_BITE = 67808,
|
||||
SPELL_MARKED_DEATH = 67823,
|
||||
|
||||
// ghouls
|
||||
SPELL_CLAW_N = 67774,
|
||||
SPELL_CLAW = 67774,
|
||||
SPELL_CLAW_H = 67879,
|
||||
SPELL_EXPLODE_N = 67729,
|
||||
SPELL_EXPLODE_H = 67886,
|
||||
SPELL_LEAP_N = 67749,
|
||||
SPELL_LEAP_H = 67880,
|
||||
SPELL_EXPLODE = 67729,
|
||||
SPELL_EXPLODE_H = 67886,
|
||||
SPELL_LEAP = 67749,
|
||||
};
|
||||
#define SPELL_LEAP DUNGEON_MODE(SPELL_LEAP_N, SPELL_LEAP_H)
|
||||
#define SPELL_EXPLODE DUNGEON_MODE(SPELL_EXPLODE_N, SPELL_EXPLODE_H)
|
||||
|
||||
#define SPELL_PLAGUE_STRIKE DUNGEON_MODE(SPELL_PLAGUE_STRIKE_N, SPELL_PLAGUE_STRIKE_H)
|
||||
#define SPELL_ICY_TOUCH DUNGEON_MODE(SPELL_ICY_TOUCH_N, SPELL_ICY_TOUCH_H)
|
||||
#define SPELL_DEATH_RESPITE DUNGEON_MODE(SPELL_DEATH_RESPITE_N, SPELL_DEATH_RESPITE_H)
|
||||
#define SPELL_OBLITERATE DUNGEON_MODE(SPELL_OBLITERATE_N, SPELL_OBLITERATE_H)
|
||||
#define SPELL_ARMY_DEAD DUNGEON_MODE(SPELL_ARMY_DEAD_N, SPELL_ARMY_DEAD_H)
|
||||
#define SPELL_DESECRATION DUNGEON_MODE(SPELL_DESECRATION_N, SPELL_DESECRATION_H)
|
||||
#define SPELL_DEATH_BITE DUNGEON_MODE(SPELL_DEATH_BITE_N, SPELL_DEATH_BITE_H)
|
||||
#define SPELL_MARKED_DEATH DUNGEON_MODE(SPELL_MARKED_DEATH_N, SPELL_MARKED_DEATH_H)
|
||||
|
||||
enum Events
|
||||
{
|
||||
@ -420,27 +404,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
|
||||
{
|
||||
switch (spell->Id)
|
||||
{
|
||||
case SPELL_CLAW_N:
|
||||
case SPELL_CLAW_H:
|
||||
DoResetThreatList();
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f))
|
||||
{
|
||||
me->AddThreat(target, 100.0f);
|
||||
AttackStart(target);
|
||||
}
|
||||
break;
|
||||
case SPELL_EXPLODE_H:
|
||||
if (target && target->IsPlayer())
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ACHIEV_IVE_HAD_WORSE, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
@ -467,7 +430,7 @@ public:
|
||||
break;
|
||||
case 2: // claw
|
||||
if (Unit* target = me->GetVictim())
|
||||
me->CastSpell(target, SPELL_CLAW_N, false);
|
||||
me->CastSpell(target, SPELL_CLAW, false);
|
||||
events.Repeat(6s, 8s);
|
||||
break;
|
||||
}
|
||||
@ -482,9 +445,51 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
//67774,67879
|
||||
class spell_black_knight_ghoul_claw : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_black_knight_ghoul_claw);
|
||||
|
||||
void HandleSpellHit(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
GetCaster()->GetThreatMgr().ResetAllThreat();
|
||||
if (Unit* target = caster->GetAI()->SelectTarget(SelectTargetMethod::Random, 0, 30.0f))
|
||||
{
|
||||
caster->AddThreat(target, 100.0f);
|
||||
caster->GetAI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_black_knight_ghoul_claw::HandleSpellHit, EFFECT_0, SPELL_EFFECT_WEAPON_PERCENT_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
//67886
|
||||
class spell_black_knight_ghoul_explode : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_black_knight_ghoul_explode);
|
||||
|
||||
void HandleSpellHit(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (GetHitUnit()->IsPlayer())
|
||||
if (InstanceScript* instance = GetCaster()->GetInstanceScript())
|
||||
instance->SetData(DATA_ACHIEV_IVE_HAD_WORSE, 0);
|
||||
}
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_black_knight_ghoul_explode::HandleSpellHit, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_black_knight()
|
||||
{
|
||||
new boss_black_knight();
|
||||
new npc_black_knight_skeletal_gryphon();
|
||||
new npc_black_knight_ghoul();
|
||||
RegisterSpellScript(spell_black_knight_ghoul_claw);
|
||||
RegisterSpellScript(spell_black_knight_ghoul_explode);
|
||||
}
|
||||
|
||||
@ -56,38 +56,30 @@ enum MountSpells
|
||||
enum ChampionSpells
|
||||
{
|
||||
// Mage (Ambrose Boltspark, Eressea Dawnsinger)
|
||||
SPELL_FIREBALL_N = 66042,
|
||||
SPELL_FIREBALL_H = 68310,
|
||||
SPELL_BLAST_WAVE_N = 66044,
|
||||
SPELL_BLAST_WAVE_H = 68312,
|
||||
SPELL_FIREBALL = 66042,
|
||||
SPELL_BLAST_WAVE = 66044,
|
||||
SPELL_HASTE = 66045,
|
||||
SPELL_POLYMORPH_N = 66043,
|
||||
SPELL_POLYMORPH_H = 68311,
|
||||
SPELL_POLYMORPH = 66043,
|
||||
|
||||
// Shaman (Colosos, Runok Wildmane)
|
||||
SPELL_CHAIN_LIGHTNING_N = 67529,
|
||||
SPELL_CHAIN_LIGHTNING_H = 68319,
|
||||
SPELL_CHAIN_LIGHTNING = 67529,
|
||||
SPELL_EARTH_SHIELD = 67530,
|
||||
SPELL_HEALING_WAVE_N = 67528,
|
||||
SPELL_HEALING_WAVE_H = 68318,
|
||||
SPELL_HEALING_WAVE = 67528,
|
||||
SPELL_HEX_OF_MENDING = 67534,
|
||||
|
||||
// Hunter (Jaelyne Evensong, Zul'tore)
|
||||
SPELL_DISENGAGE = 68339,
|
||||
SPELL_LIGHTNING_ARROWS = 66083,
|
||||
SPELL_MULTI_SHOT = 66081,
|
||||
SPELL_SHOOT_N = 65868,
|
||||
SPELL_SHOOT_H = 67988,
|
||||
SPELL_SHOOT = 65868,
|
||||
|
||||
// Rogue (Lana Stouthammer Evensong, Deathstalker Visceri)
|
||||
SPELL_EVISCERATE_N = 67709,
|
||||
SPELL_EVISCERATE_H = 68317,
|
||||
SPELL_EVISCERATE = 67709,
|
||||
SPELL_FAN_OF_KNIVES = 67706,
|
||||
SPELL_POISON_BOTTLE = 67701,
|
||||
|
||||
// Warrior (Marshal Jacob Alerius, Mokra the Skullcrusher)
|
||||
SPELL_MORTAL_STRIKE_N = 68783,
|
||||
SPELL_MORTAL_STRIKE_H = 68784,
|
||||
SPELL_MORTAL_STRIKE = 68783,
|
||||
SPELL_BLADESTORM = 63784,
|
||||
SPELL_INTERCEPT = 67540,
|
||||
SPELL_ROLLING_THROW = 67546, // not implemented yet!
|
||||
@ -98,15 +90,6 @@ enum Texts
|
||||
SAY_TRAMPLED = 0,
|
||||
};
|
||||
|
||||
#define SPELL_FIREBALL DUNGEON_MODE(SPELL_FIREBALL_N, SPELL_FIREBALL_H)
|
||||
#define SPELL_BLAST_WAVE DUNGEON_MODE(SPELL_BLAST_WAVE_N, SPELL_BLAST_WAVE_H)
|
||||
#define SPELL_POLYMORPH DUNGEON_MODE(SPELL_POLYMORPH_N, SPELL_POLYMORPH_H)
|
||||
#define SPELL_CHAIN_LIGHTNING DUNGEON_MODE(SPELL_CHAIN_LIGHTNING_N, SPELL_CHAIN_LIGHTNING_H)
|
||||
#define SPELL_HEALING_WAVE DUNGEON_MODE(SPELL_HEALING_WAVE_N, SPELL_HEALING_WAVE_H)
|
||||
#define SPELL_SHOOT DUNGEON_MODE(SPELL_SHOOT_N, SPELL_SHOOT_H)
|
||||
#define SPELL_EVISCERATE DUNGEON_MODE(SPELL_EVISCERATE_N, SPELL_EVISCERATE_H)
|
||||
#define SPELL_MORTAL_STRIKE DUNGEON_MODE(SPELL_MORTAL_STRIKE_N, SPELL_MORTAL_STRIKE_H)
|
||||
|
||||
enum MountEvents
|
||||
{
|
||||
EVENT_NONE = 0,
|
||||
@ -213,7 +196,7 @@ public:
|
||||
data << uint32(VEHICLE_SPELL_RIDE_HARDCODED);
|
||||
data << uint8(SPELL_FAILED_CUSTOM_ERROR);
|
||||
data << uint32(SPELL_CUSTOM_ERROR_MUST_HAVE_LANCE_EQUIPPED);
|
||||
clicker->ToPlayer()->GetSession()->SendPacket(&data);
|
||||
clicker->ToPlayer()->SendDirectMessage(&data);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
#include "PassiveAI.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
@ -161,7 +162,7 @@ public:
|
||||
events.Reset();
|
||||
bIntro = false;
|
||||
bPhase3 = false;
|
||||
me->ApplySpellImmune(0, IMMUNITY_ID, RAID_MODE(66193, 67855, 67856, 67857), true);
|
||||
me->ApplySpellImmune(0, IMMUNITY_ID, sSpellMgr->GetSpellIdForDifficulty(SPELL_PERMAFROST, me), true);
|
||||
me->m_SightDistance = 90.0f; // for MoveInLineOfSight distance
|
||||
}
|
||||
|
||||
@ -501,7 +502,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
me->CastSpell(me, RAID_MODE(SPELL_TRAITOR_KING_10, SPELL_TRAITOR_KING_25, SPELL_TRAITOR_KING_10, SPELL_TRAITOR_KING_25), true);
|
||||
me->CastSpell(me, SPELL_TRAITOR_KING, true);
|
||||
me->m_Events.AddEventAtOffset(new HideNpcEvent(*me), 5s);
|
||||
}
|
||||
|
||||
@ -679,7 +680,7 @@ public:
|
||||
events.Repeat(30s, 45s);
|
||||
break;
|
||||
case EVENT_SUBMERGE:
|
||||
if (HealthBelowPct(80) && !me->HasAura(RAID_MODE(66193, 67855, 67856, 67857))) // not having permafrost - allow submerge
|
||||
if (HealthBelowPct(80) && !me->HasAura(sSpellMgr->GetSpellIdForDifficulty(SPELL_PERMAFROST, me))) // not having permafrost - allow submerge
|
||||
{
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
@ -351,8 +351,7 @@ enum EventSpells
|
||||
SPELL_JORMUNGAR_ACHIEV = 68523,
|
||||
SPELL_FACTION_CHAMPIONS_KILL_CREDIT = 68184,
|
||||
SPELL_RESILIENCE_WILL_FIX_IT_CREDIT = 68620,
|
||||
SPELL_TRAITOR_KING_10 = 68186,
|
||||
SPELL_TRAITOR_KING_25 = 68515,
|
||||
SPELL_TRAITOR_KING = 68186,
|
||||
SPELL_PORTAL_TO_DALARAN = 53142,
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user