From 41fc1a62298a003b61d17c1c2322d39abadf7082 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Thu, 30 Mar 2023 10:38:56 -0300 Subject: [PATCH 01/62] =?UTF-8?q?fix(Scripts/Arcatraz):=20Delay=20abilitie?= =?UTF-8?q?s=20during=20charge=20and=20delete=20trigg=E2=80=A6=20(#15653)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Scripts/Arcatraz): Delay abilities during charge and delete trigger spawns --- data/sql/updates/pending_db_world/rev_1680167534470778000.sql | 2 ++ .../TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 data/sql/updates/pending_db_world/rev_1680167534470778000.sql diff --git a/data/sql/updates/pending_db_world/rev_1680167534470778000.sql b/data/sql/updates/pending_db_world/rev_1680167534470778000.sql new file mode 100644 index 000000000..c1674d831 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680167534470778000.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `creature` WHERE `id1` = 20978; diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp index f4dcebefe..ab3c7bd70 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp @@ -128,9 +128,10 @@ struct boss_wrath_scryer_soccothrates : public BossAI scheduler.Schedule(30s, 35s, [this](TaskContext context) { + scheduler.DelayAll(5s); me->CastSpell(me, SPELL_KNOCK_AWAY, false); - me->HandleEmoteCommand(EMOTE_ONESHOT_POINT); Talk(SAY_KNOCK_AWAY); + me->HandleEmoteCommand(EMOTE_ONESHOT_POINT); scheduler.Schedule(4600ms, [this](TaskContext) { From c7accddad00a857a86107fedbd37cd5ffa53789e Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Thu, 30 Mar 2023 13:41:31 +0000 Subject: [PATCH 02/62] chore(DB): import pending files Referenced commit(s): 41fc1a62298a003b61d17c1c2322d39abadf7082 --- .../rev_1680167534470778000.sql => db_world/2023_03_30_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1680167534470778000.sql => db_world/2023_03_30_00.sql} (51%) diff --git a/data/sql/updates/pending_db_world/rev_1680167534470778000.sql b/data/sql/updates/db_world/2023_03_30_00.sql similarity index 51% rename from data/sql/updates/pending_db_world/rev_1680167534470778000.sql rename to data/sql/updates/db_world/2023_03_30_00.sql index c1674d831..759849695 100644 --- a/data/sql/updates/pending_db_world/rev_1680167534470778000.sql +++ b/data/sql/updates/db_world/2023_03_30_00.sql @@ -1,2 +1,3 @@ +-- DB update 2023_03_29_04 -> 2023_03_30_00 -- DELETE FROM `creature` WHERE `id1` = 20978; From ca26ef87f5443a7f53da8790de5e30df711d8bc3 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Thu, 30 Mar 2023 18:08:01 -0300 Subject: [PATCH 03/62] fix(DB/SAI): Correct combat mechanics in Mechanar's Gauntlet Event (#15649) Create rev_1680115354717005600.sql --- .../updates/pending_db_world/rev_1680115354717005600.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1680115354717005600.sql diff --git a/data/sql/updates/pending_db_world/rev_1680115354717005600.sql b/data/sql/updates/pending_db_world/rev_1680115354717005600.sql new file mode 100644 index 000000000..5667e894d --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680115354717005600.sql @@ -0,0 +1,8 @@ +-- +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 1922001) AND (`source_type` = 9) AND (`id` IN (3)); +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`, `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 +(1922001, 9, 3, 0, 0, 0, 100, 512, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Mechanar Gauntlet Engage - Actionlist - Set In Combat With Zone'); + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 1922002) AND (`source_type` = 9) AND (`id` IN (2)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `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 +(1922002, 9, 2, 0, 0, 0, 100, 512, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Mechanar Gauntlet Engage 2 - Actionlist - Set In Combat With Zone'); From 3ede5186ba20c0dfc8a38dbe517f14f1341498f6 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Thu, 30 Mar 2023 18:08:47 -0300 Subject: [PATCH 04/62] fix(DB/Creature): Remove rep rewards for killing Skyriss Images (#15646) Create rev_1680109188044403400.sql --- data/sql/updates/pending_db_world/rev_1680109188044403400.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1680109188044403400.sql diff --git a/data/sql/updates/pending_db_world/rev_1680109188044403400.sql b/data/sql/updates/pending_db_world/rev_1680109188044403400.sql new file mode 100644 index 000000000..dda29fa2d --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680109188044403400.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `creature_onkill_reputation` WHERE (`creature_id` IN (21466, 21467)); From ea047f2cf254803913bbd29eb49c22d1085cc134 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Thu, 30 Mar 2023 18:09:11 -0300 Subject: [PATCH 05/62] fix(Scripts/Mechanar): Add missing Enrage event for Pathaleon the Calculator (#15650) * init * 2 * indentation * 3 --- .../rev_1680124416269252400.sql | 8 +++++ .../boss_pathaleon_the_calculator.cpp | 35 ++++++++++++++----- 2 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1680124416269252400.sql diff --git a/data/sql/updates/pending_db_world/rev_1680124416269252400.sql b/data/sql/updates/pending_db_world/rev_1680124416269252400.sql new file mode 100644 index 000000000..b9fdb9510 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680124416269252400.sql @@ -0,0 +1,8 @@ +-- +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceEntry` = 35301) AND (`ConditionTypeOrReference` = 31) AND (`ConditionValue2` = 21062); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 35301, 0, 0, 31, 0, 3, 21062, 0, 0, 0, 0, '', 'Spell Suicide (35301) only targets Nether Wraith (21062)'); + +DELETE FROM `creature_equip_template` WHERE (`CreatureID` = 19220 AND `ID` = 2); +INSERT INTO `creature_equip_template` (`CreatureID`, `ID`, `ItemID1`, `ItemID2`, `ItemID3`, `VerifiedBuild`) VALUES +(19220, 2, 29455, 0, 0, 48526); diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp index 209aaae4b..0dabf465e 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp @@ -37,6 +37,8 @@ enum Spells SPELL_ARCANE_TORRENT = 36022, SPELL_MANA_TAP = 36021, SPELL_DOMINATION = 35280, + SPELL_FRENZY = 36992, + SPELL_SUICIDE = 35301, SPELL_ETHEREAL_TELEPORT = 34427, SPELL_GREATER_INVISIBILITY = 34426, SPELL_SUMMON_NETHER_WRAITH_1 = 35285, @@ -48,6 +50,8 @@ enum Spells enum Misc { ACTION_BRIDGE_MOB_DEATH = 1, // Used by SAI + EQUIPMENT_NORMAL = 1, + EQUIPMENT_FRENZY = 2, }; struct boss_pathaleon_the_calculator : public BossAI @@ -60,9 +64,13 @@ struct boss_pathaleon_the_calculator : public BossAI }); } + bool _isEnraged; + void Reset() override { _Reset(); + _isEnraged = false; + me->LoadEquipment(EQUIPMENT_NORMAL); if (instance->GetPersistentData(DATA_BRIDGE_MOB_DEATH_COUNT) < 4) { @@ -81,18 +89,23 @@ struct boss_pathaleon_the_calculator : public BossAI ScheduleHealthCheckEvent(20, [&]() { - summons.DespawnAll(); - DoCastSelf(SPELL_DISGRUNTLED_ANGER, true); + DoCastSelf(SPELL_SUICIDE, true); + DoCastSelf(SPELL_FRENZY, true); Talk(SAY_ENRAGE); + _isEnraged = true; + me->LoadEquipment(EQUIPMENT_FRENZY); }); - scheduler.Schedule(30s, [this](TaskContext context) + scheduler.Schedule(20s, 25s, [this](TaskContext context) { - for (uint8 i = 0; i < DUNGEON_MODE(3, 4); ++i) - me->CastSpell(me, SPELL_SUMMON_NETHER_WRAITH_1 + i, true); + if (!_isEnraged) + { + for (uint8 i = 0; i < DUNGEON_MODE(3, 4); ++i) + me->CastSpell(me, SPELL_SUMMON_NETHER_WRAITH_1 + i, true); - Talk(SAY_SUMMON); - context.Repeat(30s, 40s); + Talk(SAY_SUMMON); + } + context.Repeat(45s, 50s); }).Schedule(12s, [this](TaskContext context) { if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, PowerUsersSelector(me, POWER_MANA, 40.0f, false))) @@ -106,13 +119,17 @@ struct boss_pathaleon_the_calculator : public BossAI me->ModifyPower(POWER_MANA, 5000); DoCastSelf(SPELL_ARCANE_TORRENT); context.Repeat(15s); - }).Schedule(25s, [this](TaskContext context) + }).Schedule(10s, 15s, [this](TaskContext context) { if (DoCastRandomTarget(SPELL_DOMINATION, 1, 50.0f) == SPELL_CAST_OK) { Talk(SAY_DOMINATION); } - context.Repeat(30s); + context.Repeat(27s, 40s); + }).Schedule(25s, [this](TaskContext context) + { + DoCast(SPELL_DISGRUNTLED_ANGER); + context.Repeat(40s, 90s); }); if (IsHeroic()) From 41ac7e73520a04eff4fe2d3b4b4123ffe6034578 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Thu, 30 Mar 2023 21:11:53 +0000 Subject: [PATCH 06/62] chore(DB): import pending files Referenced commit(s): ea047f2cf254803913bbd29eb49c22d1085cc134 --- .../rev_1680109188044403400.sql => db_world/2023_03_30_01.sql} | 1 + .../rev_1680115354717005600.sql => db_world/2023_03_30_02.sql} | 1 + .../rev_1680124416269252400.sql => db_world/2023_03_30_03.sql} | 1 + 3 files changed, 3 insertions(+) rename data/sql/updates/{pending_db_world/rev_1680109188044403400.sql => db_world/2023_03_30_01.sql} (65%) rename data/sql/updates/{pending_db_world/rev_1680115354717005600.sql => db_world/2023_03_30_02.sql} (97%) rename data/sql/updates/{pending_db_world/rev_1680124416269252400.sql => db_world/2023_03_30_03.sql} (94%) diff --git a/data/sql/updates/pending_db_world/rev_1680109188044403400.sql b/data/sql/updates/db_world/2023_03_30_01.sql similarity index 65% rename from data/sql/updates/pending_db_world/rev_1680109188044403400.sql rename to data/sql/updates/db_world/2023_03_30_01.sql index dda29fa2d..f82ccd4f9 100644 --- a/data/sql/updates/pending_db_world/rev_1680109188044403400.sql +++ b/data/sql/updates/db_world/2023_03_30_01.sql @@ -1,2 +1,3 @@ +-- DB update 2023_03_30_00 -> 2023_03_30_01 -- DELETE FROM `creature_onkill_reputation` WHERE (`creature_id` IN (21466, 21467)); diff --git a/data/sql/updates/pending_db_world/rev_1680115354717005600.sql b/data/sql/updates/db_world/2023_03_30_02.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1680115354717005600.sql rename to data/sql/updates/db_world/2023_03_30_02.sql index 5667e894d..3b0fa285e 100644 --- a/data/sql/updates/pending_db_world/rev_1680115354717005600.sql +++ b/data/sql/updates/db_world/2023_03_30_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_03_30_01 -> 2023_03_30_02 -- DELETE FROM `smart_scripts` WHERE (`entryorguid` = 1922001) AND (`source_type` = 9) AND (`id` IN (3)); 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`, `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 diff --git a/data/sql/updates/pending_db_world/rev_1680124416269252400.sql b/data/sql/updates/db_world/2023_03_30_03.sql similarity index 94% rename from data/sql/updates/pending_db_world/rev_1680124416269252400.sql rename to data/sql/updates/db_world/2023_03_30_03.sql index b9fdb9510..48cec48aa 100644 --- a/data/sql/updates/pending_db_world/rev_1680124416269252400.sql +++ b/data/sql/updates/db_world/2023_03_30_03.sql @@ -1,3 +1,4 @@ +-- DB update 2023_03_30_02 -> 2023_03_30_03 -- DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceEntry` = 35301) AND (`ConditionTypeOrReference` = 31) AND (`ConditionValue2` = 21062); INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES From 18c696437e27dd7f1bdf7ccf5b4c43b8a6a4dcde Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Thu, 30 Mar 2023 18:35:08 -0300 Subject: [PATCH 07/62] fix(DB/SAI): Rewrite Nether Charge SAI (#15647) Create rev_1680113416988440900.sql --- .../pending_db_world/rev_1680113416988440900.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1680113416988440900.sql diff --git a/data/sql/updates/pending_db_world/rev_1680113416988440900.sql b/data/sql/updates/pending_db_world/rev_1680113416988440900.sql new file mode 100644 index 000000000..efda1b0aa --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680113416988440900.sql @@ -0,0 +1,15 @@ +-- +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 20405); +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`, `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 +(20405, 0, 0, 1, 25, 0, 100, 512, 0, 0, 0, 0, 0, 75, 35150, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nether Charge - On Reset - Add Aura \'Nether Charge Passive\''), +(20405, 0, 1, 2, 61, 0, 100, 512, 0, 0, 0, 0, 0, 11, 37670, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nether Charge - On Reset - Cast \'Nether Charge Timer\''), +(20405, 0, 2, 3, 61, 0, 100, 512, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nether Charge - On Reset - Set Reactstate Passive'), +(20405, 0, 3, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 89, 20, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nether Charge - On Reset - Start Random Movement'), +(20405, 0, 4, 0, 60, 0, 100, 513, 8500, 8500, 0, 0, 0, 80, 2040500, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nether Charge - On Update - Run Script (No Repeat)'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2040500); +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`, `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 +(2040500, 9, 0, 0, 0, 0, 100, 512, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nether Charge - Actionlist - Stop Random Movement'), +(2040500, 9, 1, 0, 0, 0, 100, 512, 2000, 2000, 0, 0, 0, 11, 35151, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nether Charge - Actionlist - Cast \'Nether Charge Pulse\''), +(2040500, 9, 2, 0, 0, 0, 100, 512, 2000, 2000, 0, 0, 0, 11, 35151, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nether Charge - Actionlist - Cast \'Nether Charge Pulse\''), +(2040500, 9, 3, 0, 0, 0, 100, 512, 2000, 2000, 0, 0, 0, 11, 35151, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nether Charge - Actionlist - Cast \'Nether Charge Pulse\''); From 1fdf2546ea0c24dc63c0119d88223129ce5c8411 Mon Sep 17 00:00:00 2001 From: Shaitz <56045932+Shaitz@users.noreply.github.com> Date: Thu, 30 Mar 2023 23:35:34 +0200 Subject: [PATCH 08/62] fix(DB/SAI): Shaleskin Flayer should cast Shaleskin out of combat (#15687) * fix(DB/SAI): Shaleskin Flayer should cast Shaleskin out of combat Fixes issue #15010 * Fix duration * Update data/sql/updates/pending_db_world/rev_1680197775441354500.sql --- data/sql/updates/pending_db_world/rev_1680197775441354500.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1680197775441354500.sql diff --git a/data/sql/updates/pending_db_world/rev_1680197775441354500.sql b/data/sql/updates/pending_db_world/rev_1680197775441354500.sql new file mode 100644 index 000000000..dfcd857c5 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680197775441354500.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 20210); +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`, `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 +(20210, 0, 0, 0, 1, 0, 100, 0, 0, 0, 600000, 600000, 0, 11, 36576, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shaleskin Flayer - Out Of Combat - Cast \'Shaleskin\''); From 5df23db10114a94f580e200544a1267b3a3ee5d0 Mon Sep 17 00:00:00 2001 From: elthehablo <83884799+elthehablo@users.noreply.github.com> Date: Thu, 30 Mar 2023 23:35:52 +0200 Subject: [PATCH 09/62] fix(DB/Loot): Remove Bloodforged Guard and Gold-Trimmed Cuffs from reference loot (#15609) * fix(DB/Loot): removal of BOP quest loot removes two quest items (Gold-Trimmed Cuffs and Bloodforged Guard) from a reference loot table used by a few mobs in Hellfire Peninsula. * Update data/sql/updates/pending_db_world/remove-bop-quest-loot.sql --- data/sql/updates/pending_db_world/remove-bop-quest-loot.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 data/sql/updates/pending_db_world/remove-bop-quest-loot.sql diff --git a/data/sql/updates/pending_db_world/remove-bop-quest-loot.sql b/data/sql/updates/pending_db_world/remove-bop-quest-loot.sql new file mode 100644 index 000000000..6365c749b --- /dev/null +++ b/data/sql/updates/pending_db_world/remove-bop-quest-loot.sql @@ -0,0 +1 @@ +DELETE FROM reference_loot_template WHERE (`Entry` = 4110) AND (`Item` IN (30520, 30986)); From 944404303ee340ce4050eeec16f327fc1b721798 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Fri, 31 Mar 2023 00:36:02 +0300 Subject: [PATCH 10/62] fix(DB/Gameobject): Snap Floating Ivory Bell to ground. (#15596) fix(DB/Gameobject): Floating Ivory Bell. --- data/sql/updates/pending_db_world/rev_1679860646913027800.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1679860646913027800.sql diff --git a/data/sql/updates/pending_db_world/rev_1679860646913027800.sql b/data/sql/updates/pending_db_world/rev_1679860646913027800.sql new file mode 100644 index 000000000..05c8d940f --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1679860646913027800.sql @@ -0,0 +1,2 @@ +-- Floating Ivory Bell +UPDATE `gameobject` SET `position_z` = 145.04 WHERE `id` = 184443 AND `guid` = 25285; From ed6040a272fede87ed2eb55d1c87b77c8a92d7f9 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Thu, 30 Mar 2023 21:38:41 +0000 Subject: [PATCH 11/62] chore(DB): import pending files Referenced commit(s): 944404303ee340ce4050eeec16f327fc1b721798 --- .../remove-bop-quest-loot.sql => db_world/2023_03_30_04.sql} | 1 + .../rev_1679860646913027800.sql => db_world/2023_03_30_05.sql} | 1 + .../rev_1680113416988440900.sql => db_world/2023_03_30_06.sql} | 1 + .../rev_1680197775441354500.sql => db_world/2023_03_30_07.sql} | 1 + 4 files changed, 4 insertions(+) rename data/sql/updates/{pending_db_world/remove-bop-quest-loot.sql => db_world/2023_03_30_04.sql} (67%) rename data/sql/updates/{pending_db_world/rev_1679860646913027800.sql => db_world/2023_03_30_05.sql} (71%) rename data/sql/updates/{pending_db_world/rev_1680113416988440900.sql => db_world/2023_03_30_06.sql} (98%) rename data/sql/updates/{pending_db_world/rev_1680197775441354500.sql => db_world/2023_03_30_07.sql} (94%) diff --git a/data/sql/updates/pending_db_world/remove-bop-quest-loot.sql b/data/sql/updates/db_world/2023_03_30_04.sql similarity index 67% rename from data/sql/updates/pending_db_world/remove-bop-quest-loot.sql rename to data/sql/updates/db_world/2023_03_30_04.sql index 6365c749b..e7f92b744 100644 --- a/data/sql/updates/pending_db_world/remove-bop-quest-loot.sql +++ b/data/sql/updates/db_world/2023_03_30_04.sql @@ -1 +1,2 @@ +-- DB update 2023_03_30_03 -> 2023_03_30_04 DELETE FROM reference_loot_template WHERE (`Entry` = 4110) AND (`Item` IN (30520, 30986)); diff --git a/data/sql/updates/pending_db_world/rev_1679860646913027800.sql b/data/sql/updates/db_world/2023_03_30_05.sql similarity index 71% rename from data/sql/updates/pending_db_world/rev_1679860646913027800.sql rename to data/sql/updates/db_world/2023_03_30_05.sql index 05c8d940f..d1efb0b6f 100644 --- a/data/sql/updates/pending_db_world/rev_1679860646913027800.sql +++ b/data/sql/updates/db_world/2023_03_30_05.sql @@ -1,2 +1,3 @@ +-- DB update 2023_03_30_04 -> 2023_03_30_05 -- Floating Ivory Bell UPDATE `gameobject` SET `position_z` = 145.04 WHERE `id` = 184443 AND `guid` = 25285; diff --git a/data/sql/updates/pending_db_world/rev_1680113416988440900.sql b/data/sql/updates/db_world/2023_03_30_06.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1680113416988440900.sql rename to data/sql/updates/db_world/2023_03_30_06.sql index efda1b0aa..d961a0fe3 100644 --- a/data/sql/updates/pending_db_world/rev_1680113416988440900.sql +++ b/data/sql/updates/db_world/2023_03_30_06.sql @@ -1,3 +1,4 @@ +-- DB update 2023_03_30_05 -> 2023_03_30_06 -- DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 20405); 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`, `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 diff --git a/data/sql/updates/pending_db_world/rev_1680197775441354500.sql b/data/sql/updates/db_world/2023_03_30_07.sql similarity index 94% rename from data/sql/updates/pending_db_world/rev_1680197775441354500.sql rename to data/sql/updates/db_world/2023_03_30_07.sql index dfcd857c5..1f2cf2c89 100644 --- a/data/sql/updates/pending_db_world/rev_1680197775441354500.sql +++ b/data/sql/updates/db_world/2023_03_30_07.sql @@ -1,3 +1,4 @@ +-- DB update 2023_03_30_06 -> 2023_03_30_07 -- DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 20210); 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`, `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 From 651113535a3aa8e5b638529fdb982c6ca6b4ca6f Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Thu, 30 Mar 2023 23:52:20 -0300 Subject: [PATCH 12/62] fix(DB/Spell): Correct Effect of all Summon dbc spells (#15652) * Create rev_1680141080010135400.sql * Update rev_1680141080010135400.sql --- .../rev_1680141080010135400.sql | 277 ++++++++++++++++++ 1 file changed, 277 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1680141080010135400.sql diff --git a/data/sql/updates/pending_db_world/rev_1680141080010135400.sql b/data/sql/updates/pending_db_world/rev_1680141080010135400.sql new file mode 100644 index 000000000..c5658e4ca --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680141080010135400.sql @@ -0,0 +1,277 @@ +-- +UPDATE `spell_dbc` SET `Effect_1` = 28, `EffectMiscValueB_1` = 64, `EffectBasePoints_1` = -1 WHERE `ID` IN ( +14802 -- Idol Room Spawn B +); + +UPDATE `spell_dbc` SET `Effect_1` = 28, `EffectMiscValueB_1` = 64, `EffectBasePoints_1` = 0 WHERE `ID` IN ( +12694, -- Idol Room Spawn A +12949, -- Idol Room Spawn End Boss +14801, -- Idol Room Spawn C +19826, -- Summon Blackwing Legionnaire +19827, -- Summon Blackwing Mage +19828, -- Summon Death Talon Dragonspawn +20172, -- Summon Onyxian Whelp +21287, -- Conjure Lokholar the Usurper DND +23118, -- Conjure Scourge Footsoldier DND +23209, -- Terrordale Haunting Spirit #2 +23253, -- Terrordale Haunting Spirit #3 +23361, -- Raise Undead Drakonid +24215, -- Create Heart of Hakkar Explosion +24250, -- Summon Zulian Stalker +24349, -- Summon Bloodlord's Raptor +25151, -- Summon Vekniss Drone +26140, -- Summon Hook Tentacle +26144, -- Summon Eye Tentacle +26145, -- Summon Eye Tentacle +26146, -- Summon Eye Tentacle +26147, -- Summon Eye Tentacle +26148, -- Summon Eye Tentacle +26149, -- Summon Eye Tentacle +26150, -- Summon Eye Tentacle +26151, -- Summon Eye Tentacle +26191, -- Teleport Giant Hook Tentacle +26216, -- Summon Giant Hook Tentacles +26396, -- Summon Portal Ground State +26477, -- Summon Giant Portal Ground State +26564, -- Summon Viscidus Trigger +26617, -- Summon Ouro Mound +26768, -- Summon Giant Eye Tentacles +26837, -- Summon InCombat Trigger +27178, -- Defile +27643, -- Summon Spirit of Jarien +27644, -- Summon Spirit of Sothos +27884, -- Summon Trainee +27921, -- Summon Spectral Trainee +27932, -- Summon Spectral Knight +27939, -- Summon Spectral Rivendare +28008, -- Summon Knight +28010, -- Summon Mounted Knight +28175, -- (DND) Summon Crystal Minion, Ghost +28177, -- (DND) Summon Crystal Minion, Skeleton +28179, -- (DND) Summon Crystal Minion, Ghoul +28217, -- Summon Zombie Chow +28218, -- Summon Fallout Slime +28227, -- (DND) Summon Crystal Minion, finder +28289, -- (DND) Summon Crystal Minion, Ghoul Uncommon +28290, -- (DND) Summon Crystal Minion, Ghost Uncommon +28291, -- (DND) Summon Crystal Minion, Skeleton Uncommon +28421, -- Summon Type A +28422, -- Summon Type B +28423, -- Summon Type C +28454, -- Summon Type D +28561, -- Summon Blizzard +28627, -- Summon Web Wrap +29141, -- Marauding Crust Borer +29218, -- Summon Flame Ring +29329, -- Summon Sapphiron's Wing Buffet +29508, -- Summon Crypt Guard +29869, -- Fished Up Murloc +30083, -- Summon Root Thresher +30445, -- Stillpine Ancestor Yor +30630, -- Debris +30737, -- Summon Heathen +30785, -- Summon Reaver +30786, -- Summon Sharpshooter +30954, -- Free Webbed Creature +30955, -- Free Webbed Creature +30956, -- Free Webbed Creature +30957, -- Free Webbed Creature +30958, -- Free Webbed Creature +30959, -- Free Webbed Creature +30960, -- Free Webbed Creature +30961, -- Free Webbed Creature +30962, -- Free Webbed Creature +30963, -- Free Webbed Creature +31010, -- Free Webbed Creature +31318, -- Summon Infinite Assassin +31321, -- Summon Black Morass Rift Lord +31391, -- Summon Black Morass Chrono Lord Deja +31392, -- Summon Black Morass Temporus +31393, -- Summon Black Morass Rift End Boss +31421, -- Summon Infinite Chronomancer +31528, -- Summon Gnome +31529, -- Summon Gnome +31530, -- Summon Gnome +31544, -- Summon Distiller +31545, -- Summon Distiller +31593, -- Summon Greater Manawraith +32114, -- Summon Wisp +32151, -- Infernal +32283, -- Focus Fire +32360, -- Summon Stolen Soul +32579, -- Portal Beam +32632, -- Summon Overrun Target +33121, -- A Vision of the Forgotten +33229, -- Wrath of the Astromancer +33242, -- Infernal +33363, -- Summon Infinite Executioner +33364, -- Summon Infinite Vanquisher +33367, -- Summon Astromancer Priest +33567, -- Summon Void Portal D +33677, -- Incite Chaos +33680, -- Incite Chaos +33681, -- Incite Chaos +33682, -- Incite Chaos +33683, -- Incite Chaos +33901, -- Summon Crystalhide Crumbler +33927, -- Summon Void Summoner +34064, -- Soul Split +34125, -- Spotlight +34175, -- Arcane Orb Primer +35127, -- Summon Boom Bot Target +35136, -- Summon Captured Critter +35142, -- Drijya Summon Imp +35145, -- Drijya Summon Doomguard +35146, -- Drijya Summon Terrorguard +35256, -- Summon Unstable Mushroom +35430, -- Infernal +35861, -- Summon Nether Vapor +35862, -- Summon Nether Vapor +35863, -- Summon Nether Vapor +35864, -- Summon Nether Vapor +36026, -- Conjure Elemental Soul: Earth +36036, -- Summon Netherstorm Target +36042, -- Summon Farahlon Crumbler +36043, -- Summon Farahlon Crumbler +36044, -- Summon Farahlon Crumbler +36045, -- Summon Farahlon Shardling +36046, -- Summon Farahlon Shardling +36047, -- Summon Farahlon Shardling +36048, -- Summon Motherlode Shardling +36049, -- Summon Motherlode Shardling +36050, -- Summon Motherlode Shardling +36112, -- Conjure Elemental Soul: Fire +36168, -- Conjure Elemental Soul: Water +36180, -- Conjure Elemental Soul: Air +36221, -- Summon Eye of the Citadel +36229, -- Summon Infinite Assassin +36231, -- Summon Infinite Chronomancer +36232, -- Summon Infinite Executioner +36233, -- Summon Infinite Vanquisher +36234, -- Summon Black Morass Rift Lord Alt +36235, -- Summon Black Morass Rift Keeper +36236, -- Summon Black Morass Rift Keeper +36521, -- Summon Arcane Explosion +36579, -- Summon Netherock Crumbler +36584, -- Summon Netherock Crumbler +36585, -- Summon Netherock Crumbler +36595, -- Summon Apex Crumbler +36596, -- Summon Apex Crumbler +36597, -- Summon Apex Crumbler +36724, -- Summon Phoenix Egg +36818, -- Attacking Infernal +36865, -- Summon Gnome Cannon Channel Target (DND) +37177, -- Summon Black Morass Infinite Chrono-Lord +37178, -- Summon Black Morass Infinite Timereaver +37457, -- Windsor Dismisses Horse DND +37606, -- Summon Infinite Assassin +37758, -- Bone Wastes - Summon Auchenai Spirit +37766, -- Summon Murloc A1 +37772, -- Summon Murloc B1 +37773, -- Summon Elemental A1 +37774, -- Summon Elemental B1 +37911, -- Summon Elemental A2 +37912, -- Summon Elemental A3 +37914, -- Summon Elemental B2 +37916, -- Summon Elemental B3 +37923, -- Summon Murloc A2 +37925, -- Summon Murloc A3 +37926, -- Summon Murloc A4 +37927, -- Summon Murloc A5 +37928, -- Summon Murloc B2 +37929, -- Summon Murloc B3 +37931, -- Summon Murloc B4 +37932, -- Summon Murloc B5 +38111, -- Summon Horde Bat Rider Guard +38114, -- Summon Horde Rooftop Alarm Sensor +38118, -- Summon Area 52 Death Machine Guard +38124, -- Summon Horde Ground Alarm Sensor +38137, -- Summon Sky Marker +38179, -- Summon Alliance Ground Alarm Sensor +38180, -- Summon Alliance Rooftop Alarm Sensor +38181, -- Summon Alliance Gryphon Guard +38261, -- Summon Area 52 Rooftop Alarm Sensor +38266, -- Summon Stormspire Ethereal Guard +38268, -- Summon Scryer Dragonhawk Guard +38270, -- Summon Stormspire Rooftop Alarm Sensor +38271, -- Summon Scryer Rooftop Alarm Sensor +38278, -- Summon Aldor Gryphon Guard +38283, -- Summon Aldor Rooftop Alarm Sensor +38286, -- Summon Sporeggar Sporebat Guard +38287, -- Summon Sporeggar Rooftop Alarm Sensor +38288, -- Summon Toshley Guard +38291, -- Summon Toshley Rooftop Alarm Sensor +38402, -- Summon Cenarion Storm Crow Guard +38403, -- Summon Cenarion Expedition Rooftop Alarm Sensor +38512, -- Fiery Boulder +38587, -- Summon Spirit of Redemption +38854, -- Hatch Arakkoa +38865, -- Hatch Bad Arakkoa +39080, -- Summon Mountain Shardling +39081, -- Summon Vortex Shardling +39186, -- Summon Random Tractor +39191, -- Sha'tari Flames +39302, -- Quest - The Exorcism, Summon Foul Purge +39305 -- Summon Flying Skull +); + +UPDATE `spell_dbc` SET `Effect_1` = 28, `EffectMiscValueB_1` = 64, `EffectBasePoints_1` = 1 WHERE `ID` IN ( +20734, -- Black Arrow +30792, -- Summon Ravager Ambusher +30825, -- Summon Siltfin Ambusher +30826, -- Summon Wildkin Ambusher +30976, -- Summon Gauntlet Guards +31995, -- Shattered Rumbler +39110 -- Summon Phoenix Adds +); + +UPDATE `spell_dbc` SET `Effect_1` = 28, `EffectMiscValueB_1` = 64, `EffectBasePoints_1` = 2 WHERE `ID` IN ( +30076, -- Summon Maexxna Spiderling +30827, -- Summon Bristlelimb Ambusher +36379 -- Call Skitterers +); + +UPDATE `spell_dbc` SET `Effect_1` = 28, `EffectMiscValueB_1` = 64, `EffectBasePoints_1` = 3 WHERE `ID` IN ( +26630, -- Spawn Vekniss Hatchlings +26631, -- Spawn Vekniss Hatchlings +26632, -- Spawn Vekniss Hatchlings +30828 -- Summon Sunhawk Ambushers +); + +UPDATE `spell_dbc` SET `Effect_1` = 28, `EffectMiscValueB_1` = 64, `EffectBasePoints_1` = 4 WHERE `ID` IN ( +33362 -- Summon Astromancer Adds +); + +UPDATE `spell_dbc` SET `Effect_1` = 28, `EffectMiscValueB_1` = 64, `EffectBasePoints_1` = 5 WHERE `ID` IN ( +23119, -- Conjure Peasant DND +23121 -- Conjure Peasant DND +); + +UPDATE `spell_dbc` SET `Effect_1` = 28, `EffectMiscValueB_1` = 64, `EffectBasePoints_1` = 9 WHERE `ID` IN ( +25789, -- Summon Yauj Brood +29434 -- Summon Maexxna Spiderling +); + +UPDATE `spell_dbc` SET `Effect_2` = 28, `EffectMiscValueB_2` = 64, `EffectBasePoints_2` = 1 WHERE `ID` IN ( +21883 -- Summon Healed Celebrian Vine +); + +UPDATE `spell_dbc` SET `Effect_2` = 28, `EffectMiscValueB_2` = 64, `EffectBasePoints_2` = 0 WHERE `ID` IN ( +23201, -- Hunter Epic Anti-Cheat DND +27939, -- Summon Spectral Rivendare +29110, -- Summon Enraged Mounts +30774, -- Summon Elekk +33614, -- Summon Void Portal B +33616, -- Summon Void Portal E +36616, -- Veneratus Spawn +39074, -- [DND]Rexxars Bird Effect +69868 -- Carrying Beer Barrels [TEST] +); + +UPDATE `spell_dbc` SET `Effect_2` = 28, `EffectMiscValueB_2` = 496, `EffectBasePoints_2` = 0 WHERE `ID` IN ( +74125 -- Summon Creator Spell Test +); + +UPDATE `spell_dbc` SET `Effect_3` = 28, `EffectMiscValueB_3` = 496, `EffectBasePoints_3` = 0 WHERE `ID` IN ( +33615 -- Summon Void Portal C +); From 849e534cb950d6ec6f1f2d9ae9a7444e7c3d4bcb Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Fri, 31 Mar 2023 02:54:57 +0000 Subject: [PATCH 13/62] chore(DB): import pending files Referenced commit(s): 651113535a3aa8e5b638529fdb982c6ca6b4ca6f --- .../rev_1680141080010135400.sql => db_world/2023_03_31_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1680141080010135400.sql => db_world/2023_03_31_00.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1680141080010135400.sql b/data/sql/updates/db_world/2023_03_31_00.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1680141080010135400.sql rename to data/sql/updates/db_world/2023_03_31_00.sql index c5658e4ca..e119e2c98 100644 --- a/data/sql/updates/pending_db_world/rev_1680141080010135400.sql +++ b/data/sql/updates/db_world/2023_03_31_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_03_30_07 -> 2023_03_31_00 -- UPDATE `spell_dbc` SET `Effect_1` = 28, `EffectMiscValueB_1` = 64, `EffectBasePoints_1` = -1 WHERE `ID` IN ( 14802 -- Idol Room Spawn B From 66acaef60657092f8cf7b5e58d522c6df9e06a6a Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Fri, 31 Mar 2023 01:15:44 -0300 Subject: [PATCH 14/62] fix(Scripts/Arcatraz): Update timers after research (#15726) --- .../arcatraz/boss_dalliah_the_doomsayer.cpp | 12 ++++++------ .../arcatraz/boss_wrath_scryer_soccothrates.cpp | 2 +- .../arcatraz/boss_zereketh_the_unbound.cpp | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp index 9489da3ad..74daf78ad 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp @@ -91,15 +91,15 @@ struct boss_dalliah_the_doomsayer : public BossAI } } - scheduler.Schedule(1s, 4s, [this](TaskContext context) + scheduler.Schedule(8s, 12s, [this](TaskContext context) { DoCastVictim(SPELL_GIFT_OF_THE_DOOMSAYER); - context.Repeat(16s, 21s); - }).Schedule(7s, 9s, [this](TaskContext context) + context.Repeat(17s, 35s); + }).Schedule(20s, 30s, [this](TaskContext context) { Talk(SAY_WHIRLWIND); DoCastAOE(SPELL_WHIRLWIND); - context.Repeat(19s, 21s); + context.Repeat(); scheduler.Schedule(7s, [this](TaskContext) { @@ -110,10 +110,10 @@ struct boss_dalliah_the_doomsayer : public BossAI if (IsHeroic()) { - scheduler.Schedule(11s, 16s, [this](TaskContext context) + scheduler.Schedule(11s, 30s, [this](TaskContext context) { DoCastVictim(SPELL_SHADOW_WAVE); - context.Repeat(11s, 16s); + context.Repeat(); }); } } diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp index ab3c7bd70..11317d5cf 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp @@ -150,7 +150,7 @@ struct boss_wrath_scryer_soccothrates : public BossAI }); context.Repeat(20s, 35s); - }).Schedule(12s, 14s, [this](TaskContext context) + }).Schedule(8500ms, 22s, [this](TaskContext context) { DoCastVictim(SPELL_FELFIRE_SHOCK); context.Repeat(); diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp index 160a641ef..bfccdd779 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp @@ -56,22 +56,22 @@ struct boss_zereketh_the_unbound : public BossAI _JustEngagedWith(); Talk(SAY_AGGRO); - scheduler.Schedule(6s, [this](TaskContext context) + scheduler.Schedule(11s, 29s, [this](TaskContext context) { DoCastRandomTarget(SPELL_VOID_ZONE, 0, 60.0f); - context.Repeat(15s); - }).Schedule(10s, [this](TaskContext context) + context.Repeat(); + }).Schedule(12s, 22s, [this](TaskContext context) { DoCastAOE(SPELL_SHADOW_NOVA); if (roll_chance_i(50)) { Talk(SAY_SHADOW_NOVA); } - context.Repeat(12s); - }).Schedule(16s, [this](TaskContext context) + context.Repeat(); + }).Schedule(6s, 12s, [this](TaskContext context) { DoCastRandomTarget(SPELL_SEED_OF_CORRUPTION, 0, 30.0f); - context.Repeat(16s); + context.Repeat(13s, 27s); }); } From 933b3e1fdd209e6a6e546c08ab51c72d1f140d0e Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Fri, 31 Mar 2023 10:43:49 +0200 Subject: [PATCH 15/62] fix(Core/Groups): Implement MSG_RAID_READY_CHECK_FINISHED (#15442) * cherry-pick commit (https://github.com/TrinityCore/TrinityCore/commit/c8f7dd13b844a25f8932e4dc419d985b4f680793) Co-authored-by: robinsch --- src/server/game/Handlers/GroupHandler.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp index 69bde972a..195257b2a 100644 --- a/src/server/game/Handlers/GroupHandler.cpp +++ b/src/server/game/Handlers/GroupHandler.cpp @@ -784,14 +784,15 @@ void WorldSession::HandleRaidReadyCheckOpcode(WorldPacket& recvData) void WorldSession::HandleRaidReadyCheckFinishedOpcode(WorldPacket& /*recvData*/) { - //Group* group = GetPlayer()->GetGroup(); - //if (!group) - // return; + Group* group = GetPlayer()->GetGroup(); + if (!group) + return; - //if (!group->IsLeader(GetPlayer()->GetGUID()) && !group->IsAssistant(GetPlayer()->GetGUID())) - // return; + if (!group->IsLeader(GetPlayer()->GetGUID()) && !group->IsAssistant(GetPlayer()->GetGUID())) + return; - // Is any reaction need? + WorldPacket data(MSG_RAID_READY_CHECK_FINISHED); + group->BroadcastPacket(&data, true, -1); } void WorldSession::BuildPartyMemberStatsChangedPacket(Player* player, WorldPacket* data) From 85a8320efe20e4e9a1cb0c14bf85c1056ab00ceb Mon Sep 17 00:00:00 2001 From: Eddy Vega <61223313+Si1ker@users.noreply.github.com> Date: Fri, 31 Mar 2023 07:02:32 -0600 Subject: [PATCH 16/62] fix(DB/SAI): Corrections to Death Watcher (#15729) * init * format * end * Update data/sql/updates/pending_db_world/rev_1680250223811678100.sql --------- Co-authored-by: Si1ker --- .../updates/pending_db_world/rev_1680250223811678100.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1680250223811678100.sql diff --git a/data/sql/updates/pending_db_world/rev_1680250223811678100.sql b/data/sql/updates/pending_db_world/rev_1680250223811678100.sql new file mode 100644 index 000000000..797ae0a2d --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680250223811678100.sql @@ -0,0 +1,7 @@ +-- +DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (20867, -138927)) AND (`source_type` = 0) AND (`id` IN (3, 4)); +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`, `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 +(20867, 0, 3, 4, 6, 0, 100, 0, 0, 0, 0, 0, 0, 28, 36657, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Watcher - On Just Died - Remove Aura \'Death Count\''), +(20867, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 28, 38818, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Watcher - On Just Died - Remove Aura \'Death Count\''), +(-138927, 0, 3, 4, 6, 0, 100, 0, 0, 0, 0, 0, 0, 28, 36657, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Watcher - On Just Died - Remove Aura \'Death Count\''), +(-138927, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 28, 38818, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Watcher - On Just Died - Remove Aura \'Death Count\''); From 606bbde721b5f8856a202d14638a829165f06432 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Fri, 31 Mar 2023 13:05:02 +0000 Subject: [PATCH 17/62] chore(DB): import pending files Referenced commit(s): 85a8320efe20e4e9a1cb0c14bf85c1056ab00ceb --- .../rev_1680250223811678100.sql => db_world/2023_03_31_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1680250223811678100.sql => db_world/2023_03_31_01.sql} (96%) diff --git a/data/sql/updates/pending_db_world/rev_1680250223811678100.sql b/data/sql/updates/db_world/2023_03_31_01.sql similarity index 96% rename from data/sql/updates/pending_db_world/rev_1680250223811678100.sql rename to data/sql/updates/db_world/2023_03_31_01.sql index 797ae0a2d..1fc983fa9 100644 --- a/data/sql/updates/pending_db_world/rev_1680250223811678100.sql +++ b/data/sql/updates/db_world/2023_03_31_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_03_31_00 -> 2023_03_31_01 -- DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (20867, -138927)) AND (`source_type` = 0) AND (`id` IN (3, 4)); 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`, `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 From 554f1ab1ff94b61e316d8e24f9b646d208a953fd Mon Sep 17 00:00:00 2001 From: Tereneckla <50233983+Tereneckla@users.noreply.github.com> Date: Fri, 31 Mar 2023 19:34:17 +0000 Subject: [PATCH 18/62] fix(DB/Reputation): Make High Admiral "Shelly" Jorrik give reputation all the way through exalted (#15748) * Add files via upload * Update data/sql/updates/pending_db_world/rev_1680289049520216800.sql --- data/sql/updates/pending_db_world/rev_1680289049520216800.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1680289049520216800.sql diff --git a/data/sql/updates/pending_db_world/rev_1680289049520216800.sql b/data/sql/updates/pending_db_world/rev_1680289049520216800.sql new file mode 100644 index 000000000..154c06698 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680289049520216800.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_onkill_reputation` SET `MaxStanding1` = 7 WHERE (`creature_id` = 26081); From 1625f5775f0d30472fb8e85237107d883bc95f80 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Fri, 31 Mar 2023 16:34:25 -0300 Subject: [PATCH 19/62] fix(DB/SAI): Crashfix (#15747) Create rev_1680287940145588800.sql --- .../updates/pending_db_world/rev_1680287940145588800.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1680287940145588800.sql diff --git a/data/sql/updates/pending_db_world/rev_1680287940145588800.sql b/data/sql/updates/pending_db_world/rev_1680287940145588800.sql new file mode 100644 index 000000000..da05d92db --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680287940145588800.sql @@ -0,0 +1,7 @@ +-- +UPDATE `creature_template` SET `AIName` = '' WHERE `entry` = 13696; +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 13696) AND (`source_type` = 0); + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 178908) AND (`source_type` = 1) AND (`id` IN (4)); +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`, `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 +(178908, 1, 4, 0, 8, 0, 100, 0, 21885, 0, 0, 0, 0, 50, 178904, 90000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Vylestem Vine - On Spellhit \'Heal Vylestem Vine\' - Summon Gameobject \'Vylestem Vine\''); From a4b0f85a46f5b7fcb6751cb7884a0518de302022 Mon Sep 17 00:00:00 2001 From: Tereneckla <50233983+Tereneckla@users.noreply.github.com> Date: Fri, 31 Mar 2023 19:34:36 +0000 Subject: [PATCH 20/62] fix (DB/SAI) Negaton Screamer Aura removal on element reset (#15745) * Create Negaton Screamer.sql * Add files via upload * Delete Negaton Screamer.sql * Update data/sql/updates/pending_db_world/rev_1680280460328451900.sql * Update data/sql/updates/pending_db_world/rev_1680280460328451900.sql --- .../updates/pending_db_world/rev_1680280460328451900.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1680280460328451900.sql diff --git a/data/sql/updates/pending_db_world/rev_1680280460328451900.sql b/data/sql/updates/pending_db_world/rev_1680280460328451900.sql new file mode 100644 index 000000000..80b52bb18 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680280460328451900.sql @@ -0,0 +1,8 @@ +DELETE FROM `smart_scripts` WHERE (`entryorguid` BETWEEN 2087501 AND 2087506) AND (`source_type` = 9) AND (`id` IN (5)); +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`, `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 +(2087501, 9, 5, 0, 0, 0, 100, 0, 1500, 1500, 0, 0, 0, 28, 34333, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Negaton Screamer - Actionlist - Remove Aura \'Damage Reduction: Fire\''), +(2087502, 9, 5, 0, 0, 0, 100, 0, 1500, 1500, 0, 0, 0, 28, 34334, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Negaton Screamer - Actionlist - Remove Aura \'Damage Reduction: Frost\''), +(2087503, 9, 5, 0, 0, 0, 100, 0, 1500, 1500, 0, 0, 0, 28, 34331, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Negaton Screamer - Actionlist - Remove Aura \'Damage Reduction: Arcane\''), +(2087504, 9, 5, 0, 0, 0, 100, 0, 1500, 1500, 0, 0, 0, 28, 34335, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Negaton Screamer - Actionlist - Remove Aura \'Damage Reduction: Nature\''), +(2087505, 9, 5, 0, 0, 0, 100, 0, 1500, 1500, 0, 0, 0, 28, 34338, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Negaton Screamer - Actionlist - Remove Aura \'Damage Reduction: Shadow\''), +(2087506, 9, 5, 0, 0, 0, 100, 0, 1500, 1500, 0, 0, 0, 28, 34336, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Negaton Screamer - Actionlist - Remove Aura \'Damage Reduction: Holy\''); From b7c947e473383c39808ff0513018e12827165590 Mon Sep 17 00:00:00 2001 From: v-mstrs <104088833+v-mstrs@users.noreply.github.com> Date: Fri, 31 Mar 2023 22:34:52 +0300 Subject: [PATCH 21/62] fix(DB/SAI) Stone Keepers now use Self Destruct (#15744) * fix(DB/SAI) Stone Keeper now use Self Destruct Closes #7357 * Update data/sql/updates/pending_db_world/rev_1680277738222003722.sql --- data/sql/updates/pending_db_world/rev_1680277738222003722.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1680277738222003722.sql diff --git a/data/sql/updates/pending_db_world/rev_1680277738222003722.sql b/data/sql/updates/pending_db_world/rev_1680277738222003722.sql new file mode 100644 index 000000000..5d14b2ed9 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680277738222003722.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `action_param2` = 2 WHERE `id` = 3 AND `entryorguid` IN (-28368, -27554, -27555, -27794); From 9b196125a7e54ec4443f5a6fbaf3d2ac7fc97d03 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Fri, 31 Mar 2023 19:37:38 +0000 Subject: [PATCH 22/62] chore(DB): import pending files Referenced commit(s): b7c947e473383c39808ff0513018e12827165590 --- .../rev_1680277738222003722.sql => db_world/2023_03_31_02.sql} | 1 + .../rev_1680280460328451900.sql => db_world/2023_03_31_03.sql} | 1 + .../rev_1680287940145588800.sql => db_world/2023_03_31_04.sql} | 1 + .../rev_1680289049520216800.sql => db_world/2023_03_31_05.sql} | 1 + 4 files changed, 4 insertions(+) rename data/sql/updates/{pending_db_world/rev_1680277738222003722.sql => db_world/2023_03_31_02.sql} (73%) rename data/sql/updates/{pending_db_world/rev_1680280460328451900.sql => db_world/2023_03_31_03.sql} (97%) rename data/sql/updates/{pending_db_world/rev_1680287940145588800.sql => db_world/2023_03_31_04.sql} (95%) rename data/sql/updates/{pending_db_world/rev_1680289049520216800.sql => db_world/2023_03_31_05.sql} (67%) diff --git a/data/sql/updates/pending_db_world/rev_1680277738222003722.sql b/data/sql/updates/db_world/2023_03_31_02.sql similarity index 73% rename from data/sql/updates/pending_db_world/rev_1680277738222003722.sql rename to data/sql/updates/db_world/2023_03_31_02.sql index 5d14b2ed9..ff78eedcb 100644 --- a/data/sql/updates/pending_db_world/rev_1680277738222003722.sql +++ b/data/sql/updates/db_world/2023_03_31_02.sql @@ -1,2 +1,3 @@ +-- DB update 2023_03_31_01 -> 2023_03_31_02 -- UPDATE `smart_scripts` SET `action_param2` = 2 WHERE `id` = 3 AND `entryorguid` IN (-28368, -27554, -27555, -27794); diff --git a/data/sql/updates/pending_db_world/rev_1680280460328451900.sql b/data/sql/updates/db_world/2023_03_31_03.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1680280460328451900.sql rename to data/sql/updates/db_world/2023_03_31_03.sql index 80b52bb18..9d9603234 100644 --- a/data/sql/updates/pending_db_world/rev_1680280460328451900.sql +++ b/data/sql/updates/db_world/2023_03_31_03.sql @@ -1,3 +1,4 @@ +-- DB update 2023_03_31_02 -> 2023_03_31_03 DELETE FROM `smart_scripts` WHERE (`entryorguid` BETWEEN 2087501 AND 2087506) AND (`source_type` = 9) AND (`id` IN (5)); 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`, `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 (2087501, 9, 5, 0, 0, 0, 100, 0, 1500, 1500, 0, 0, 0, 28, 34333, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Negaton Screamer - Actionlist - Remove Aura \'Damage Reduction: Fire\''), diff --git a/data/sql/updates/pending_db_world/rev_1680287940145588800.sql b/data/sql/updates/db_world/2023_03_31_04.sql similarity index 95% rename from data/sql/updates/pending_db_world/rev_1680287940145588800.sql rename to data/sql/updates/db_world/2023_03_31_04.sql index da05d92db..ce3efda2a 100644 --- a/data/sql/updates/pending_db_world/rev_1680287940145588800.sql +++ b/data/sql/updates/db_world/2023_03_31_04.sql @@ -1,3 +1,4 @@ +-- DB update 2023_03_31_03 -> 2023_03_31_04 -- UPDATE `creature_template` SET `AIName` = '' WHERE `entry` = 13696; DELETE FROM `smart_scripts` WHERE (`entryorguid` = 13696) AND (`source_type` = 0); diff --git a/data/sql/updates/pending_db_world/rev_1680289049520216800.sql b/data/sql/updates/db_world/2023_03_31_05.sql similarity index 67% rename from data/sql/updates/pending_db_world/rev_1680289049520216800.sql rename to data/sql/updates/db_world/2023_03_31_05.sql index 154c06698..350f3fe65 100644 --- a/data/sql/updates/pending_db_world/rev_1680289049520216800.sql +++ b/data/sql/updates/db_world/2023_03_31_05.sql @@ -1,2 +1,3 @@ +-- DB update 2023_03_31_04 -> 2023_03_31_05 -- UPDATE `creature_onkill_reputation` SET `MaxStanding1` = 7 WHERE (`creature_id` = 26081); From 10dab22f3411c9b967a330ca64d7a684bf9de0f1 Mon Sep 17 00:00:00 2001 From: Tereneckla <50233983+Tereneckla@users.noreply.github.com> Date: Sat, 1 Apr 2023 01:46:20 +0000 Subject: [PATCH 23/62] fix (DB/SAI) Also remove Death Count from non-players (pets) (#15749) * Commit --- .../pending_db_world/rev_1680292857775237100.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1680292857775237100.sql diff --git a/data/sql/updates/pending_db_world/rev_1680292857775237100.sql b/data/sql/updates/pending_db_world/rev_1680292857775237100.sql new file mode 100644 index 000000000..60e28fcca --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680292857775237100.sql @@ -0,0 +1,11 @@ +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` IN (20867, -138927) AND `id` IN (3, 4, 5, 6)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `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 +(20867, 0, 3, 4, 6, 0, 100, 0, 0, 0, 0, 0, 0, 28, 36657, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Watcher - On Just Died - Remove Aura \'Death Count\''), +(20867, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 0, 28, 38818, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Watcher - On Just Died - Remove Aura \'Death Count\''), +(20867, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 28, 36657, 0, 0, 0, 0, 0, 9, 0, 0, 100, 0, 0, 0, 0, 0, 'Death Watcher - On Just Died - Remove Aura \'Death Count\''), +(20867, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 28, 38818, 0, 0, 0, 0, 0, 9, 0, 0, 100, 0, 0, 0, 0, 0, 'Death Watcher - On Just Died - Remove Aura \'Death Count\''), + +(-138927, 0, 3, 4, 6, 0, 100, 0, 0, 0, 0, 0, 0, 28, 36657, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Watcher - On Just Died - Remove Aura \'Death Count\''), +(-138927, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 0, 28, 38818, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Watcher - On Just Died - Remove Aura \'Death Count\''), +(-138927, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 28, 36657, 0, 0, 0, 0, 0, 9, 0, 0, 100, 0, 0, 0, 0, 0, 'Death Watcher - On Just Died - Remove Aura \'Death Count\''), +(-138927, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 28, 38818, 0, 0, 0, 0, 0, 9, 0, 0, 100, 0, 0, 0, 0, 0, 'Death Watcher - On Just Died - Remove Aura \'Death Count\''); From e4320ea8f8ce8fa3f2f707710c533a0358b12d7c Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Fri, 31 Mar 2023 22:46:42 -0300 Subject: [PATCH 24/62] chore(DB/SAI): Move Arcane Container script to SAI (#15754) Create rev_1680309231242305300.sql --- .../updates/pending_db_world/rev_1680309231242305300.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1680309231242305300.sql diff --git a/data/sql/updates/pending_db_world/rev_1680309231242305300.sql b/data/sql/updates/pending_db_world/rev_1680309231242305300.sql new file mode 100644 index 000000000..54e4f2f60 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680309231242305300.sql @@ -0,0 +1,9 @@ +-- +DELETE FROM `event_scripts` WHERE `id` IN (14592, 14593, 14595); + +UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI' WHERE `entry` IN (182196, 182197, 182198); +DELETE FROM `smart_scripts` WHERE (`source_type` = 1 AND `entryorguid` IN (182196, 182197, 182198)); +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`, `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 +(182196, 1, 0, 0, 71, 0, 100, 1, 14592, 0, 0, 0, 0, 12, 22890, 4, 300000, 0, 0, 0, 8, 0, 0, 0, 0, -108.252, -510.302, 21.4761, 2.44346, 'Arcane Container - On Event 14592 Inform - Summon Creature \'First Fragment Guardian\''), +(182197, 1, 0, 0, 71, 0, 100, 1, 14593, 0, 0, 0, 0, 12, 22891, 4, 300000, 0, 0, 0, 8, 0, 0, 0, 0, 13.49, -307.87, -66, 3.12, 'Arcane Container - On Event 14593 Inform - Summon Creature \'Second Fragment Guardian\''), +(182198, 1, 0, 0, 71, 0, 100, 1, 14595, 0, 0, 0, 0, 12, 22892, 4, 300000, 0, 0, 0, 8, 0, 0, 0, 0, 312.72, -19.24, 22.44, 2.12, 'Arcane Container - On Event 14595 Inform - Summon Creature \'Third Fragment Guardian\''); From 97e475ae9fab6c8d16b138221381b20bede0edf9 Mon Sep 17 00:00:00 2001 From: neifion-00000000 <91289495+neifion-00000000@users.noreply.github.com> Date: Fri, 31 Mar 2023 20:46:58 -0500 Subject: [PATCH 25/62] fix(DB/Loot): Harbinger Skyriss Normal Loot (#15752) * fix(db/loot): Harbinger Skyriss Normal Loot * Update data/sql/updates/pending_db_world/rev_1680298149569301100.sql --- .../sql/updates/pending_db_world/rev_1680298149569301100.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1680298149569301100.sql diff --git a/data/sql/updates/pending_db_world/rev_1680298149569301100.sql b/data/sql/updates/pending_db_world/rev_1680298149569301100.sql new file mode 100644 index 000000000..541d27918 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680298149569301100.sql @@ -0,0 +1,5 @@ +-- +-- Harbinger Skyriss Normal Loot +UPDATE `reference_loot_template` SET `GroupId`=3 WHERE `Entry`=25004 AND `Item` IN (28413, 28414, 28415, 28416, 28418, 28419); +DELETE FROM `creature_loot_template` WHERE `Entry`=20912 AND `Item`=25004 AND `Reference`=25004 AND `GroupId`=3; +INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES (20912, 25004, 25004, 100, 0, 1, 3, 1, 1, 'Harbinger Skyriss - High Value Table (ReferenceTable)'); From d4e87f2791c7bc321a4f7bfcf062e12c3d529bdb Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sat, 1 Apr 2023 01:49:38 +0000 Subject: [PATCH 26/62] chore(DB): import pending files Referenced commit(s): 97e475ae9fab6c8d16b138221381b20bede0edf9 --- .../rev_1680292857775237100.sql => db_world/2023_04_01_00.sql} | 1 + .../rev_1680298149569301100.sql => db_world/2023_04_01_01.sql} | 1 + .../rev_1680309231242305300.sql => db_world/2023_04_01_02.sql} | 1 + 3 files changed, 3 insertions(+) rename data/sql/updates/{pending_db_world/rev_1680292857775237100.sql => db_world/2023_04_01_00.sql} (97%) rename data/sql/updates/{pending_db_world/rev_1680298149569301100.sql => db_world/2023_04_01_01.sql} (92%) rename data/sql/updates/{pending_db_world/rev_1680309231242305300.sql => db_world/2023_04_01_02.sql} (97%) diff --git a/data/sql/updates/pending_db_world/rev_1680292857775237100.sql b/data/sql/updates/db_world/2023_04_01_00.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1680292857775237100.sql rename to data/sql/updates/db_world/2023_04_01_00.sql index 60e28fcca..4fa44d69f 100644 --- a/data/sql/updates/pending_db_world/rev_1680292857775237100.sql +++ b/data/sql/updates/db_world/2023_04_01_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_03_31_05 -> 2023_04_01_00 DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` IN (20867, -138927) AND `id` IN (3, 4, 5, 6)); INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `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 (20867, 0, 3, 4, 6, 0, 100, 0, 0, 0, 0, 0, 0, 28, 36657, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Watcher - On Just Died - Remove Aura \'Death Count\''), diff --git a/data/sql/updates/pending_db_world/rev_1680298149569301100.sql b/data/sql/updates/db_world/2023_04_01_01.sql similarity index 92% rename from data/sql/updates/pending_db_world/rev_1680298149569301100.sql rename to data/sql/updates/db_world/2023_04_01_01.sql index 541d27918..8e931e94a 100644 --- a/data/sql/updates/pending_db_world/rev_1680298149569301100.sql +++ b/data/sql/updates/db_world/2023_04_01_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_04_01_00 -> 2023_04_01_01 -- -- Harbinger Skyriss Normal Loot UPDATE `reference_loot_template` SET `GroupId`=3 WHERE `Entry`=25004 AND `Item` IN (28413, 28414, 28415, 28416, 28418, 28419); diff --git a/data/sql/updates/pending_db_world/rev_1680309231242305300.sql b/data/sql/updates/db_world/2023_04_01_02.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1680309231242305300.sql rename to data/sql/updates/db_world/2023_04_01_02.sql index 54e4f2f60..1aedb9055 100644 --- a/data/sql/updates/pending_db_world/rev_1680309231242305300.sql +++ b/data/sql/updates/db_world/2023_04_01_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_04_01_01 -> 2023_04_01_02 -- DELETE FROM `event_scripts` WHERE `id` IN (14592, 14593, 14595); From c0253d91a7e1a5c71f9d03dfe1d17223f5a11ced Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 2 Apr 2023 09:43:50 -0300 Subject: [PATCH 27/62] =?UTF-8?q?fix(Scripts/SethekkHalls):=20Prevent=20pe?= =?UTF-8?q?ts=20from=20pulling=20Ikiss=20from=20behin=E2=80=A6=20(#15764)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Scripts/SethekkHalls): Prevent pets from pulling Ikiss from behind doors * Update src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_talon_king_ikiss.cpp --- .../SethekkHalls/boss_talon_king_ikiss.cpp | 107 +++++++----------- 1 file changed, 39 insertions(+), 68 deletions(-) diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_talon_king_ikiss.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_talon_king_ikiss.cpp index 521854100..f09f4262a 100644 --- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_talon_king_ikiss.cpp +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_talon_king_ikiss.cpp @@ -43,7 +43,7 @@ enum Spells struct boss_talon_king_ikiss : public BossAI { - boss_talon_king_ikiss(Creature* creature) : BossAI(creature, DATA_IKISS), _spoken(false), _manaShield(false) + boss_talon_king_ikiss(Creature* creature) : BossAI(creature, DATA_IKISS), _spoken(false) { scheduler.SetValidator([this] { @@ -55,8 +55,44 @@ struct boss_talon_king_ikiss : public BossAI { _Reset(); _spoken = false; - _manaShield = false; - _comboHealthStages.fill(false); + + ScheduleHealthCheckEvent(80, [&] { + TeleportAndCastExplosion(); + }); + + ScheduleHealthCheckEvent(50, [&] { + TeleportAndCastExplosion(); + }); + + ScheduleHealthCheckEvent(25, [&] { + TeleportAndCastExplosion(); + }); + + ScheduleHealthCheckEvent(20, [&] { + DoCast(me, SPELL_MANA_SHIELD); + }); + } + + /// @todo: remove this once pets stop going through doors. + bool CanAIAttack(Unit const* /*victim*/) const override + { + return _spoken; + } + + void TeleportAndCastExplosion() + { + me->InterruptNonMeleeSpells(false); + DoCastSelf(SPELL_ARCANE_BUBBLE, true); + DoCastAOE(SPELL_BLINK); + Talk(EMOTE_ARCANE_EXP); + + scheduler.Schedule(1s, [this](TaskContext) + { + DoCastAOE(SPELL_ARCANE_EXPLOSION); + }).Schedule(6500ms, [this](TaskContext /*context*/) + { + me->GetThreatMgr().ResetAllThreat(); + }); } void MoveInLineOfSight(Unit* who) override @@ -106,69 +142,6 @@ struct boss_talon_king_ikiss : public BossAI } } - void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*damagetype*/, SpellSchoolMask /*damageSchoolMask*/) override - { - if (!_comboHealthStages[0] && me->HealthBelowPctDamaged(80, damage)) - { - _comboHealthStages[0] = true; - - me->InterruptNonMeleeSpells(false); - DoCastSelf(SPELL_ARCANE_BUBBLE, true); - DoCastAOE(SPELL_BLINK); - Talk(EMOTE_ARCANE_EXP); - - scheduler.Schedule(1s, [this](TaskContext) - { - DoCastAOE(SPELL_ARCANE_EXPLOSION); - }).Schedule(6500ms, [this](TaskContext /*context*/) - { - me->GetThreatMgr().ResetAllThreat(); - }); - } - - if (!_comboHealthStages[1] && me->HealthBelowPctDamaged(50, damage)) - { - _comboHealthStages[1] = true; - - me->InterruptNonMeleeSpells(false); - DoCastSelf(SPELL_ARCANE_BUBBLE, true); - DoCastAOE(SPELL_BLINK); - Talk(EMOTE_ARCANE_EXP); - - scheduler.Schedule(1s, [this](TaskContext) - { - DoCastAOE(SPELL_ARCANE_EXPLOSION); - }).Schedule(6500ms, [this](TaskContext /*context*/) - { - me->GetThreatMgr().ResetAllThreat(); - }); - } - - if (!_comboHealthStages[2] && me->HealthBelowPctDamaged(25, damage)) - { - _comboHealthStages[2] = true; - - me->InterruptNonMeleeSpells(false); - DoCastSelf(SPELL_ARCANE_BUBBLE, true); - DoCastAOE(SPELL_BLINK); - Talk(EMOTE_ARCANE_EXP); - - scheduler.Schedule(1s, [this](TaskContext) - { - DoCastAOE(SPELL_ARCANE_EXPLOSION); - }).Schedule(6500ms, [this](TaskContext /*context*/) - { - me->GetThreatMgr().ResetAllThreat(); - }); - } - - if (!_manaShield && me->HealthBelowPctDamaged(20, damage)) - { - DoCast(me, SPELL_MANA_SHIELD); - _manaShield = true; - } - } - void KilledUnit(Unit* /*victim*/) override { if (urand(0, 1)) @@ -177,8 +150,6 @@ struct boss_talon_king_ikiss : public BossAI private: bool _spoken; - bool _manaShield; - std::array _comboHealthStages; }; // 38194 - Blink From d028a6253a5beeb2e704181cadf464cea3623383 Mon Sep 17 00:00:00 2001 From: Axel Cocat Date: Sun, 2 Apr 2023 14:48:03 +0200 Subject: [PATCH 28/62] fix(Core/Pet): fix Pet::resetTalentsForAllPetsOf for stabled pets (#15779) --- src/server/game/Entities/Pet/Pet.cpp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 4548a76ea..d9ebd3c26 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -2101,34 +2101,52 @@ void Pet::resetTalentsForAllPetsOf(Player* owner, Pet* onlinePet /*= nullptr*/) { // not need after this call if (owner->ToPlayer()->HasAtLoginFlag(AT_LOGIN_RESET_PET_TALENTS)) + { owner->ToPlayer()->RemoveAtLoginFlag(AT_LOGIN_RESET_PET_TALENTS, true); + } // reset for online if (onlinePet) + { onlinePet->resetTalents(); + } PetStable* petStable = owner->GetPetStable(); if (!petStable) + { return; + } std::unordered_set petIds; if (petStable->CurrentPet) + { petIds.insert(petStable->CurrentPet->PetNumber); + } for (Optional const& stabledPet : petStable->StabledPets) + { if (stabledPet) + { petIds.insert(stabledPet->PetNumber); + } + } for (PetStable::PetInfo const& unslottedPet : petStable->UnslottedPets) + { petIds.insert(unslottedPet.PetNumber); + } // now need only reset for offline pets (all pets except online case) if (onlinePet) + { petIds.erase(onlinePet->GetCharmInfo()->GetPetNumber()); + } // no offline pets - if (!petIds.empty()) + if (petIds.empty()) + { return; + } bool need_comma = false; std::ostringstream ss; @@ -2137,7 +2155,9 @@ void Pet::resetTalentsForAllPetsOf(Player* owner, Pet* onlinePet /*= nullptr*/) for (uint32 id : petIds) { if (need_comma) + { ss << ','; + } ss << id; @@ -2150,7 +2170,9 @@ void Pet::resetTalentsForAllPetsOf(Player* owner, Pet* onlinePet /*= nullptr*/) for (uint32 spell : sPetTalentSpells) { if (need_comma) + { ss << ','; + } ss << spell; From 4d24c412e0b15d2d2b6089cfdfa38e7141b22f76 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Sun, 2 Apr 2023 10:12:18 -0300 Subject: [PATCH 29/62] fix(DB/Quest): Prevent infinite spawning of [DND]Spirit 1 (#15774) Create infinite.sql --- data/sql/updates/pending_db_world/infinite.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/infinite.sql diff --git a/data/sql/updates/pending_db_world/infinite.sql b/data/sql/updates/pending_db_world/infinite.sql new file mode 100644 index 000000000..ec3fac540 --- /dev/null +++ b/data/sql/updates/pending_db_world/infinite.sql @@ -0,0 +1,5 @@ +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2202300); +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`, `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 +(2202300, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 19, 22160, 50, 0, 0, 0, 0, 0, 0, '[DND]Spirit 1 - Actionlist - Move To Closest Creature \'Bloodmaul Taskmaster\''), +(2202300, 9, 1, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, '[DND]Spirit 1 - Actionlist - Move To Invoker'), +(2202300, 9, 2, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 33, 22383, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, '[DND]Spirit 1 - Actionlist - Quest Credit \'On Spirit\'s Wings\''); From 1acbb9ee5386e42557c5506e12a10ccd07de6f7b Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 2 Apr 2023 15:13:16 +0200 Subject: [PATCH 30/62] =?UTF-8?q?fix(Core/Spells):=20Fixed=20Spiritual=20A?= =?UTF-8?q?ttunement=20not=20working=20with=20partial=E2=80=A6=20(#15767)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/Spells): Fixed Spiritual Attunement not working with partial overheals. Fixes #14430 --- src/server/game/Entities/Unit/Unit.cpp | 43 +++++++++++++------ src/server/game/Entities/Unit/Unit.h | 16 ++++++- .../game/Spells/Auras/SpellAuraEffects.cpp | 3 +- 3 files changed, 45 insertions(+), 17 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 8a60470ab..44ca8c5e8 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -6498,11 +6498,12 @@ void Unit::SendAttackStateUpdate(uint32 HitInfo, Unit* target, uint8 /*SwingType } //victim may be nullptr -bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, Spell const* spellProc /*= nullptr*/) +bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, ProcEventInfo const& eventInfo) { SpellInfo const* dummySpell = triggeredByAura->GetSpellInfo(); uint32 effIndex = triggeredByAura->GetEffIndex(); int32 triggerAmount = triggeredByAura->GetAmount(); + Spell const* spellProc = eventInfo.GetProcSpell(); Item* castItem = triggeredByAura->GetBase()->GetCastItemGUID() && GetTypeId() == TYPEID_PLAYER ? ToPlayer()->GetItemByGuid(triggeredByAura->GetBase()->GetCastItemGUID()) : nullptr; @@ -7864,12 +7865,22 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere if (!procSpell || !procSpell->IsPositive()) return false; - // heal amount - basepoints0 = int32(CalculatePct(std::min(damage, GetMaxHealth() - GetHealth()), triggerAmount)); - target = this; + HealInfo const* healInfo = eventInfo.GetHealInfo(); + if (!healInfo) + { + return false; + } - if (basepoints0) - triggered_spell_id = 31786; + uint32 effectiveHeal = healInfo->GetEffectiveHeal(); + if (effectiveHeal) + { + // heal amount + basepoints0 = int32(CalculatePct(effectiveHeal, triggerAmount)); + target = this; + + if (basepoints0) + triggered_spell_id = 31786; + } break; } // Paladin Tier 6 Trinket (Ashtongue Talisman of Zeal) @@ -11185,16 +11196,18 @@ void Unit::UnsummonAllTotems(bool onDeath /*= false*/) } } -void Unit::SendHealSpellLog(Unit* victim, uint32 SpellID, uint32 Damage, uint32 OverHeal, uint32 Absorb, bool critical) +void Unit::SendHealSpellLog(HealInfo const& healInfo, bool critical) { + uint32 overheal = healInfo.GetHeal() - healInfo.GetEffectiveHeal(); + // we guess size WorldPacket data(SMSG_SPELLHEALLOG, (8 + 8 + 4 + 4 + 4 + 4 + 1 + 1)); - data << victim->GetPackGUID(); + data << healInfo.GetTarget()->GetPackGUID(); data << GetPackGUID(); - data << uint32(SpellID); - data << uint32(Damage); - data << uint32(OverHeal); - data << uint32(Absorb); // Absorb amount + data << uint32(healInfo.GetSpellInfo()->Id); + data << uint32(healInfo.GetHeal()); + data << uint32(overheal); + data << uint32(healInfo.GetAbsorb()); // Absorb amount data << uint8(critical ? 1 : 0); data << uint8(0); // unused SendMessageToSet(&data, true); @@ -11210,7 +11223,9 @@ int32 Unit::HealBySpell(HealInfo& healInfo, bool critical) CalcHealAbsorb(healInfo); int32 gain = Unit::DealHeal(healInfo.GetHealer(), healInfo.GetTarget(), healInfo.GetHeal()); - SendHealSpellLog(healInfo.GetTarget(), healInfo.GetSpellInfo()->Id, healInfo.GetHeal(), uint32(healInfo.GetHeal() - gain), healInfo.GetAbsorb(), critical); + healInfo.SetEffectiveHeal(gain); + + SendHealSpellLog(healInfo, critical); return gain; } @@ -16538,7 +16553,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u case SPELL_AURA_DUMMY: { LOG_DEBUG("spells.aura", "ProcDamageAndSpell: casting spell id {} (triggered by {} dummy aura of spell {})", spellInfo->Id, (isVictim ? "a victim's" : "an attacker's"), triggeredByAura->GetId()); - if (HandleDummyAuraProc(target, damage, triggeredByAura, procSpellInfo, procFlag, procExtra, cooldown, procSpell)) + if (HandleDummyAuraProc(target, damage, triggeredByAura, procSpellInfo, procFlag, procExtra, cooldown, eventInfo)) takeCharges = true; break; } diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 6d3eac9ee..87cfccca0 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -806,6 +806,7 @@ private: Unit* const m_healer; Unit* const m_target; uint32 m_heal; + uint32 m_effectiveHeal; uint32 m_absorb; SpellInfo const* const m_spellInfo; SpellSchoolMask const m_schoolMask; @@ -814,12 +815,17 @@ public: : m_healer(_healer), m_target(_target), m_heal(_heal), m_spellInfo(_spellInfo), m_schoolMask(_schoolMask) { m_absorb = 0; + m_effectiveHeal = 0; } + void AbsorbHeal(uint32 amount) { amount = std::min(amount, GetHeal()); m_absorb += amount; m_heal -= amount; + + amount = std::min(amount, GetEffectiveHeal()); + m_effectiveHeal -= amount; } void SetHeal(uint32 amount) @@ -827,9 +833,15 @@ public: m_heal = amount; } + void SetEffectiveHeal(uint32 amount) + { + m_effectiveHeal = amount; + } + [[nodiscard]] Unit* GetHealer() const { return m_healer; } [[nodiscard]] Unit* GetTarget() const { return m_target; } [[nodiscard]] uint32 GetHeal() const { return m_heal; } + [[nodiscard]] uint32 GetEffectiveHeal() const { return m_effectiveHeal; } [[nodiscard]] uint32 GetAbsorb() const { return m_absorb; } [[nodiscard]] SpellInfo const* GetSpellInfo() const { return m_spellInfo; }; [[nodiscard]] SpellSchoolMask GetSchoolMask() const { return m_schoolMask; }; @@ -1723,7 +1735,7 @@ public: [[nodiscard]] virtual bool IsUnderWater() const; bool isInAccessiblePlaceFor(Creature const* c) const; - void SendHealSpellLog(Unit* victim, uint32 SpellID, uint32 Damage, uint32 OverHeal, uint32 Absorb, bool critical = false); + void SendHealSpellLog(HealInfo const& healInfo, bool critical = false); int32 HealBySpell(HealInfo& healInfo, bool critical = false); void SendEnergizeSpellLog(Unit* victim, uint32 SpellID, uint32 Damage, Powers powertype); void EnergizeBySpell(Unit* victim, uint32 SpellID, uint32 Damage, Powers powertype); @@ -2545,7 +2557,7 @@ protected: private: bool IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const*& spellProcEvent, ProcEventInfo const& eventInfo); - bool HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, Spell const* spellProc = nullptr); + bool HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, ProcEventInfo const& eventInfo); bool HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, bool* handled); bool HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, uint32 procPhase, ProcEventInfo& eventInfo); bool HandleOverrideClassScriptAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 cooldown); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 197a17fe8..a9d12efde 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -6626,8 +6626,9 @@ void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const HealInfo healInfo(caster, target, heal, GetSpellInfo(), GetSpellInfo()->GetSchoolMask()); Unit::CalcHealAbsorb(healInfo); int32 gain = Unit::DealHeal(caster, target, healInfo.GetHeal()); + healInfo.SetEffectiveHeal(gain); - SpellPeriodicAuraLogInfo pInfo(this, healInfo.GetHeal(), healInfo.GetHeal() - gain, healInfo.GetAbsorb(), 0, 0.0f, crit); + SpellPeriodicAuraLogInfo pInfo(this, healInfo.GetHeal(), healInfo.GetHeal() - healInfo.GetEffectiveHeal(), healInfo.GetAbsorb(), 0, 0.0f, crit); target->SendPeriodicAuraLog(&pInfo); if (caster) From 9eb539a5af165820ae8b75ce21834fa698cf96c1 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Sun, 2 Apr 2023 10:13:34 -0300 Subject: [PATCH 31/62] fix(DB/SAI): Fix Arcatraz Sentinels spawning at 1 health (#15762) Create sentinel2.sql --- data/sql/updates/pending_db_world/sentinel2.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 data/sql/updates/pending_db_world/sentinel2.sql diff --git a/data/sql/updates/pending_db_world/sentinel2.sql b/data/sql/updates/pending_db_world/sentinel2.sql new file mode 100644 index 000000000..2cb8b3966 --- /dev/null +++ b/data/sql/updates/pending_db_world/sentinel2.sql @@ -0,0 +1 @@ +UPDATE `smart_scripts` SET `event_type` = 25 AND `comment` = 'Arcatraz Sentinel - On Reset - Set Health 40%' WHERE `source_type` = 0 AND `entryorguid` = 20869 AND `id` = 0; From 2b5e469c1bd0e7f1897909e6fb98a772c0f47bff Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 2 Apr 2023 15:14:16 +0200 Subject: [PATCH 32/62] chore(Github): clarify OS in issue themplates (#15765) * closes https://github.com/azerothcore/azerothcore-wotlk/issues/15734 --- .github/ISSUE_TEMPLATE/bug_report.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 06d549e77..34bcd6336 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -69,7 +69,8 @@ body: attributes: label: Operating system description: | - Operating System, i.e. Windows 10 x64, Debian 10 x64, etc + The Operating System the Server is running on. + i.e. Windows 11 x64, Debian 10 x64, macOS 12, Ubuntu 20.04 validations: required: true - type: textarea From dcb709a0f3a461ca95deeeacfd6a82374ac4f3d7 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sun, 2 Apr 2023 16:14:36 +0300 Subject: [PATCH 33/62] fix(DB/Loot): Mote of Shadow dropping from wrong creatures. (#15590) * fix(DB/Loot): Mote of Shadow dropping from wrong creatures. * add column names --- .../rev_1679851493822859000.sql | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1679851493822859000.sql diff --git a/data/sql/updates/pending_db_world/rev_1679851493822859000.sql b/data/sql/updates/pending_db_world/rev_1679851493822859000.sql new file mode 100644 index 000000000..10406c7a3 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1679851493822859000.sql @@ -0,0 +1,23 @@ +-- Mote of Shadow +DELETE FROM `creature_loot_template` WHERE `Item` = 22577; +INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(16974, 22577, 0, 20, 0, 1, 0, 1, 1, 'Rogue Voidwalker - Mote of Shadow'), +(16975, 22577, 0, 20, 0, 1, 0, 1, 1, 'Uncontrolled Voidwalker - Mote of Shadow'), +(17014, 22577, 0, 20, 0, 1, 0, 1, 2, 'Collapsing Voidwalker - Mote of Shadow'), +(17981, 22577, 0, 18.6912, 0, 1, 0, 1, 2, 'Voidspawn - Mote of Shadow'), +(18683, 22577, 0, 25, 0, 1, 0, 1, 2, 'Voidhunter Yar - Mote of Shadow'), +(18869, 22577, 0, 1.0615, 0, 1, 0, 1, 2, 'Unstable Voidwraith - Mote of Shadow'), +(18870, 22577, 0, 1.0194, 0, 1, 0, 1, 2, 'Voidshrieker - Mote of Shadow'), +(19307, 22577, 0, 17.8397, 0, 1, 0, 1, 4, 'Nexus Terror - Mote of Shadow'), +(19527, 22577, 0, 20, 0, 1, 0, 1, 2, 'Vacillating Voidcaller - Mote of Shadow'), +(19554, 22577, 0, 60, 0, 1, 0, 2, 4, 'Dimensius the All-Devouring - Mote of Shadow'), +(20554, 22577, 0, 26.6608, 0, 1, 0, 1, 2, 'Arconus the Insatiable - Mote of Shadow'), +(20873, 22577, 0, 31.15, 0, 1, 0, 2, 4, 'Negaton Warp-Master - Mote of Shadow'), +(20875, 22577, 0, 30.59, 0, 1, 0, 2, 4, 'Negaton Screamer - Mote of Shadow'), +(22295, 22577, 0, 27.0833, 0, 1, 0, 2, 4, 'Deathforge Automaton - Mote of Shadow'), +(22301, 22577, 0, 37.8378, 0, 1, 0, 1, 2, 'Throne-Guard Sentinel - Mote of Shadow'), +-- Previously missing, from TrinityCore +(19299, 22577, 0, 42.4242, 0, 1, 0, 2, 4,'Deathwhisperer - Mote of Shadow'), +(20870, 22577, 0, 15, 0, 1, 0, 2, 4, 'Zereketh the Unbound - Mote of Shadow'), +(18341, 22577, 0, 15, 0, 1, 0, 2, 4, 'Pandemonius - Mote of Shadow'), +(19354, 22577, 0, 19.0751, 0, 1, 0, 2, 4, 'Arzeth the Merciless - Mote of Shadow'); From 7b017914e7eff7376acbcb0deb38cd303984e078 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 2 Apr 2023 13:17:15 +0000 Subject: [PATCH 34/62] chore(DB): import pending files Referenced commit(s): dcb709a0f3a461ca95deeeacfd6a82374ac4f3d7 --- .../infinite.sql => db_world/2023_04_02_00.sql} | 1 + .../rev_1679851493822859000.sql => db_world/2023_04_02_01.sql} | 1 + .../sentinel2.sql => db_world/2023_04_02_02.sql} | 1 + 3 files changed, 3 insertions(+) rename data/sql/updates/{pending_db_world/infinite.sql => db_world/2023_04_02_00.sql} (96%) rename data/sql/updates/{pending_db_world/rev_1679851493822859000.sql => db_world/2023_04_02_01.sql} (97%) rename data/sql/updates/{pending_db_world/sentinel2.sql => db_world/2023_04_02_02.sql} (79%) diff --git a/data/sql/updates/pending_db_world/infinite.sql b/data/sql/updates/db_world/2023_04_02_00.sql similarity index 96% rename from data/sql/updates/pending_db_world/infinite.sql rename to data/sql/updates/db_world/2023_04_02_00.sql index ec3fac540..d141681de 100644 --- a/data/sql/updates/pending_db_world/infinite.sql +++ b/data/sql/updates/db_world/2023_04_02_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_04_01_02 -> 2023_04_02_00 DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2202300); 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`, `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 (2202300, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 19, 22160, 50, 0, 0, 0, 0, 0, 0, '[DND]Spirit 1 - Actionlist - Move To Closest Creature \'Bloodmaul Taskmaster\''), diff --git a/data/sql/updates/pending_db_world/rev_1679851493822859000.sql b/data/sql/updates/db_world/2023_04_02_01.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1679851493822859000.sql rename to data/sql/updates/db_world/2023_04_02_01.sql index 10406c7a3..8135446c1 100644 --- a/data/sql/updates/pending_db_world/rev_1679851493822859000.sql +++ b/data/sql/updates/db_world/2023_04_02_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_04_02_00 -> 2023_04_02_01 -- Mote of Shadow DELETE FROM `creature_loot_template` WHERE `Item` = 22577; INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES diff --git a/data/sql/updates/pending_db_world/sentinel2.sql b/data/sql/updates/db_world/2023_04_02_02.sql similarity index 79% rename from data/sql/updates/pending_db_world/sentinel2.sql rename to data/sql/updates/db_world/2023_04_02_02.sql index 2cb8b3966..77689ee88 100644 --- a/data/sql/updates/pending_db_world/sentinel2.sql +++ b/data/sql/updates/db_world/2023_04_02_02.sql @@ -1 +1,2 @@ +-- DB update 2023_04_02_01 -> 2023_04_02_02 UPDATE `smart_scripts` SET `event_type` = 25 AND `comment` = 'Arcatraz Sentinel - On Reset - Set Health 40%' WHERE `source_type` = 0 AND `entryorguid` = 20869 AND `id` = 0; From dda0b30c773003cffb83061c1a35f48d5f63dc4d Mon Sep 17 00:00:00 2001 From: pedrohfm9 <122452427+Dr-Arayashiki@users.noreply.github.com> Date: Sun, 2 Apr 2023 14:55:15 -0300 Subject: [PATCH 35/62] fix(DB/Creature): Grunda Bronzewing is now mounted (#15783) --- data/sql/updates/pending_db_world/Fix-Grunda.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 data/sql/updates/pending_db_world/Fix-Grunda.sql diff --git a/data/sql/updates/pending_db_world/Fix-Grunda.sql b/data/sql/updates/pending_db_world/Fix-Grunda.sql new file mode 100644 index 000000000..28180b328 --- /dev/null +++ b/data/sql/updates/pending_db_world/Fix-Grunda.sql @@ -0,0 +1 @@ +UPDATE `creature_template_addon` SET `mount` = 17697 WHERE (`entry` = 35101); From 19d45682022d03da17c1210c03ffc314bb5228dc Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 2 Apr 2023 17:57:50 +0000 Subject: [PATCH 36/62] chore(DB): import pending files Referenced commit(s): dda0b30c773003cffb83061c1a35f48d5f63dc4d --- .../Fix-Grunda.sql => db_world/2023_04_02_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/Fix-Grunda.sql => db_world/2023_04_02_03.sql} (63%) diff --git a/data/sql/updates/pending_db_world/Fix-Grunda.sql b/data/sql/updates/db_world/2023_04_02_03.sql similarity index 63% rename from data/sql/updates/pending_db_world/Fix-Grunda.sql rename to data/sql/updates/db_world/2023_04_02_03.sql index 28180b328..0db4848f3 100644 --- a/data/sql/updates/pending_db_world/Fix-Grunda.sql +++ b/data/sql/updates/db_world/2023_04_02_03.sql @@ -1 +1,2 @@ +-- DB update 2023_04_02_02 -> 2023_04_02_03 UPDATE `creature_template_addon` SET `mount` = 17697 WHERE (`entry` = 35101); From e85d8294932a139106b3a5fafe838d66dd70fd8c Mon Sep 17 00:00:00 2001 From: elthehablo <83884799+elthehablo@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:27:06 +0200 Subject: [PATCH 37/62] fix(Scripts/Arcatraz): fix Trial of the Naaru: Tenacity complete condition (#15742) * fix(Scripts/Arcatraz): fix Trial of the Naaru: Tenacity complete condition should now only complete on heroic mode * adaptation of edit to AC syntax brackets fixed :) --- src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp index 0362a6097..38d3de610 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp @@ -349,7 +349,10 @@ public: instance->SetBossState(DATA_WARDEN_MELLICHAR, DONE); if (Creature* creature = summons.GetCreatureWithEntry(NPC_MILLHOUSE)) { - instance->DoCastSpellOnPlayers(SPELL_QID10886); + if (IsHeroic()) + { + instance->DoCastSpellOnPlayers(SPELL_QID10886); + } creature->AI()->Talk(SAY_COMPLETE); creature->ReplaceAllNpcFlags(UNIT_NPC_FLAG_GOSSIP); } From 126424e916e81dc334db97eb3e738736f6a9d6a2 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Sun, 2 Apr 2023 15:27:36 -0300 Subject: [PATCH 38/62] fix(DB/Creature): Some immunities in Arcatraz (#15750) * Create rev_1680294116991836000.sql * Update rev_1680294116991836000.sql * Update rev_1680294116991836000.sql --- .../updates/pending_db_world/rev_1680294116991836000.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1680294116991836000.sql diff --git a/data/sql/updates/pending_db_world/rev_1680294116991836000.sql b/data/sql/updates/pending_db_world/rev_1680294116991836000.sql new file mode 100644 index 000000000..750fe2841 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680294116991836000.sql @@ -0,0 +1,6 @@ +-- +UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|46284631 WHERE (`entry` IN (20866, 21614, 20898, 21598)); +UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|652689279 WHERE (`entry` IN (20870, 21626, 20912, 21601)); +UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|37882897 WHERE (`entry` IN (20875, 21604)); +UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|3089, `flags_extra`=`flags_extra`|256 WHERE (`entry` IN (20883, 21615)); +UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|16405, `flags_extra`=`flags_extra`|256 WHERE (`entry` IN (20869, 21586)); From 9f50dbc6d39201bb8c77c7bd92722f1fd9f2c7cd Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Sun, 2 Apr 2023 15:27:50 -0300 Subject: [PATCH 39/62] fix(DB/SAI): Change castflags for Death Watcher's Death Count (#15739) Create rev_1680272944718299700.sql --- .../updates/pending_db_world/rev_1680272944718299700.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1680272944718299700.sql diff --git a/data/sql/updates/pending_db_world/rev_1680272944718299700.sql b/data/sql/updates/pending_db_world/rev_1680272944718299700.sql new file mode 100644 index 000000000..b0d8b0754 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680272944718299700.sql @@ -0,0 +1,7 @@ +-- +DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (-138927, 20867)) AND (`source_type` = 0) AND (`id` IN (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`, `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 +(20867, 0, 1, 0, 2, 0, 100, 0, 0, 75, 15000, 15000, 0, 11, 36655, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Watcher - Between 0-75% Health - Cast \'Drain Life\''), +(20867, 0, 2, 0, 2, 0, 100, 1, 0, 50, 0, 0, 0, 11, 36657, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Watcher - Between 0-50% Health - Cast \'Death Count\' (No Repeat)'), +(-138927, 0, 1, 0, 2, 0, 100, 0, 0, 75, 15000, 15000, 0, 11, 36655, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Watcher - Between 0-75% Health - Cast \'Drain Life\''), +(-138927, 0, 2, 0, 2, 0, 100, 1, 0, 50, 0, 0, 0, 11, 36657, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Watcher - Between 0-50% Health - Cast \'Death Count\' (No Repeat)'); From d029ffe3ab6fe12b817a75a41d6a3223f0951433 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:28:03 +0200 Subject: [PATCH 40/62] fix(Core/Spells): Fixed Battlegear of Eternal Justice set bonus. (#15593) Fixes #14696 --- src/server/game/Spells/SpellInfoCorrections.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index fafa9caa2..e782b7640 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4374,7 +4374,8 @@ void SpellMgr::LoadSpellInfoCorrections() }); // Judgement (Paladin T2 8P Bonus) - ApplySpellFix({ 23591 }, [](SpellInfo* spellInfo) + // Battlegear of Eternal Justice + ApplySpellFix({ 23591, 26135 }, [](SpellInfo* spellInfo) { spellInfo->ProcFlags = PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS; }); From a72f5f97e615b81af9a556018821f24a957ad786 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:28:23 +0200 Subject: [PATCH 41/62] fix(Core/Spells): Implemented `ENCHANT_PROC_ATTR_EXCLUSIVE`. (#15476) Fixes #12132 --- .../updates/pending_db_world/rev_1679233071443044800.sql | 3 +++ src/server/game/Entities/Player/Player.cpp | 9 +++++++++ src/server/game/Spells/SpellMgr.cpp | 5 +++-- src/server/game/Spells/SpellMgr.h | 6 ++++++ 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1679233071443044800.sql diff --git a/data/sql/updates/pending_db_world/rev_1679233071443044800.sql b/data/sql/updates/pending_db_world/rev_1679233071443044800.sql new file mode 100644 index 000000000..14d300b98 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1679233071443044800.sql @@ -0,0 +1,3 @@ +-- +ALTER TABLE `spell_enchant_proc_data` ADD COLUMN `attributeMask` INT UNSIGNED DEFAULT 0 NOT NULL AFTER `procEx`; +UPDATE `spell_enchant_proc_data` SET `attributeMask`=1 WHERE `entry`=3225; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index c53e3a83c..e95b33a58 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -7218,6 +7218,15 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32 continue; } + if (entry && (entry->attributeMask & ENCHANT_PROC_ATTR_EXCLUSIVE) != 0) + { + Unit* checkTarget = spellInfo->IsPositive() ? this : target; + if (checkTarget->HasAura(spellInfo->Id, GetGUID())) + { + continue; + } + } + float chance = pEnchant->amount[s] != 0 ? float(pEnchant->amount[s]) : GetWeaponProcChance(); if (entry) diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 552659a6c..103d93d40 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -2211,8 +2211,8 @@ void SpellMgr::LoadSpellEnchantProcData() mSpellEnchantProcEventMap.clear(); // need for reload case - // 0 1 2 3 - QueryResult result = WorldDatabase.Query("SELECT entry, customChance, PPMChance, procEx FROM spell_enchant_proc_data"); + // 0 1 2 3 4 + QueryResult result = WorldDatabase.Query("SELECT entry, customChance, PPMChance, procEx, attributeMask FROM spell_enchant_proc_data"); if (!result) { LOG_WARN("server.loading", ">> Loaded 0 spell enchant proc event conditions. DB table `spell_enchant_proc_data` is empty."); @@ -2239,6 +2239,7 @@ void SpellMgr::LoadSpellEnchantProcData() spe.customChance = fields[1].Get(); spe.PPMChance = fields[2].Get(); spe.procEx = fields[3].Get(); + spe.attributeMask = fields[4].Get(); mSpellEnchantProcEventMap[enchantId] = spe; diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h index 2ee19ecc3..80eae7fc2 100644 --- a/src/server/game/Spells/SpellMgr.h +++ b/src/server/game/Spells/SpellMgr.h @@ -304,11 +304,17 @@ struct SpellProcEntry typedef std::unordered_map SpellProcMap; +enum EnchantProcAttributes +{ + ENCHANT_PROC_ATTR_EXCLUSIVE = 0x1 // Only one instance of that effect can be active +}; + struct SpellEnchantProcEntry { uint32 customChance; float PPMChance; uint32 procEx; + uint32 attributeMask; }; typedef std::unordered_map SpellEnchantProcEventMap; From 3fd2c2a6d8e6389c5224d34083d3b61524b8d881 Mon Sep 17 00:00:00 2001 From: neifion-00000000 <91289495+neifion-00000000@users.noreply.github.com> Date: Sun, 2 Apr 2023 13:28:59 -0500 Subject: [PATCH 42/62] fix(DB/Loot): Fix Warlord Kalithresh Normal Loot (#15760) --- .../pending_db_world/rev_1680343869738404700.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1680343869738404700.sql diff --git a/data/sql/updates/pending_db_world/rev_1680343869738404700.sql b/data/sql/updates/pending_db_world/rev_1680343869738404700.sql new file mode 100644 index 000000000..9344f66b2 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680343869738404700.sql @@ -0,0 +1,10 @@ +-- +-- Warlord Kalithresh Normal Loot Repairs +UPDATE `creature_loot_template` SET `GroupId`=0 WHERE `Entry`=17798 AND `Item`=23572 AND `Reference`=0 AND `GroupId`=3; +UPDATE `creature_loot_template` SET `MaxCount`=1 WHERE `Entry`=17798 AND `Item`=35001 AND `Reference`=35001 AND `GroupId`=2; +UPDATE `reference_loot_template` SET `GroupId`=3 WHERE `Entry`=35001 AND `Item` IN (27475, 27510, 27804, 27805, 27806, 27874); +DELETE FROM `creature_loot_template` WHERE `Entry`=17798 AND `Item`=24313; +DELETE FROM `creature_loot_template` WHERE `Entry`=17798 AND `Item`=35001 AND `Reference`=35001 AND `GroupId`=3; +INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(17798, 24313, 0, 3.25, 0, 1, 0, 1, 1, 'Warlord Kalithresh - Pattern: Battlecast Hood'), +(17798, 35001, 35001, 100, 0, 1, 3, 1, 1, 'Warlord Kalithresh Table B - (ReferenceTable)'); From e6fb7ff806b8b17cc2a085cee5d1ad1b2d0031cc Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:29:56 +0200 Subject: [PATCH 43/62] fix(Scripts/Karazhan): Fixed locking Shad of Aran entrance door. (#15450) Fixes #15434 --- .../Karazhan/boss_shade_of_aran.cpp | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index 11be933e8..063b3937c 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -134,7 +134,12 @@ public: // Not in progress instance->SetData(DATA_ARAN, NOT_STARTED); - instance->HandleGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR), true); + + if (GameObject* libraryDoor = instance->instance->GetGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR))) + { + libraryDoor->SetGoState(GO_STATE_ACTIVE); + libraryDoor->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE); + } } void KilledUnit(Unit* /*victim*/) override @@ -147,7 +152,12 @@ public: Talk(SAY_DEATH); instance->SetData(DATA_ARAN, DONE); - instance->HandleGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR), true); + + if (GameObject* libraryDoor = instance->instance->GetGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR))) + { + libraryDoor->SetGoState(GO_STATE_ACTIVE); + libraryDoor->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE); + } } void JustEngagedWith(Unit* /*who*/) override @@ -155,7 +165,13 @@ public: Talk(SAY_AGGRO); instance->SetData(DATA_ARAN, IN_PROGRESS); - instance->HandleGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR), false); + + if (GameObject* libraryDoor = instance->instance->GetGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR))) + { + libraryDoor->SetGoState(GO_STATE_READY); + libraryDoor->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE); + } + DoZoneInCombat(); } @@ -203,7 +219,11 @@ public: { if (CloseDoorTimer <= diff) { - instance->HandleGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR), false); + if (GameObject* libraryDoor = instance->instance->GetGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR))) + { + libraryDoor->SetGoState(GO_STATE_READY); + libraryDoor->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE); + } CloseDoorTimer = 0; } else From a0c51a45fbe465826aeae2e861d9be3185741734 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:30:26 +0200 Subject: [PATCH 44/62] fix(Core/Player): Send player's own auras before all visible objects (#15445) * fix(Core/Player): Send player's own auras before all visible objects * cherry-pick commit (https://github.com/TrinityCore/TrinityCore/commit/c6cd272505cdca5d21935ba346df82b8c767fb13) Co-Authored-By: Mikhail Redko <13364438+r4d1sh@users.noreply.github.com> * Update Map.cpp * Update src/server/game/Entities/Player/Player.cpp * Update src/server/game/Entities/Player/Player.cpp * Update src/server/game/Maps/Map.cpp --------- Co-authored-by: Mikhail Redko <13364438+r4d1sh@users.noreply.github.com> --- src/server/game/Entities/Player/Player.cpp | 5 ++--- src/server/game/Entities/Player/Player.h | 2 +- src/server/game/Maps/Map.cpp | 15 +++++++++++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index e95b33a58..2a9cb6457 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -11586,7 +11586,6 @@ void Player::SendInitialPacketsAfterAddToMap() SendMessageToSet(&data2, true); } - GetAurasForTarget(this); SendEnchantmentDurations(); // must be after add to map SendItemDurations(); // must be after add to map SendQuestGiverStatusMultiple(); @@ -11967,9 +11966,9 @@ void Player::learnSkillRewardedSpells(uint32 skill_id, uint32 skill_value) } } -void Player::GetAurasForTarget(Unit* target) // pussywizard: contact before changing ANYTHING! +void Player::GetAurasForTarget(Unit* target, bool force /*= false*/) { - if (!target/* || target->GetVisibleAuras()->empty()*/) // speedup things + if (!target || (!force && target->GetVisibleAuras()->empty())) // speedup things return; /*! Blizz sends certain movement packets sometimes even before CreateObject diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 52dec4b03..98c256426 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2183,7 +2183,7 @@ public: void SendBGWeekendWorldStates(); void SendBattlefieldWorldStates(); - void GetAurasForTarget(Unit* target); + void GetAurasForTarget(Unit* target, bool force = false); PlayerMenu* PlayerTalkClass; std::vector ItemSetEff; diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 1fb51a577..0b7520676 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2525,6 +2525,7 @@ void Map::SendInitSelf(Player* player) { LOG_DEBUG("maps", "Creating player data for himself {}", player->GetGUID().ToString()); + WorldPacket packet; UpdateData data; // attach to player data current transport data @@ -2534,15 +2535,25 @@ void Map::SendInitSelf(Player* player) // build data for self presence in world at own client (one time for map) player->BuildCreateUpdateBlockForPlayer(&data, player); + // build and send self update packet before sending to player his own auras + data.BuildPacket(&packet); + player->SendDirectMessage(&packet); + + // send to player his own auras (this is needed here for timely initialization of some fields on client) + player->GetAurasForTarget(player, true); + + // clean buffers for further work + packet.clear(); + data.Clear(); + // build other passengers at transport also (they always visible and marked as visible and will not send at visibility update at add to map if (Transport* transport = player->GetTransport()) for (Transport::PassengerSet::const_iterator itr = transport->GetPassengers().begin(); itr != transport->GetPassengers().end(); ++itr) if (player != (*itr) && player->HaveAtClient(*itr)) (*itr)->BuildCreateUpdateBlockForPlayer(&data, player); - WorldPacket packet; data.BuildPacket(&packet); - player->GetSession()->SendPacket(&packet); + player->SendDirectMessage(&packet); } void Map::SendInitTransports(Player* player) From 511c1918bdb34978f11217967d5f7b0f9d778ec2 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:30:47 +0200 Subject: [PATCH 45/62] fix(Core/Item): Fixed incorrect damage mod for Heirloom 2H weapons (#15443) * cherry-pick commit (https://github.com/TrinityCore/TrinityCore/commit/13fa60ab86c6338f034823fbd49a90baedd3ab58) Co-authored-by: robinsch --- src/server/game/Entities/Player/Player.cpp | 6 ++++-- src/server/shared/DataStores/DBCStructure.h | 10 ++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 2a9cb6457..d86a8b6fd 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -6822,8 +6822,10 @@ void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const* proto, ScalingSt if (extraDPS) { float average = extraDPS * proto->Delay / 1000.0f; - minDamage = 0.7f * average; - maxDamage = 1.3f * average; + float mod = ssv->IsTwoHand(proto->ScalingStatValue) ? 0.2f : 0.3f; + + minDamage = (1.0f - mod) * average; + maxDamage = (1.0f + mod) * average; } } diff --git a/src/server/shared/DataStores/DBCStructure.h b/src/server/shared/DataStores/DBCStructure.h index 025284204..07a9f8552 100644 --- a/src/server/shared/DataStores/DBCStructure.h +++ b/src/server/shared/DataStores/DBCStructure.h @@ -1518,6 +1518,16 @@ struct ScalingStatValuesEntry return 0; } + bool IsTwoHand(uint32 mask) const + { + if (mask & 0x7E00) + { + if (mask & 0x00000400) return true; + if (mask & 0x00001000) return true; + } + return false; + } + [[nodiscard]] uint32 getSpellBonus(uint32 mask) const { if (mask & 0x00008000) return spellPower; From 40cce659e9b8805f9b01ca916a443365183ba0f0 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:31:19 +0200 Subject: [PATCH 46/62] chore(Conf/Misc): Make it easier to find FreezeDetector (#15451) --- src/server/apps/worldserver/worldserver.conf.dist | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server/apps/worldserver/worldserver.conf.dist b/src/server/apps/worldserver/worldserver.conf.dist index d18bea3ad..57bd54b48 100644 --- a/src/server/apps/worldserver/worldserver.conf.dist +++ b/src/server/apps/worldserver/worldserver.conf.dist @@ -467,6 +467,7 @@ LogDB.Opt.ClearTime = 1209600 # # MaxCoreStuckTime # Description: Time (in seconds) before the server is forced to crash if it is frozen. +# FreezeDetector # Default: 0 - (Disabled) # 10+ - (Enabled, Recommended 30+) # Note: If enabled and the setting is too low, it can cause unexpected crash. From f80fb9b48234f26b5eb8a9c43fe969020f5db1ca Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:31:50 +0200 Subject: [PATCH 47/62] =?UTF-8?q?fix(Core/World):=20Remove=20artificially?= =?UTF-8?q?=20high=20minimal=20update=20intervals=20an=E2=80=A6=20(#15422)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/World): Remove artificially high minimal update intervals and Allow specifying minimum world updates diff in config * Allow specifying minimum world updates diff in config * Remove artificially high minimal update intervals * cherry-pick commit (https://github.com/TrinityCore/TrinityCore/commit/29a4153f0038526ee6df690ec3499d66630e5071) * cherry-pick commit (https://github.com/TrinityCore/TrinityCore/commit/de4920de81a495ed8d6b04cf68f3912c74921f48) * cherry-pick commit (https://github.com/jackpoz/TrinityCore/commit/32cef906b02562ffb129b095386a9314abde82f1) Co-authored-by: Shauren Co-authored-by: Giacomo Pozzoni --- src/server/apps/worldserver/Main.cpp | 75 ++++++++++++++++--- .../apps/worldserver/worldserver.conf.dist | 11 ++- src/server/game/Grids/GridDefines.h | 2 +- src/server/game/World/World.cpp | 2 +- src/server/game/World/World.h | 2 - src/server/shared/Network/NetworkThread.h | 8 +- 6 files changed, 78 insertions(+), 22 deletions(-) diff --git a/src/server/apps/worldserver/Main.cpp b/src/server/apps/worldserver/Main.cpp index 7578a2af7..ba77d7a7f 100644 --- a/src/server/apps/worldserver/Main.cpp +++ b/src/server/apps/worldserver/Main.cpp @@ -72,13 +72,15 @@ char serviceDescription[] = "AzerothCore World of Warcraft emulator world servic * 2 - paused */ int m_ServiceStatus = -1; + +#include +#include #endif #ifndef _ACORE_CORE_CONFIG #define _ACORE_CORE_CONFIG "worldserver.conf" #endif -#define WORLD_SLEEP_CONST 10 using namespace boost::program_options; namespace fs = std::filesystem; @@ -137,6 +139,44 @@ int main(int argc, char** argv) return WinServiceUninstall() == true ? 0 : 1; else if (configService.compare("run") == 0) WinServiceRun(); + + Optional newTimerResolution; + boost::system::error_code dllError; + std::shared_ptr winmm(new boost::dll::shared_library("winmm.dll", dllError, boost::dll::load_mode::search_system_folders), [&](boost::dll::shared_library* lib) + { + try + { + if (newTimerResolution) + lib->get("timeEndPeriod")(*newTimerResolution); + } + catch (std::exception const&) + { + // ignore + } + + delete lib; + }); + + if (winmm->is_loaded()) + { + try + { + auto timeGetDevCapsPtr = winmm->get("timeGetDevCaps"); + // setup timer resolution + TIMECAPS timeResolutionLimits; + if (timeGetDevCapsPtr(&timeResolutionLimits, sizeof(TIMECAPS)) == TIMERR_NOERROR) + { + auto timeBeginPeriodPtr = winmm->get("timeBeginPeriod"); + newTimerResolution = std::min(std::max(timeResolutionLimits.wPeriodMin, 1u), timeResolutionLimits.wPeriodMax); + timeBeginPeriodPtr(*newTimerResolution); + } + } + catch (std::exception const& e) + { + printf("Failed to initialize timer resolution: %s\n", e.what()); + } + } + #endif // Add file and args in config @@ -522,9 +562,15 @@ void ShutdownCLIThread(std::thread* cliThread) void WorldUpdateLoop() { + uint32 minUpdateDiff = uint32(sConfigMgr->GetOption("MinWorldUpdateTime", 1)); uint32 realCurrTime = 0; uint32 realPrevTime = getMSTime(); + uint32 maxCoreStuckTime = uint32(sConfigMgr->GetOption("MaxCoreStuckTime", 60)) * 1000; + uint32 halfMaxCoreStuckTime = maxCoreStuckTime / 2; + if (!halfMaxCoreStuckTime) + halfMaxCoreStuckTime = std::numeric_limits::max(); + LoginDatabase.WarnAboutSyncQueries(true); CharacterDatabase.WarnAboutSyncQueries(true); WorldDatabase.WarnAboutSyncQueries(true); @@ -536,18 +582,19 @@ void WorldUpdateLoop() realCurrTime = getMSTime(); uint32 diff = getMSTimeDiff(realPrevTime, realCurrTime); + if (diff < minUpdateDiff) + { + uint32 sleepTime = minUpdateDiff - diff; + if (sleepTime >= halfMaxCoreStuckTime) + LOG_ERROR("server.worldserver", "WorldUpdateLoop() waiting for {} ms with MaxCoreStuckTime set to {} ms", sleepTime, maxCoreStuckTime); + // sleep until enough time passes that we can update all timers + std::this_thread::sleep_for(Milliseconds(sleepTime)); + continue; + } sWorld->Update(diff); realPrevTime = realCurrTime; - uint32 executionTimeDiff = getMSTimeDiff(realCurrTime, getMSTime()); - - // we know exactly how long it took to update the world, if the update took less than WORLD_SLEEP_CONST, sleep for WORLD_SLEEP_CONST - world update time - if (executionTimeDiff < WORLD_SLEEP_CONST) - { - std::this_thread::sleep_for(Milliseconds(WORLD_SLEEP_CONST - executionTimeDiff)); - } - #ifdef _WIN32 if (m_ServiceStatus == 0) World::StopNow(SHUTDOWN_EXIT_CODE); @@ -583,10 +630,14 @@ void FreezeDetector::Handler(std::weak_ptr freezeDetectorRef, bo freezeDetector->_worldLoopCounter = worldLoopCounter; } // possible freeze - else if (getMSTimeDiff(freezeDetector->_lastChangeMsTime, curtime) > freezeDetector->_maxCoreStuckTimeInMs) + else { - LOG_ERROR("server.worldserver", "World Thread hangs, kicking out server!"); - ABORT(); + uint32 msTimeDiff = getMSTimeDiff(freezeDetector->_lastChangeMsTime, curtime); + if (msTimeDiff > freezeDetector->_maxCoreStuckTimeInMs) + { + LOG_ERROR("server.worldserver", "World Thread hangs for {} ms, forcing a crash!", msTimeDiff); + ABORT("World Thread hangs for {} ms, forcing a crash!", msTimeDiff); + } } freezeDetector->_timer.expires_from_now(boost::posix_time::seconds(1)); diff --git a/src/server/apps/worldserver/worldserver.conf.dist b/src/server/apps/worldserver/worldserver.conf.dist index 57bd54b48..99dfc9cc0 100644 --- a/src/server/apps/worldserver/worldserver.conf.dist +++ b/src/server/apps/worldserver/worldserver.conf.dist @@ -339,12 +339,19 @@ SocketTimeOutTimeActive = 60000 SessionAddDelay = 10000 +# +# MinWorldUpdateTime +# Description: Minimum time (milliseconds) between world update ticks (for mostly idle servers). +# Default: 1 - (0.001 second) + +MinWorldUpdateTime = 1 + # # MapUpdateInterval # Description: Time (milliseconds) for map update interval. -# Default: 100 - (0.1 second) +# Default: 10 - (0.01 second) -MapUpdateInterval = 100 +MapUpdateInterval = 10 # # ChangeWeatherInterval diff --git a/src/server/game/Grids/GridDefines.h b/src/server/game/Grids/GridDefines.h index fe3124aa5..cc4577f29 100644 --- a/src/server/game/Grids/GridDefines.h +++ b/src/server/game/Grids/GridDefines.h @@ -39,7 +39,7 @@ class ObjectGuid; #define CENTER_GRID_OFFSET (SIZE_OF_GRIDS/2) #define MIN_GRID_DELAY (MINUTE*IN_MILLISECONDS) -#define MIN_MAP_UPDATE_DELAY 10 +#define MIN_MAP_UPDATE_DELAY 1 #define SIZE_OF_GRID_CELL (SIZE_OF_GRIDS/MAX_NUMBER_OF_CELLS) diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 59936d0a2..ca0b3c206 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -666,7 +666,7 @@ void World::LoadConfigSettings(bool reload) _int_configs[CONFIG_MIN_LEVEL_STAT_SAVE] = 0; } - _int_configs[CONFIG_INTERVAL_MAPUPDATE] = sConfigMgr->GetOption("MapUpdateInterval", 100); + _int_configs[CONFIG_INTERVAL_MAPUPDATE] = sConfigMgr->GetOption("MapUpdateInterval", 10); if (_int_configs[CONFIG_INTERVAL_MAPUPDATE] < MIN_MAP_UPDATE_DELAY) { LOG_ERROR("server.loading", "MapUpdateInterval ({}) must be greater {}. Use this minimal value.", _int_configs[CONFIG_INTERVAL_MAPUPDATE], MIN_MAP_UPDATE_DELAY); diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index bb1ec8b84..f8e0de9b8 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -141,8 +141,6 @@ enum WorldStates WS_DAILY_CALENDAR_DELETION_OLD_EVENTS_TIME = 20008 // Next daily calendar deletions of old events time }; -#define WORLD_SLEEP_CONST 10 - // xinef: petitions storage struct PetitionData { diff --git a/src/server/shared/Network/NetworkThread.h b/src/server/shared/Network/NetworkThread.h index abe0c0e27..aec20a16a 100644 --- a/src/server/shared/Network/NetworkThread.h +++ b/src/server/shared/Network/NetworkThread.h @@ -121,8 +121,8 @@ protected: { LOG_DEBUG("misc", "Network Thread Starting"); - _updateTimer.expires_from_now(boost::posix_time::milliseconds(10)); - _updateTimer.async_wait(std::bind(&NetworkThread::Update, this)); + _updateTimer.expires_from_now(boost::posix_time::milliseconds(1)); + _updateTimer.async_wait([this](boost::system::error_code const&) { Update(); }); _ioContext.run(); LOG_DEBUG("misc", "Network Thread exits"); @@ -135,8 +135,8 @@ protected: if (_stopped) return; - _updateTimer.expires_from_now(boost::posix_time::milliseconds(10)); - _updateTimer.async_wait(std::bind(&NetworkThread::Update, this)); + _updateTimer.expires_from_now(boost::posix_time::milliseconds(1)); + _updateTimer.async_wait([this](boost::system::error_code const&) { Update(); }); AddNewSockets(); From 29d79e080f7e3dc4421e64d910f8871f120d68c2 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:32:25 +0200 Subject: [PATCH 48/62] fix(Core/Guilds): Improve HandleRoster performance (#15421) * cherry-pick commit https://github.com/TrinityCore/TrinityCore/commit/ee6bbd68bd0eaa3675099765a3e74cbb58cc2f1d * takes call time from ~400 microseconds to ~260 microseconds on my machine in a guild with 900 members Co-authored-by: ihm-tswow <76849026+ihm-tswow@users.noreply.github.com> --- src/server/game/Guilds/Guild.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index e04b70411..aabe0c9c6 100644 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -1201,6 +1201,7 @@ void Guild::HandleRoster(WorldSession* session) { WorldPackets::Guild::GuildRoster roster; + roster.RankData.reserve(m_ranks.size()); for (RankInfo const& rank : m_ranks) { WorldPackets::Guild::GuildRankData& rankData = roster.RankData.emplace_back(); @@ -1215,6 +1216,7 @@ void Guild::HandleRoster(WorldSession* session) } bool sendOfficerNote = _HasRankRight(session->GetPlayer(), GR_RIGHT_VIEWOFFNOTE); + roster.MemberData.reserve(m_members.size()); for (auto const& [guid, member] : m_members) { WorldPackets::Guild::GuildRosterMemberData& memberData = roster.MemberData.emplace_back(); From e91d62dce65c2176e3a6a634240842475d0a7d9c Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:32:47 +0200 Subject: [PATCH 49/62] =?UTF-8?q?fix(Core/Players):=20Added=20error=20mess?= =?UTF-8?q?age=20for=20death=20knights=20attempting=20to=20lea=E2=80=A6=20?= =?UTF-8?q?(#15420)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Core/Players: Added error message for death knights attempting to leave their starting zone early * cherry-pick commit (https://github.com/TrinityCore/TrinityCore/commit/2dc1b69a70f599539c479344c14ec60f98f535bc) Co-authored-by: Shauren --- src/server/game/Entities/Player/Player.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index d86a8b6fd..9ad913d4d 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -1462,7 +1462,10 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati else { if (getClass() == CLASS_DEATH_KNIGHT && GetMapId() == 609 && !IsGameMaster() && !HasSpell(50977)) + { + SendTransferAborted(mapid, TRANSFER_ABORT_UNIQUE_MESSAGE, 1); return false; + } // far teleport to another map Map* oldmap = IsInWorld() ? GetMap() : nullptr; From 713d823062cfb982aa6ca2ec3cf87b279bebf8d2 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Sun, 2 Apr 2023 15:33:11 -0300 Subject: [PATCH 50/62] fix(DB/SAI): Yet another fix for Teron Gorefiend not resetting (#15315) * Create rev_1678331336012484400.sql * Update rev_1678331336012484400.sql * Update rev_1678331336012484400.sql --- .../updates/pending_db_world/rev_1678331336012484400.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1678331336012484400.sql diff --git a/data/sql/updates/pending_db_world/rev_1678331336012484400.sql b/data/sql/updates/pending_db_world/rev_1678331336012484400.sql new file mode 100644 index 000000000..41c29b02e --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1678331336012484400.sql @@ -0,0 +1,7 @@ +-- +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2179700) AND (`source_type` = 9) AND (`id` IN (12)); +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`, `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 +(2179700, 9, 12, 0, 0, 0, 100, 512, 0, 0, 0, 0, 0, 41, 300000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - Actionlist - Despawn In 300000 ms'); + + DELETE FROM `smart_scripts` WHERE (`entryorguid` = 21797) AND (`source_type` = 0) AND (`id` IN (9)); + From b42075f849a3c212a77cff8295cdd5fe95a4377d Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:34:01 +0200 Subject: [PATCH 51/62] fix(Core/SmartScripts): Fixed `SMART_EVENT_FRIENDLY_HEALTH_PCT` event. (#15579) Fixes #15515 --- src/server/game/AI/SmartScripts/SmartScript.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 1ac0a406b..3f2b39ef6 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -3905,7 +3905,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui if (!me || !me->IsEngaged()) return; - ObjectVector targets; + Unit* unitTarget = nullptr; switch (e.GetTargetType()) { case SMART_TARGET_CREATURE_RANGE: @@ -3916,8 +3916,8 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui case SMART_TARGET_PLAYER_RANGE: case SMART_TARGET_PLAYER_DISTANCE: { - if (targets.empty()) - return; + ObjectVector targets; + GetTargets(targets, e); for (WorldObject* target : targets) { if (IsUnit(target) && me->IsFriendlyTo(target->ToUnit()) && target->ToUnit()->IsAlive() && target->ToUnit()->IsInCombat()) @@ -3928,7 +3928,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui continue; } - target = target->ToUnit(); + unitTarget = target->ToUnit(); break; } } @@ -3937,16 +3937,16 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui } case SMART_TARGET_SELF: case SMART_TARGET_ACTION_INVOKER: - DoSelectLowestHpPercentFriendly((float)e.event.friendlyHealthPct.radius, e.event.friendlyHealthPct.minHpPct, e.event.friendlyHealthPct.maxHpPct); + unitTarget = DoSelectLowestHpPercentFriendly((float)e.event.friendlyHealthPct.radius, e.event.friendlyHealthPct.minHpPct, e.event.friendlyHealthPct.maxHpPct); break; default: return; } - if (targets.empty()) + if (!unitTarget) return; - ProcessTimedAction(e, e.event.friendlyHealthPct.repeatMin, e.event.friendlyHealthPct.repeatMax); + ProcessTimedAction(e, e.event.friendlyHealthPct.repeatMin, e.event.friendlyHealthPct.repeatMax, unitTarget); break; } case SMART_EVENT_DISTANCE_CREATURE: From 817cb2d6852599ce17dc40cb7412d717120f7dca Mon Sep 17 00:00:00 2001 From: ZhengPeiRu21 <98835050+ZhengPeiRu21@users.noreply.github.com> Date: Sun, 2 Apr 2023 12:35:47 -0600 Subject: [PATCH 52/62] fix(Scripts/MoltenCore): Correct Baron Geddon Inferno damage values (#15637) * fix(Scripts/Molten Core): Correct Baron Geddon Inferno damage values * Update tick counts --- .../MoltenCore/boss_baron_geddon.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp index 6adb4e6fa..cec746870 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp @@ -168,20 +168,19 @@ public: int32 multiplier = 1; switch (aurEff->GetTickNumber()) { - case 2: case 3: + case 4: multiplier = 2; break; - case 4: case 5: - multiplier = 3; - break; case 6: - case 7: multiplier = 4; break; + case 7: + multiplier = 6; + break; case 8: - multiplier = 5; + multiplier = 10; break; } From 5a55cb9522919ce7cae9b451d5407df9583bb48d Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:36:13 +0200 Subject: [PATCH 53/62] =?UTF-8?q?fix(Core/Spell):=20Remove=20channeled=20a?= =?UTF-8?q?uras=20when=20caster=20and=20target=20are=20no=E2=80=A6=20(#154?= =?UTF-8?q?19)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/Spell): Remove channeled auras when caster and target are not on the same map * Chery-pick commit (https://github.com/TrinityCore/TrinityCore/commit/d23c839998263330aa475125e0bca16dd8fe51bb) Co-authored-by: Shauren --- src/server/game/Entities/Unit/Unit.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 44ca8c5e8..126d3a7b9 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -3822,6 +3822,8 @@ void Unit::_UpdateSpells(uint32 time) { if (i->second->IsExpired()) RemoveOwnedAura(i, AURA_REMOVE_BY_EXPIRE); + else if (i->second->GetSpellInfo()->IsChanneled() && i->second->GetCasterGUID() != GetGUID() && !ObjectAccessor::GetWorldObject(*this, i->second->GetCasterGUID())) + RemoveOwnedAura(i, AURA_REMOVE_BY_CANCEL); // remove channeled auras when caster is not on the same map else ++i; } From a8a3c4ed10adb49e1aa91c0d3a86b181f2d0073e Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sun, 2 Apr 2023 21:37:21 +0300 Subject: [PATCH 54/62] fix(Scripts/VioletHold): Remove hardcoded text and add some of the missing gossips. (#15058) * Remove hardcode and add some of the missing gossip. * cs * {} * /// --- .../VioletHold/instance_violet_hold.cpp | 19 +++++++++-- .../Northrend/VioletHold/violet_hold.cpp | 33 ++++++++++++------- 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp index e30d3448f..fda7a2fe4 100644 --- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp @@ -23,7 +23,9 @@ enum vYells { CYANIGOSA_SAY_SPAWN = 3, - SAY_SINCLARI_1 = 0 + SAY_SINCLARI_LEAVING = 0, + SAY_SINCLARI_DOOR_LOCK = 1, + SAY_SINCLARI_COMPLETE = 2, }; class instance_violet_hold : public InstanceMapScript @@ -214,7 +216,7 @@ public: { EncounterStatus = IN_PROGRESS; if (Creature* c = instance->GetCreature(NPC_SinclariGUID)) - c->AI()->Talk(SAY_SINCLARI_1); + c->AI()->Talk(SAY_SINCLARI_LEAVING); events.RescheduleEvent(EVENT_GUARDS_FALL_BACK, 4s); } break; @@ -251,7 +253,12 @@ public: EncounterStatus = DONE; HandleGameObject(GO_MainGateGUID, true); DoUpdateWorldState(WORLD_STATE_VH_SHOW, 0); - if (Creature* c = instance->GetCreature(NPC_SinclariGUID)) { c->DespawnOrUnsummon(); c->SetRespawnTime(3); } + if (Creature* c = instance->GetCreature(NPC_SinclariGUID)) + { + c->AI()->Talk(SAY_SINCLARI_COMPLETE); + c->DespawnOrUnsummon(); + c->SetRespawnTime(3); + } } SaveToDB(); if (WaveCount < 18) @@ -440,8 +447,14 @@ public: break; case EVENT_START_ENCOUNTER: { + if (Creature* c = instance->GetCreature(NPC_SinclariGUID)) + { + c->AI()->Talk(SAY_SINCLARI_DOOR_LOCK); + } if (Creature* c = instance->GetCreature(NPC_DoorSealGUID)) + { c->RemoveAllAuras(); // just to be sure... + } GateHealth = 100; HandleGameObject(GO_MainGateGUID, false); DoUpdateWorldState(WORLD_STATE_VH_SHOW, 1); diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp index 582cd5192..14c20d02f 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp @@ -24,6 +24,21 @@ #include "ScriptedGossip.h" #include "SpellScript.h" +/// @todo: Missing Sinclari Trigger announcements (32204) Look at its creature_text for more info. +/// @todo: Activation Crystals (go_vh_activation_crystal) (193611) are spammable, should be a 1 time use per crystal. + +enum Texts +{ + GOSSIP_MENU_START_EVENT = 9998, + GOSSIP_MENU_ITEM = 9997, + GOSSIP_MENU_LATE_JOIN = 10275, + + NPC_TEXT_SINCLARI_IN = 13853, + NPC_TEXT_SINCLARI_ITEM = 13854, + NPC_TEXT_SINCLARI_DONE = 13910, + NPC_TEXT_SINCLARI_LATE_JOIN = 14271, +}; + /*********** ** DEFENSE SYSTEM CRYSTAL ***********/ @@ -45,10 +60,6 @@ public: ** SINCLARI ***********/ -#define GOSSIP_START_EVENT "Get your people to safety, we'll keep the Blue Dragonflight's forces at bay." -#define GOSSIP_ITEM_1 "Activate the crystals when we get in trouble, right." -#define GOSSIP_I_WANT_IN "Sorry, I'm late! Can I get in to help my friends?" - class npc_vh_sinclari : public CreatureScript { public: @@ -60,16 +71,16 @@ public: switch (pInstance->GetData(DATA_ENCOUNTER_STATUS)) { case NOT_STARTED: - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_START_EVENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - SendGossipMenuFor(player, 13853, creature->GetGUID()); + AddGossipItemFor(player, GOSSIP_MENU_ITEM, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + AddGossipItemFor(player, GOSSIP_MENU_START_EVENT, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + SendGossipMenuFor(player, NPC_TEXT_SINCLARI_IN, creature->GetGUID()); break; case IN_PROGRESS: - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_I_WANT_IN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - SendGossipMenuFor(player, 13853, creature->GetGUID()); + AddGossipItemFor(player, GOSSIP_MENU_LATE_JOIN, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + SendGossipMenuFor(player, NPC_TEXT_SINCLARI_LATE_JOIN, creature->GetGUID()); break; default: // DONE or invalid - SendGossipMenuFor(player, 13910, creature->GetGUID()); + SendGossipMenuFor(player, NPC_TEXT_SINCLARI_DONE, creature->GetGUID()); } return true; } @@ -86,7 +97,7 @@ public: pInstance->SetData(DATA_START_INSTANCE, 1); break; case GOSSIP_ACTION_INFO_DEF+2: - SendGossipMenuFor(player, 13854, creature->GetGUID()); + SendGossipMenuFor(player, NPC_TEXT_SINCLARI_ITEM, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+3: player->NearTeleportTo(playerTeleportPosition.GetPositionX(), playerTeleportPosition.GetPositionY(), playerTeleportPosition.GetPositionZ(), playerTeleportPosition.GetOrientation(), true); From 69a7beb9b222e966522aa603eb30d11472a3511c Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 2 Apr 2023 18:39:47 +0000 Subject: [PATCH 55/62] chore(DB): import pending files Referenced commit(s): a8a3c4ed10adb49e1aa91c0d3a86b181f2d0073e --- .../rev_1678331336012484400.sql => db_world/2023_04_02_04.sql} | 1 + .../rev_1679233071443044800.sql => db_world/2023_04_02_05.sql} | 1 + .../rev_1680272944718299700.sql => db_world/2023_04_02_06.sql} | 1 + .../rev_1680294116991836000.sql => db_world/2023_04_02_07.sql} | 1 + .../rev_1680343869738404700.sql => db_world/2023_04_02_08.sql} | 1 + 5 files changed, 5 insertions(+) rename data/sql/updates/{pending_db_world/rev_1678331336012484400.sql => db_world/2023_04_02_04.sql} (95%) rename data/sql/updates/{pending_db_world/rev_1679233071443044800.sql => db_world/2023_04_02_05.sql} (81%) rename data/sql/updates/{pending_db_world/rev_1680272944718299700.sql => db_world/2023_04_02_06.sql} (96%) rename data/sql/updates/{pending_db_world/rev_1680294116991836000.sql => db_world/2023_04_02_07.sql} (94%) rename data/sql/updates/{pending_db_world/rev_1680343869738404700.sql => db_world/2023_04_02_08.sql} (95%) diff --git a/data/sql/updates/pending_db_world/rev_1678331336012484400.sql b/data/sql/updates/db_world/2023_04_02_04.sql similarity index 95% rename from data/sql/updates/pending_db_world/rev_1678331336012484400.sql rename to data/sql/updates/db_world/2023_04_02_04.sql index 41c29b02e..6e9f5860f 100644 --- a/data/sql/updates/pending_db_world/rev_1678331336012484400.sql +++ b/data/sql/updates/db_world/2023_04_02_04.sql @@ -1,3 +1,4 @@ +-- DB update 2023_04_02_03 -> 2023_04_02_04 -- DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2179700) AND (`source_type` = 9) AND (`id` IN (12)); 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`, `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 diff --git a/data/sql/updates/pending_db_world/rev_1679233071443044800.sql b/data/sql/updates/db_world/2023_04_02_05.sql similarity index 81% rename from data/sql/updates/pending_db_world/rev_1679233071443044800.sql rename to data/sql/updates/db_world/2023_04_02_05.sql index 14d300b98..e005c27a8 100644 --- a/data/sql/updates/pending_db_world/rev_1679233071443044800.sql +++ b/data/sql/updates/db_world/2023_04_02_05.sql @@ -1,3 +1,4 @@ +-- DB update 2023_04_02_04 -> 2023_04_02_05 -- ALTER TABLE `spell_enchant_proc_data` ADD COLUMN `attributeMask` INT UNSIGNED DEFAULT 0 NOT NULL AFTER `procEx`; UPDATE `spell_enchant_proc_data` SET `attributeMask`=1 WHERE `entry`=3225; diff --git a/data/sql/updates/pending_db_world/rev_1680272944718299700.sql b/data/sql/updates/db_world/2023_04_02_06.sql similarity index 96% rename from data/sql/updates/pending_db_world/rev_1680272944718299700.sql rename to data/sql/updates/db_world/2023_04_02_06.sql index b0d8b0754..5fc0b7c57 100644 --- a/data/sql/updates/pending_db_world/rev_1680272944718299700.sql +++ b/data/sql/updates/db_world/2023_04_02_06.sql @@ -1,3 +1,4 @@ +-- DB update 2023_04_02_05 -> 2023_04_02_06 -- DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (-138927, 20867)) AND (`source_type` = 0) AND (`id` IN (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`, `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 diff --git a/data/sql/updates/pending_db_world/rev_1680294116991836000.sql b/data/sql/updates/db_world/2023_04_02_07.sql similarity index 94% rename from data/sql/updates/pending_db_world/rev_1680294116991836000.sql rename to data/sql/updates/db_world/2023_04_02_07.sql index 750fe2841..f67d37a9f 100644 --- a/data/sql/updates/pending_db_world/rev_1680294116991836000.sql +++ b/data/sql/updates/db_world/2023_04_02_07.sql @@ -1,3 +1,4 @@ +-- DB update 2023_04_02_06 -> 2023_04_02_07 -- UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|46284631 WHERE (`entry` IN (20866, 21614, 20898, 21598)); UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|652689279 WHERE (`entry` IN (20870, 21626, 20912, 21601)); diff --git a/data/sql/updates/pending_db_world/rev_1680343869738404700.sql b/data/sql/updates/db_world/2023_04_02_08.sql similarity index 95% rename from data/sql/updates/pending_db_world/rev_1680343869738404700.sql rename to data/sql/updates/db_world/2023_04_02_08.sql index 9344f66b2..064ba801e 100644 --- a/data/sql/updates/pending_db_world/rev_1680343869738404700.sql +++ b/data/sql/updates/db_world/2023_04_02_08.sql @@ -1,3 +1,4 @@ +-- DB update 2023_04_02_07 -> 2023_04_02_08 -- -- Warlord Kalithresh Normal Loot Repairs UPDATE `creature_loot_template` SET `GroupId`=0 WHERE `Entry`=17798 AND `Item`=23572 AND `Reference`=0 AND `GroupId`=3; From 4b1c84b8deedf594ab887bbc73f5714fbb5c1fa1 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sun, 2 Apr 2023 21:48:26 +0300 Subject: [PATCH 56/62] fix(DB/Conditions): Lok'delar & Rhok'delar should not be mutually exclusive. (#15183) * fix(DB/Conditions): Lok'delar and Rhok'delar should not be mutually exclusive. * Add requirement Sinew & String to not be in inventory. * typo * update --- .../rev_1677192762421105200.sql | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1677192762421105200.sql diff --git a/data/sql/updates/pending_db_world/rev_1677192762421105200.sql b/data/sql/updates/pending_db_world/rev_1677192762421105200.sql new file mode 100644 index 000000000..4a9630cd5 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1677192762421105200.sql @@ -0,0 +1,33 @@ +-- Form Rhok'delar and Lok'delar at once +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=23192; +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (23192, 24872, 0, 'Form Rhok\'delar and Lok\'delar at once '); + +-- Gossip_menu_option (30201) conditions (QUEST_REWARDED & _ITEM) +-- Require both quests 7636(Stave of the Ancients) & 7635(A Proper String) to be rewarded, to not have either Sinew or Rune and to not have either Bow or Stave. +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 30201; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 30201, 0, 0, 0, 8, 0, 7636, 0, 0, 0, 0, 0, '', '(AND) Require quest 7636(Stave of the Ancients) to be rewarded.'), +(15, 30201, 0, 0, 0, 8, 0, 7635, 0, 0, 0, 0, 0, '', '(AND) Require quest 7635(A Proper String) to be rewarded.'), +(15, 30201, 0, 0, 0, 2, 0, 18713, 1, 1, 1, 0, 0, '', '(AND) Require item 18713(Rhok\'delar) to not be in inventory or bank.'), +(15, 30201, 0, 0, 0, 2, 0, 18707, 1, 1, 1, 0, 0, '', '(AND) Require item 18707(Ancient Rune Etched Stave) to not be in inventory or bank.'), +(15, 30201, 0, 0, 0, 2, 0, 18724, 1, 1, 1, 0, 0, '', '(AND) Require item 18724(Enchanted Black Dragon Sinew) to not be in inventory or bank.'), +(15, 30201, 1, 0, 0, 8, 0, 7636, 0, 0, 0, 0, 0, '', '(AND) Require quest 7636(Stave of the Ancients) to be rewarded.'), +(15, 30201, 1, 0, 0, 8, 0, 7635, 0, 0, 0, 0, 0, '', '(AND) Require quest 7635(A Proper String) to be rewarded.'), +(15, 30201, 1, 0, 0, 2, 0, 18715, 1, 1, 1, 0, 0, '', '(AND) Require item 18715(Lok\'delar) to not be in inventory or bank.'), +(15, 30201, 1, 0, 0, 2, 0, 18707, 1, 1, 1, 0, 0, '', '(AND) Require item 18707(Ancient Rune Etched Stave) to not be in inventory or bank.'), +(15, 30201, 1, 0, 0, 2, 0, 18724, 1, 1, 1, 0, 0, '', '(AND) Require item 18724(Enchanted Black Dragon Sinew) to not be in inventory or bank.'); + +-- Vartus the Ancient +DELETE FROM `gossip_menu_option` WHERE `MenuID`=30201; +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(30201, 0, 0, 'Greetings, ancient one. I have done all that has been asked of me. I now ask that you grant me Rhok\'delar.', 10784, 1, 1, 0, 0, 0, 0, '', 0, 0), +(30201, 1, 0, 'Greetings, ancient one. I have done all that has been asked of me. I now ask that you grant me Lok\'delar.', 10785, 1, 1, 0, 0, 0, 0, '', 0, 0); + +-- SAI +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 14524; + +DELETE FROM `smart_scripts` WHERE `entryorguid` = 14524; +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`, `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 +(14524, 0, 0, 2, 62, 0, 100, 0, 30201, 0, 0, 0, 0, 56, 18713, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Vartrus the Ancient - On Gossip Option 0 Selected - Add Item \'Rhok\'delar, Longbow of the Ancient Keepers\' '), +(14524, 0, 1, 2, 62, 0, 100, 0, 30201, 1, 0, 0, 0, 56, 18715, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Vartrus the Ancient - On Gossip Option 1 Selected - Add Item \'Lok\'delar, Stave of the Ancient Keepers\''), +(14524, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Vartrus the Ancient - On Gossip Option - Close Gossip'); From c8d0e860b9fe94dcae94ed2fbcaa20c43050140a Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 2 Apr 2023 18:50:57 +0000 Subject: [PATCH 57/62] chore(DB): import pending files Referenced commit(s): 4b1c84b8deedf594ab887bbc73f5714fbb5c1fa1 --- .../rev_1677192762421105200.sql => db_world/2023_04_02_09.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1677192762421105200.sql => db_world/2023_04_02_09.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1677192762421105200.sql b/data/sql/updates/db_world/2023_04_02_09.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1677192762421105200.sql rename to data/sql/updates/db_world/2023_04_02_09.sql index 4a9630cd5..c087781d2 100644 --- a/data/sql/updates/pending_db_world/rev_1677192762421105200.sql +++ b/data/sql/updates/db_world/2023_04_02_09.sql @@ -1,3 +1,4 @@ +-- DB update 2023_04_02_08 -> 2023_04_02_09 -- Form Rhok'delar and Lok'delar at once DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=23192; INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (23192, 24872, 0, 'Form Rhok\'delar and Lok\'delar at once '); From 0fec0bdf4dfaa86f96dd4599d63b1571b2054c55 Mon Sep 17 00:00:00 2001 From: Mathematical Shitpost Emissary Date: Sun, 2 Apr 2023 15:24:26 -0500 Subject: [PATCH 58/62] fix(DB) Deadmines Cleaver should only drop from Defias Henchman (#14807) * Defias Henchman * Update rev_1675140644244916700.sql * Update rev_1675140644244916700.sql * Update rev_1675140644244916700.sql * Update rev_1675140644244916700.sql --- .../updates/pending_db_world/rev_1675140644244916700.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1675140644244916700.sql diff --git a/data/sql/updates/pending_db_world/rev_1675140644244916700.sql b/data/sql/updates/pending_db_world/rev_1675140644244916700.sql new file mode 100644 index 000000000..78e845d22 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1675140644244916700.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `reference_loot_template` WHERE `Entry` = 24076 AND `Item` = 1927; + +DELETE FROM `creature_loot_template` WHERE `Entry` = 594 AND `Item` = 1927; +INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(594,1927,0,6,0,1,1,1,1,'Defias Henchman - Deadmines Cleaver'); From 72a55abf4ba496e7eb2084854bfcb51cc600505b Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 2 Apr 2023 22:24:37 +0200 Subject: [PATCH 59/62] fix(DB/Spells): Added 8sec cooldown to Stormchops proc. (#15756) * fix(DB/Spells): Added 8sec cooldown to Stormchops proc. Fixes #15741 * missing sql. * Update rev_1680339981481024600.sql * Update rev_1680339981481024600.sql --- data/sql/updates/pending_db_world/rev_1680339981481024600.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1680339981481024600.sql diff --git a/data/sql/updates/pending_db_world/rev_1680339981481024600.sql b/data/sql/updates/pending_db_world/rev_1680339981481024600.sql new file mode 100644 index 000000000..5f2061a5d --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680339981481024600.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `spell_proc_event` WHERE `entry`=43730; +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `procPhase`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(43730,0,0,0,0,0,0,0,2,0,0,8000); From b8a0105ca92fc60a101b589c004dea2de220fd41 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 2 Apr 2023 20:27:09 +0000 Subject: [PATCH 60/62] chore(DB): import pending files Referenced commit(s): 72a55abf4ba496e7eb2084854bfcb51cc600505b --- .../rev_1675140644244916700.sql => db_world/2023_04_02_10.sql} | 1 + .../rev_1680339981481024600.sql => db_world/2023_04_02_11.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1675140644244916700.sql => db_world/2023_04_02_10.sql} (89%) rename data/sql/updates/{pending_db_world/rev_1680339981481024600.sql => db_world/2023_04_02_11.sql} (87%) diff --git a/data/sql/updates/pending_db_world/rev_1675140644244916700.sql b/data/sql/updates/db_world/2023_04_02_10.sql similarity index 89% rename from data/sql/updates/pending_db_world/rev_1675140644244916700.sql rename to data/sql/updates/db_world/2023_04_02_10.sql index 78e845d22..db811f17d 100644 --- a/data/sql/updates/pending_db_world/rev_1675140644244916700.sql +++ b/data/sql/updates/db_world/2023_04_02_10.sql @@ -1,3 +1,4 @@ +-- DB update 2023_04_02_09 -> 2023_04_02_10 -- DELETE FROM `reference_loot_template` WHERE `Entry` = 24076 AND `Item` = 1927; diff --git a/data/sql/updates/pending_db_world/rev_1680339981481024600.sql b/data/sql/updates/db_world/2023_04_02_11.sql similarity index 87% rename from data/sql/updates/pending_db_world/rev_1680339981481024600.sql rename to data/sql/updates/db_world/2023_04_02_11.sql index 5f2061a5d..88d91c606 100644 --- a/data/sql/updates/pending_db_world/rev_1680339981481024600.sql +++ b/data/sql/updates/db_world/2023_04_02_11.sql @@ -1,3 +1,4 @@ +-- DB update 2023_04_02_10 -> 2023_04_02_11 -- DELETE FROM `spell_proc_event` WHERE `entry`=43730; INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `procPhase`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES From ea1eed736217069b927087b260578db2ecb7ab13 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 3 Apr 2023 00:07:10 -0300 Subject: [PATCH 61/62] fix(Scripts/IcecrownCitadel): Script Sindragosa's respawn/waypoints (#15792) --- .../rev_1680488339567265100.sql | 12 +++++ .../IcecrownCitadel/boss_sindragosa.cpp | 41 ++++------------ .../IcecrownCitadel/icecrown_citadel.h | 1 + .../instance_icecrown_citadel.cpp | 48 +++++++++++++++++-- 4 files changed, 67 insertions(+), 35 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1680488339567265100.sql diff --git a/data/sql/updates/pending_db_world/rev_1680488339567265100.sql b/data/sql/updates/pending_db_world/rev_1680488339567265100.sql new file mode 100644 index 000000000..b99893b21 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680488339567265100.sql @@ -0,0 +1,12 @@ +-- +SET @PATH = 36853 * 10; +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH, 1, 4551.7847, 2444.7153, 228.58171,0,0,0,0,100,0), +(@PATH, 2, 4555.238, 2370.889, 229.2206,0,0,0,0,100,0), +(@PATH, 3, 4617.6616, 2352.2952, 214.60947,0,0,0,0,100,0), +(@PATH, 4, 4673.6704, 2437.1182, 218.91505,0,0,0,0,100,0), +(@PATH, 5, 4659.0747, 2579.3906, 229.49834,0,0,0,0,100,0), +(@PATH, 6, 4591.4316, 2598.192, 229.97064,0,0,0,0,100,0), +(@PATH, 7, 4564.4287, 2562.0461, 230.72063,0,0,0,0,100,0), +(@PATH, 8, 4555.6953, 2487.9895, 229.9706,0,0,0,0,100,0); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index bce65ffa0..a507df8ca 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -163,7 +163,6 @@ Position const RimefangFlyPos = {4413.309f, 2456.421f, 233.3795f, 2.890186f Position const RimefangLandPos = {4413.309f, 2456.421f, 203.3848f, 2.890186f}; Position const SpinestalkerFlyPos = {4418.895f, 2514.233f, 230.4864f, 3.396045f}; Position const SpinestalkerLandPos = {4418.895f, 2514.233f, 203.3848f, 3.396045f}; -Position const SindragosaSpawnPos = {4818.700f, 2483.710f, 287.0650f, 3.089233f}; Position const SindragosaFlyInPos = {4420.190f, 2484.360f, 232.5150f, 3.141593f}; Position const SindragosaLandPos = {4419.190f, 2484.570f, 203.3848f, 3.141593f}; Position const SindragosaAirPos = {4475.990f, 2484.430f, 247.9340f, 3.141593f}; @@ -273,7 +272,7 @@ public: struct boss_sindragosaAI : public BossAI { - boss_sindragosaAI(Creature* creature) : BossAI(creature, DATA_SINDRAGOSA), _summoned(false) + boss_sindragosaAI(Creature* creature) : BossAI(creature, DATA_SINDRAGOSA) { me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_HASTE_SPELLS, true); } @@ -286,16 +285,9 @@ public: _bombCount = 0; _mysticBuffetStack = 0; _Reset(); - me->DisableRotate(false); - me->SetControlled(false, UNIT_STATE_ROOT); me->SetSpeed(MOVE_RUN, me->GetCreatureTemplate()->speed_run); me->SetReactState(REACT_AGGRESSIVE); me->CastSpell(me, SPELL_TANK_MARKER, true); - - if (!_summoned) - { - me->SetDisableGravity(true); - } } void MoveInLineOfSight(Unit* who) override @@ -359,20 +351,9 @@ public: return me->IsVisible() && target->GetEntry() != NPC_CROK_SCOURGEBANE; } - void JustReachedHome() override - { - _JustReachedHome(); - instance->SetBossState(DATA_SINDRAGOSA, FAIL); - if (_summoned) - { - me->SetDisableGravity(false); - } - } - void EnterEvadeMode(EvadeReason why) override { - me->DisableRotate(false); - me->SetControlled(false, UNIT_STATE_ROOT); + instance->SetBossState(DATA_SINDRAGOSA, FAIL); BossAI::EnterEvadeMode(why); } @@ -386,10 +367,6 @@ public: { if (action == ACTION_START_FROSTWYRM) { - if (_summoned) - return; - - _summoned = true; if (TempSummon* summon = me->ToTempSummon()) summon->SetTempSummonType(TEMPSUMMON_DEAD_DESPAWN); @@ -403,7 +380,11 @@ public: float moveTime = me->GetExactDist(&SindragosaFlyInPos) / (me->GetSpeed(MOVE_RUN) * 0.001f); me->m_Events.AddEvent(new FrostwyrmLandEvent(*me, SindragosaLandPos), me->m_Events.CalculateTime(uint64(moveTime) + 250)); me->GetMotionMaster()->MovePoint(POINT_FROSTWYRM_FLY_IN, SindragosaFlyInPos); - me->CastSpell(me, SPELL_SINDRAGOSA_S_FURY, true); + + if (!instance->GetData(DATA_SINDRAGOSA_INTRO)) + { + DoCastAOE(SPELL_SINDRAGOSA_S_FURY); + } } } @@ -685,7 +666,6 @@ public: } private: - bool _summoned; uint8 _bombCount; uint8 _mysticBuffetStack; bool _didFirstFlyPhase; @@ -1724,13 +1704,10 @@ public: if (Creature* rimefang = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_RIMEFANG))) rimefang->AI()->DoAction(ACTION_START_FROSTWYRM); - if (!instance->GetData(DATA_SINDRAGOSA_FROSTWYRMS) && !instance->GetGuidData(DATA_SINDRAGOSA) && instance->GetBossState(DATA_SINDRAGOSA) != DONE) + if (!instance->GetData(DATA_SINDRAGOSA_FROSTWYRMS)) { - if (instance->GetData(DATA_HAS_LIMITED_ATTEMPTS) && !instance->GetData(DATA_HEROIC_ATTEMPTS)) - return true; - player->GetMap()->LoadGrid(SindragosaSpawnPos.GetPositionX(), SindragosaSpawnPos.GetPositionY()); - if (Creature* sindragosa = player->GetMap()->SummonCreature(NPC_SINDRAGOSA, SindragosaSpawnPos)) + if (Creature* sindragosa = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_SINDRAGOSA))) sindragosa->AI()->DoAction(ACTION_START_FROSTWYRM); } } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h index a76c44478..7b52e6ee4 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h @@ -144,6 +144,7 @@ enum DataTypes DATA_PUTRICIDE_TRAP_STATE = 254, DATA_HAS_LIMITED_ATTEMPTS = 255, DATA_LK_HC_AVAILABLE = 256, + DATA_SINDRAGOSA_INTRO = 257, DATA_BPC_TRASH_DIED = 300, }; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index 7337551a2..458847e0a 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -49,7 +49,8 @@ enum TimedEvents EVENT_UPDATE_EXECUTION_TIME = 1, EVENT_QUAKE_SHATTER = 2, EVENT_REBUILD_PLATFORM = 3, - EVENT_RESPAWN_GUNSHIP = 4 + EVENT_RESPAWN_GUNSHIP = 4, + EVENT_RESPAWN_SINDRAGOSA = 5 }; enum Spells @@ -140,6 +141,7 @@ Position const JainaSpawnPos = { -48.65278f, 2211.026f, 27.98586f, 3.124139f Position const MuradinSpawnPos = { -47.34549f, 2208.087f, 27.98586f, 3.106686f }; Position const UtherSpawnPos = { -26.58507f, 2211.524f, 30.19898f, 3.124139f }; Position const SylvanasSpawnPos = { -41.45833f, 2222.891f, 27.98586f, 3.647738f }; +Position const SindragosaSpawnPos = { 4818.6997f, 2483.7102f, 287.06497f, 3.286661f }; // Set position traps Spirit Alarm std::vector GoSpiritAlarm_1 = { { -160.96f, 2210.46f, 35.24f, 0.0f }, { -176.27f, 2201.93f, 35.24f, 0.0f}, { -207.83f, 2207.38f, 35.24f, 0.0f } }; @@ -212,6 +214,7 @@ public: BloodQuickeningState = NOT_STARTED; BloodQuickeningMinutes = 0; BloodPrinceTrashCount = 0; + IsSindragosaIntroDone = false; } void FillInitialWorldStates(WorldPacket& data) override @@ -254,6 +257,11 @@ public: if (GetBossState(DATA_LADY_DEATHWHISPER) == DONE && GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != DONE) SpawnGunship(); + if (GetBossState(DATA_SINDRAGOSA) != DONE && IsSindragosaIntroDone && SindragosaGUID.IsEmpty() && Events.GetTimeUntilEvent(EVENT_RESPAWN_SINDRAGOSA) == Milliseconds::max()) + { + Events.ScheduleEvent(EVENT_RESPAWN_SINDRAGOSA, 30s); + } + if (IsBuffAvailable) { SpellAreaForAreaMapBounds saBounds = sSpellMgr->GetSpellAreaForAreaMapBounds(4812); @@ -937,6 +945,8 @@ public: return BloodQuickeningState; case DATA_HEROIC_ATTEMPTS: return HeroicAttempts; + case DATA_SINDRAGOSA_INTRO: + return (IsSindragosaIntroDone ? 1 : 0); default: break; } @@ -1161,7 +1171,21 @@ public: if (state == DONE) CheckLichKingAvailability(); else if (state == FAIL) + { + IsSindragosaIntroDone = true; HandleDropAttempt(); + if (instance->IsHeroic()) + { + if (HeroicAttempts) + { + Events.ScheduleEvent(EVENT_RESPAWN_SINDRAGOSA, 30s); + } + } + else + { + Events.ScheduleEvent(EVENT_RESPAWN_SINDRAGOSA, 30s); + } + } if (state == DONE && !instance->IsHeroic() && LichKingHeroicAvailable) { LichKingHeroicAvailable = false; @@ -1626,6 +1650,7 @@ public: data >> BloodPrinceTrashCount; data >> IsBuffAvailable; SetData(DATA_BUFF_AVAILABLE, IsBuffAvailable); + data >> IsSindragosaIntroDone; } void WriteSaveDataMore(std::ostringstream& data) override @@ -1638,7 +1663,8 @@ public: << PutricideEventProgress << ' ' << uint32(LichKingHeroicAvailable ? 1 : 0) << ' ' << BloodPrinceTrashCount << ' ' - << uint32(IsBuffAvailable ? 1 : 0); + << uint32(IsBuffAvailable ? 1 : 0) << ' ' + << uint32(IsSindragosaIntroDone ? 1 : 0); } void Update(uint32 diff) override @@ -1679,7 +1705,7 @@ public: else DarkwhisperElevatorTimer -= diff; - if (BloodQuickeningState != IN_PROGRESS && GetBossState(DATA_THE_LICH_KING) != IN_PROGRESS && GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != FAIL) + if (Events.Empty()) return; Events.Update(diff); @@ -1732,6 +1758,21 @@ public: case EVENT_RESPAWN_GUNSHIP: SpawnGunship(); break; + case EVENT_RESPAWN_SINDRAGOSA: + if (Creature* sindragosa = instance->SummonCreature(NPC_SINDRAGOSA, SindragosaSpawnPos)) + { + sindragosa->setActive(true); + sindragosa->SetDisableGravity(true); + sindragosa->GetMotionMaster()->MovePath(NPC_SINDRAGOSA * 10, true); + + if (TempSummon* summon = sindragosa->ToTempSummon()) + { + summon->SetTempSummonType(TEMPSUMMON_DEAD_DESPAWN); + } + } + // Could happen more than once if more than one player enters before she respawns. + Events.CancelEvent(EVENT_RESPAWN_SINDRAGOSA); + break; default: break; } @@ -1944,6 +1985,7 @@ public: bool IsOozeDanceEligible; bool IsNauseaEligible; bool IsOrbWhispererEligible; + bool IsSindragosaIntroDone; }; InstanceScript* GetInstanceScript(InstanceMap* map) const override From 3e4d5eca3ae81b269242b83c36620e8df4407637 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Mon, 3 Apr 2023 03:09:58 +0000 Subject: [PATCH 62/62] chore(DB): import pending files Referenced commit(s): ea1eed736217069b927087b260578db2ecb7ab13 --- .../rev_1680488339567265100.sql => db_world/2023_04_03_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1680488339567265100.sql => db_world/2023_04_03_00.sql} (94%) diff --git a/data/sql/updates/pending_db_world/rev_1680488339567265100.sql b/data/sql/updates/db_world/2023_04_03_00.sql similarity index 94% rename from data/sql/updates/pending_db_world/rev_1680488339567265100.sql rename to data/sql/updates/db_world/2023_04_03_00.sql index b99893b21..d6d4b0ffc 100644 --- a/data/sql/updates/pending_db_world/rev_1680488339567265100.sql +++ b/data/sql/updates/db_world/2023_04_03_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_04_02_11 -> 2023_04_03_00 -- SET @PATH = 36853 * 10; DELETE FROM `waypoint_data` WHERE `id`=@PATH;