From 0d977c986ef5bdd3b2e93062218d98f7ab4a17f6 Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Thu, 20 Jun 2024 02:13:34 +0200 Subject: [PATCH 01/33] fix(Core/SmartAI): add prevent almost infinite spinning of mutual target to pets (#19090) fix(Core/SmartAI)petspin --- .../MovementGenerators/TargetedMovementGenerator.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp index 8289d06c1..2bf83ac14 100644 --- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp @@ -108,6 +108,14 @@ bool ChaseMovementGenerator::DoUpdate(T* owner, uint32 time_diff) mutualChase = true; } + // Prevent almost infinite spinning for pets with mutualTarget + // _mutualChase is false for previous check + if (angle && !mutualChase && !_mutualChase && mutualTarget && chaseRange < meleeRange && cOwner && cOwner->IsPet()) + { + angle = Optional(); + mutualChase = true; + } + // periodically check if we're already in the expected range... i_recheckDistance.Update(time_diff); if (i_recheckDistance.Passed()) From 4b8b06b250c669e1811dee8a8269c61a2ce4e9a6 Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Thu, 20 Jun 2024 03:05:54 +0200 Subject: [PATCH 02/33] fix(DB/Command): fix help typo 'trigered' for .cast commands (#19092) --- .../updates/pending_db_world/rev_1718702527397206595.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1718702527397206595.sql diff --git a/data/sql/updates/pending_db_world/rev_1718702527397206595.sql b/data/sql/updates/pending_db_world/rev_1718702527397206595.sql new file mode 100644 index 000000000..f92e842f7 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1718702527397206595.sql @@ -0,0 +1,7 @@ +-- +UPDATE `command` SET `help`='Syntax: .cast #spellid [triggered]\r\n Cast #spellid to selected target. If no target selected cast to self. If \'triggered\' or part provided then spell cast with triggered flag.' WHERE `name`='cast'; +UPDATE `command` SET `help`='Syntax: .cast back #spellid [triggered]\r\n Selected target will cast #spellid to your character. If \'triggered\' or part provided then spell cast with triggered flag.' WHERE `name`='cast back'; +UPDATE `command` SET `help`='Syntax: .cast dest #spellid #x #y #z [triggered]\r\n Selected target will cast #spellid at provided destination. If \'triggered\' or part provided then spell cast with triggered flag.' WHERE `name`='cast dest'; +UPDATE `command` SET `help`='Syntax: .cast dist #spellid [#dist [triggered]]\r\n You will cast spell to point at distance #dist. If \'triggered\' or part provided then spell cast with triggered flag. Not all spells can be cast as area spells.' WHERE `name`='cast dist'; +UPDATE `command` SET `help`='Syntax: .cast self #spellid [triggered]\r\n Cast #spellid by target at target itself. If \'triggered\' or part provided then spell cast with triggered flag.' WHERE `name`='cast self'; +UPDATE `command` SET `help`='Syntax: .cast target #spellid [triggered]\r\n Selected target will cast #spellid to his victim. If \'triggered\' or part provided then spell cast with triggered flag.' WHERE `name`='cast target'; From 0114b8ee5d19d0ccb6c9e2fc4a551eb1214517ca Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 20 Jun 2024 01:07:02 +0000 Subject: [PATCH 03/33] chore(DB): import pending files Referenced commit(s): 4b8b06b250c669e1811dee8a8269c61a2ce4e9a6 --- .../rev_1718702527397206595.sql => db_world/2024_06_20_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1718702527397206595.sql => db_world/2024_06_20_00.sql} (96%) diff --git a/data/sql/updates/pending_db_world/rev_1718702527397206595.sql b/data/sql/updates/db_world/2024_06_20_00.sql similarity index 96% rename from data/sql/updates/pending_db_world/rev_1718702527397206595.sql rename to data/sql/updates/db_world/2024_06_20_00.sql index f92e842f7..8014ec5d2 100644 --- a/data/sql/updates/pending_db_world/rev_1718702527397206595.sql +++ b/data/sql/updates/db_world/2024_06_20_00.sql @@ -1,3 +1,4 @@ +-- DB update 2024_06_18_06 -> 2024_06_20_00 -- UPDATE `command` SET `help`='Syntax: .cast #spellid [triggered]\r\n Cast #spellid to selected target. If no target selected cast to self. If \'triggered\' or part provided then spell cast with triggered flag.' WHERE `name`='cast'; UPDATE `command` SET `help`='Syntax: .cast back #spellid [triggered]\r\n Selected target will cast #spellid to your character. If \'triggered\' or part provided then spell cast with triggered flag.' WHERE `name`='cast back'; From 81d4c2e1454c99d54e28ad8d46c0aea31e01ffe8 Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Wed, 19 Jun 2024 21:21:35 -0400 Subject: [PATCH 04/33] fix(DB/Loot): Correct oversight with Hyjal trash loot. (#19095) Init. --- data/sql/updates/pending_db_world/molten-fury.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 data/sql/updates/pending_db_world/molten-fury.sql diff --git a/data/sql/updates/pending_db_world/molten-fury.sql b/data/sql/updates/pending_db_world/molten-fury.sql new file mode 100644 index 000000000..75e71516a --- /dev/null +++ b/data/sql/updates/pending_db_world/molten-fury.sql @@ -0,0 +1 @@ +DELETE FROM `creature_loot_template` WHERE `Item` IN (32945, 32946) AND `Entry` IN (17895, 17897, 17898, 17899, 17905, 17906, 17907, 17916); From c4acfedad3446fca6feb3a964353909775bd45cb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 20 Jun 2024 01:22:27 +0000 Subject: [PATCH 05/33] chore(DB): import pending files Referenced commit(s): 81d4c2e1454c99d54e28ad8d46c0aea31e01ffe8 --- .../molten-fury.sql => db_world/2024_06_20_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/molten-fury.sql => db_world/2024_06_20_01.sql} (76%) diff --git a/data/sql/updates/pending_db_world/molten-fury.sql b/data/sql/updates/db_world/2024_06_20_01.sql similarity index 76% rename from data/sql/updates/pending_db_world/molten-fury.sql rename to data/sql/updates/db_world/2024_06_20_01.sql index 75e71516a..dd5785e50 100644 --- a/data/sql/updates/pending_db_world/molten-fury.sql +++ b/data/sql/updates/db_world/2024_06_20_01.sql @@ -1 +1,2 @@ +-- DB update 2024_06_20_00 -> 2024_06_20_01 DELETE FROM `creature_loot_template` WHERE `Item` IN (32945, 32946) AND `Entry` IN (17895, 17897, 17898, 17899, 17905, 17906, 17907, 17916); From 24251bc061a9ed0cc00c5ed9fa0bd3732ea27d83 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Thu, 20 Jun 2024 01:48:37 -0300 Subject: [PATCH 06/33] fix(Scripts/Hyjal): Fix wave count not showing for Rage Winterchill waves fix(Scripts/Hyjal): Fix wave count not showing for Rage Winterchill waves --- .../CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp index 3e518ecca..031f98efb 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp @@ -530,7 +530,7 @@ public: } context.Repeat(timerptr[_currentWave]); - if (++_currentWave < maxWaves && _bossWave) + if (++_currentWave < maxWaves && _bossWave != TO_BE_DECIDED) { DoUpdateWorldState(WORLD_STATE_WAVES, _currentWave); DoUpdateWorldState(WORLD_STATE_ENEMY, 1); From d568544c5c81bd59bd9518638ceaa2c5d3980503 Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Thu, 20 Jun 2024 03:59:59 -0400 Subject: [PATCH 07/33] fix(DB/Loot): Adjust Ancient Gem Vein loot table. (#19097) Init. https: //github.com/cmangos/tbc-db/commit/2f458511c4e9d02b5a90891c706ce86b0c3b8013 Co-authored-by: AnonXS <19734826+AnonXS@users.noreply.github.com> --- data/sql/updates/pending_db_world/hyjal-gem-veins.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 data/sql/updates/pending_db_world/hyjal-gem-veins.sql diff --git a/data/sql/updates/pending_db_world/hyjal-gem-veins.sql b/data/sql/updates/pending_db_world/hyjal-gem-veins.sql new file mode 100644 index 000000000..82389fbe5 --- /dev/null +++ b/data/sql/updates/pending_db_world/hyjal-gem-veins.sql @@ -0,0 +1,6 @@ +UPDATE `gameobject_loot_template` SET `Reference` = 13002, `Chance` = 20 WHERE `Entry` = 26862 AND `Reference` = 12901; -- Rare gems, reference currently unused I think +UPDATE `gameobject_loot_template` SET `MaxCount` = 3 WHERE `Entry` = 26862 AND `Item` = 34907; -- Shattered gem fragments + +UPDATE `gameobject_loot_template` SET `Chance` = 50 WHERE `Entry` = 26862 AND `Reference` = 12903; -- Epic gems + -- Rare gem reference +UPDATE `reference_loot_template` SET `MaxCount` = 2 WHERE `Entry` = 13002; From 3872c39aabe37791b31c9ce6384e30a50a8afc84 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 20 Jun 2024 08:00:55 +0000 Subject: [PATCH 08/33] chore(DB): import pending files Referenced commit(s): d568544c5c81bd59bd9518638ceaa2c5d3980503 --- .../hyjal-gem-veins.sql => db_world/2024_06_20_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/hyjal-gem-veins.sql => db_world/2024_06_20_02.sql} (91%) diff --git a/data/sql/updates/pending_db_world/hyjal-gem-veins.sql b/data/sql/updates/db_world/2024_06_20_02.sql similarity index 91% rename from data/sql/updates/pending_db_world/hyjal-gem-veins.sql rename to data/sql/updates/db_world/2024_06_20_02.sql index 82389fbe5..6197190f6 100644 --- a/data/sql/updates/pending_db_world/hyjal-gem-veins.sql +++ b/data/sql/updates/db_world/2024_06_20_02.sql @@ -1,3 +1,4 @@ +-- DB update 2024_06_20_01 -> 2024_06_20_02 UPDATE `gameobject_loot_template` SET `Reference` = 13002, `Chance` = 20 WHERE `Entry` = 26862 AND `Reference` = 12901; -- Rare gems, reference currently unused I think UPDATE `gameobject_loot_template` SET `MaxCount` = 3 WHERE `Entry` = 26862 AND `Item` = 34907; -- Shattered gem fragments From af722d4e88e6709e7a3f57cbf2982cde8d5210d4 Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Thu, 20 Jun 2024 13:16:21 -0400 Subject: [PATCH 09/33] fix(Core/Spells): Partially revert spell cancel behavior change. (#19101) Init. --- src/server/game/Spells/Spell.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index f49653242..b73096ec8 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -3710,6 +3710,7 @@ void Spell::cancel(bool bySelf) return; uint32 oldState = m_spellState; + bool autoRepeat = m_autoRepeat; m_spellState = SPELL_STATE_FINISHED; m_autoRepeat = false; @@ -3724,9 +3725,11 @@ void Spell::cancel(bool bySelf) } [[fallthrough]]; case SPELL_STATE_DELAYED: - SendInterrupted(SPELL_FAILED_INTERRUPTED); + SendInterrupted(0); + // xinef: fixes bugged gcd reset in some cases + if (!autoRepeat) + SendCastResult(SPELL_FAILED_INTERRUPTED); break; - case SPELL_STATE_CASTING: if (!bySelf) { From 5ae543ef044223fb5d0314ba7a74457d1da2dc7b Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Thu, 20 Jun 2024 14:23:02 -0300 Subject: [PATCH 10/33] fix(DB/Creature): Illidari Fearbringer immunities (#19099) --- data/sql/updates/pending_db_world/rev_1718872164901436000.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1718872164901436000.sql diff --git a/data/sql/updates/pending_db_world/rev_1718872164901436000.sql b/data/sql/updates/pending_db_world/rev_1718872164901436000.sql new file mode 100644 index 000000000..a2cff3fa0 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1718872164901436000.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `flags_extra` = `flags_extra` |256, `mechanic_immune_mask` = `mechanic_immune_mask`|64|256|2048 WHERE `entry` = 22954; From 81ac2a584fb9941d229dabf05db22370451b52bc Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Thu, 20 Jun 2024 14:23:20 -0300 Subject: [PATCH 11/33] fix(DB/Creature): Bonechewer Taskmaster taunt immunity (#19098) --- data/sql/updates/pending_db_world/rev_1718871720074355000.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1718871720074355000.sql diff --git a/data/sql/updates/pending_db_world/rev_1718871720074355000.sql b/data/sql/updates/pending_db_world/rev_1718871720074355000.sql new file mode 100644 index 000000000..53ccd44f0 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1718871720074355000.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `flags_extra` = `flags_extra` |256 WHERE `entry` = 23028; From a177beb7b9d91a62d187e4a6d75102e98e0748fc Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Thu, 20 Jun 2024 14:23:40 -0300 Subject: [PATCH 12/33] fix(DB/Conditions): Spell Protection of Elune only targets players (#19094) --- data/sql/updates/pending_db_world/rev_1718844992509230300.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1718844992509230300.sql diff --git a/data/sql/updates/pending_db_world/rev_1718844992509230300.sql b/data/sql/updates/pending_db_world/rev_1718844992509230300.sql new file mode 100644 index 000000000..2d2d93e24 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1718844992509230300.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 38528) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 32) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 16) AND (`ConditionValue2` = 0) AND (`ConditionValue3` = 0); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 38528, 0, 0, 32, 0, 16, 0, 0, 0, 0, 0, '', 'Protection of Elune only targets players'); From 80eac17f01c80c8bc5eff1c84ed3c49a4a9d7fba Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 20 Jun 2024 17:24:17 +0000 Subject: [PATCH 13/33] chore(DB): import pending files Referenced commit(s): 81ac2a584fb9941d229dabf05db22370451b52bc --- .../rev_1718844992509230300.sql => db_world/2024_06_20_03.sql} | 1 + .../rev_1718871720074355000.sql => db_world/2024_06_20_04.sql} | 1 + .../rev_1718872164901436000.sql => db_world/2024_06_20_05.sql} | 1 + 3 files changed, 3 insertions(+) rename data/sql/updates/{pending_db_world/rev_1718844992509230300.sql => db_world/2024_06_20_03.sql} (94%) rename data/sql/updates/{pending_db_world/rev_1718871720074355000.sql => db_world/2024_06_20_04.sql} (67%) rename data/sql/updates/{pending_db_world/rev_1718872164901436000.sql => db_world/2024_06_20_05.sql} (77%) diff --git a/data/sql/updates/pending_db_world/rev_1718844992509230300.sql b/data/sql/updates/db_world/2024_06_20_03.sql similarity index 94% rename from data/sql/updates/pending_db_world/rev_1718844992509230300.sql rename to data/sql/updates/db_world/2024_06_20_03.sql index 2d2d93e24..2c7bfa85d 100644 --- a/data/sql/updates/pending_db_world/rev_1718844992509230300.sql +++ b/data/sql/updates/db_world/2024_06_20_03.sql @@ -1,3 +1,4 @@ +-- DB update 2024_06_20_02 -> 2024_06_20_03 -- DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 38528) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 32) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 16) AND (`ConditionValue2` = 0) AND (`ConditionValue3` = 0); INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES diff --git a/data/sql/updates/pending_db_world/rev_1718871720074355000.sql b/data/sql/updates/db_world/2024_06_20_04.sql similarity index 67% rename from data/sql/updates/pending_db_world/rev_1718871720074355000.sql rename to data/sql/updates/db_world/2024_06_20_04.sql index 53ccd44f0..172224a15 100644 --- a/data/sql/updates/pending_db_world/rev_1718871720074355000.sql +++ b/data/sql/updates/db_world/2024_06_20_04.sql @@ -1,2 +1,3 @@ +-- DB update 2024_06_20_03 -> 2024_06_20_04 -- UPDATE `creature_template` SET `flags_extra` = `flags_extra` |256 WHERE `entry` = 23028; diff --git a/data/sql/updates/pending_db_world/rev_1718872164901436000.sql b/data/sql/updates/db_world/2024_06_20_05.sql similarity index 77% rename from data/sql/updates/pending_db_world/rev_1718872164901436000.sql rename to data/sql/updates/db_world/2024_06_20_05.sql index a2cff3fa0..816ea3fc7 100644 --- a/data/sql/updates/pending_db_world/rev_1718872164901436000.sql +++ b/data/sql/updates/db_world/2024_06_20_05.sql @@ -1,2 +1,3 @@ +-- DB update 2024_06_20_04 -> 2024_06_20_05 -- UPDATE `creature_template` SET `flags_extra` = `flags_extra` |256, `mechanic_immune_mask` = `mechanic_immune_mask`|64|256|2048 WHERE `entry` = 22954; From 39e4dd1714eccceb74af2d8b99fca31028b2c972 Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Thu, 20 Jun 2024 22:02:48 +0200 Subject: [PATCH 14/33] fix(DB/Kalimdor): limit Warchief's Blessing to Horde only (#19025) * init sql * remove 63 requirement from WCB --- data/sql/updates/pending_db_world/rev_1717787014792496771.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1717787014792496771.sql diff --git a/data/sql/updates/pending_db_world/rev_1717787014792496771.sql b/data/sql/updates/pending_db_world/rev_1717787014792496771.sql new file mode 100644 index 000000000..ccc69228a --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1717787014792496771.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 4) AND (`SourceEntry` = 16609); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 4, 16609, 0, 0, 6, 0, 67, 0, 0, 0, 0, 0, '', 'Warchief\'s Blessing - Player must be Horde'); From b4cbb53437ba34c83653a9c314f27f9630937bb6 Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Thu, 20 Jun 2024 22:03:39 +0200 Subject: [PATCH 15/33] fix(DB/Creature): Spirit of Zandalar limit to 63 and below, apply to Booty Bay (#19024) init --- .../rev_1717779996280157826.sql | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1717779996280157826.sql diff --git a/data/sql/updates/pending_db_world/rev_1717779996280157826.sql b/data/sql/updates/pending_db_world/rev_1717779996280157826.sql new file mode 100644 index 000000000..3f51fdca5 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1717779996280157826.sql @@ -0,0 +1,20 @@ +-- +DELETE FROM `creature_text` WHERE `CreatureID` = 15076 AND `ID` = 0; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(15076, 0, 0, 'The Blood God, the Soulflayer, has been defeated! We are imperiled no longer!', 14, 0, 100, 5, 0, 0, 10612, 1, 'Zandalarian Emissary'); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 15076; +DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` = 15076; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(15076, 0, 0, 1, 38, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Zandalarian Emissary - On Data Set 0 0 - Say Line 0'), +(15076, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 67, 0, 50000, 50000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Zandalarian Emissary - On Data Set 0 0 - Create Timed Event'), +(15076, 0, 2, 0, 59, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 24425, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Zandalarian Emissary - On Timed Event 0 Triggered - Cast \'Spirit of Zandalar\''); + +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 4) AND (`SourceEntry` = 24425); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 4, 24425, 0, 0, 27, 0, 63, 4, 0, 0, 0, 0, '', 'Spirit of Zandalar - Player must be level 63 or lower'); + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 14875) AND (`source_type` = 0) AND (`id` IN (1, 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`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(14875, 0, 1, 4, 20, 0, 100, 512, 8183, 0, 0, 0, 0, 0, 53, 0, 14875, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Molthor - On Quest \'The Heart of Hakkar\' Finished - Start Waypoint'), +(14875, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 10, 436, 15076, 0, 0, 0, 0, 0, 0, 'Molthor - On Quest \'The Heart of Hakkar\' Finished - Set Data 0 0'); From 1482b53d632a8de40972a583e79b5d7c11c828b8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 20 Jun 2024 20:03:45 +0000 Subject: [PATCH 16/33] chore(DB): import pending files Referenced commit(s): 39e4dd1714eccceb74af2d8b99fca31028b2c972 --- .../rev_1717779996280157826.sql => db_world/2024_06_20_06.sql} | 1 + .../rev_1717787014792496771.sql => db_world/2024_06_20_07.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1717779996280157826.sql => db_world/2024_06_20_06.sql} (98%) rename data/sql/updates/{pending_db_world/rev_1717787014792496771.sql => db_world/2024_06_20_07.sql} (92%) diff --git a/data/sql/updates/pending_db_world/rev_1717779996280157826.sql b/data/sql/updates/db_world/2024_06_20_06.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1717779996280157826.sql rename to data/sql/updates/db_world/2024_06_20_06.sql index 3f51fdca5..76ccc3ad0 100644 --- a/data/sql/updates/pending_db_world/rev_1717779996280157826.sql +++ b/data/sql/updates/db_world/2024_06_20_06.sql @@ -1,3 +1,4 @@ +-- DB update 2024_06_20_05 -> 2024_06_20_06 -- DELETE FROM `creature_text` WHERE `CreatureID` = 15076 AND `ID` = 0; INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES diff --git a/data/sql/updates/pending_db_world/rev_1717787014792496771.sql b/data/sql/updates/db_world/2024_06_20_07.sql similarity index 92% rename from data/sql/updates/pending_db_world/rev_1717787014792496771.sql rename to data/sql/updates/db_world/2024_06_20_07.sql index ccc69228a..fe808ad71 100644 --- a/data/sql/updates/pending_db_world/rev_1717787014792496771.sql +++ b/data/sql/updates/db_world/2024_06_20_07.sql @@ -1,3 +1,4 @@ +-- DB update 2024_06_20_06 -> 2024_06_20_07 -- DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 4) AND (`SourceEntry` = 16609); INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES From 6d86fb3721bfd4c1551d28058c5ea42927d9c6dd Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Thu, 20 Jun 2024 22:14:19 +0200 Subject: [PATCH 17/33] fix(Scripts/Spell): adjust Thrall's and Herald WCB timings, limit to Orgrimmar and Crossroads (#19026) * update smartAI herald * refactor _scheduler to scheduler * adjust timings of WCB Thrall * limit WCB to Orgrimmar and Crossroads * add roar emote * style, add second loop to delay crossroads cast * limit shout range to area * rename p to player --- .../rev_1717788081682357961.sql | 9 ++++ .../scripts/Kalimdor/zone_orgrimmar.cpp | 54 ++++++++++--------- 2 files changed, 39 insertions(+), 24 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1717788081682357961.sql diff --git a/data/sql/updates/pending_db_world/rev_1717788081682357961.sql b/data/sql/updates/pending_db_world/rev_1717788081682357961.sql new file mode 100644 index 000000000..7b6e08d9a --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1717788081682357961.sql @@ -0,0 +1,9 @@ +-- +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 10719); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(10719, 0, 0, 0, 1, 0, 100, 0, 12000, 12000, 0, 0, 0, 0, 1, 0, 13, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Herald of Thrall - Out of Combat - Say Line 0'), +(10719, 0, 1, 0, 1, 0, 100, 0, 15000, 15000, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Herald of Thrall - Out of Combat - Say Line 1'), +(10719, 0, 2, 0, 1, 0, 100, 0, 19000, 19000, 0, 0, 0, 0, 11, 16609, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Herald of Thrall - Out of Combat - Cast \'Warchief`s Blessing\''); + +-- Limit Herald of Thrall shout range to Area +UPDATE `creature_text` SET `TextRange` = 1 WHERE `CreatureID` = 10719; diff --git a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp index dd70a5aae..0024ef5d4 100644 --- a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp +++ b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp @@ -246,35 +246,44 @@ public: me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP); me->GetMap()->LoadGrid(heraldOfThrallPos.GetPositionX(), heraldOfThrallPos.GetPositionY()); me->SummonCreature(NPC_HERALD_OF_THRALL, heraldOfThrallPos, TEMPSUMMON_TIMED_DESPAWN, 20 * IN_MILLISECONDS); - _scheduler.Schedule(2s, [this](TaskContext /*context*/) + me->HandleEmoteCommand(EMOTE_ONESHOT_ROAR); + scheduler.Schedule(2s, [this](TaskContext /*context*/) + { + Talk(SAY_THRALL_ON_QUEST_REWARD_0); + }).Schedule(9s, [this](TaskContext /*context*/) + { + Talk(SAY_THRALL_ON_QUEST_REWARD_1); + DoCastAOE(SPELL_WARCHIEF_BLESSING, true); + me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP); + me->GetMap()->DoForAllPlayers([&](Player* player) { - Talk(SAY_THRALL_ON_QUEST_REWARD_0); - }) - .Schedule(13s, [this](TaskContext /*context*/) - { - Talk(SAY_THRALL_ON_QUEST_REWARD_1); - }) - .Schedule(15s, [this](TaskContext /*context*/) - { - DoCastAOE(SPELL_WARCHIEF_BLESSING, true); - me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP); - me->GetMap()->DoForAllPlayers([&](Player* p) + if (player->IsAlive() && !player->IsGameMaster()) + { + if (player->GetAreaId() == AREA_ORGRIMMAR) { - if (p->IsAlive() && !p->IsGameMaster()) - { - if (p->GetAreaId() == AREA_ORGRIMMAR || p->GetAreaId() == AREA_RAZOR_HILL || p->GetAreaId() == AREA_CROSSROADS || p->GetAreaId() == AREA_CAMP_TAURAJO) - { - p->CastSpell(p, SPELL_WARCHIEF_BLESSING, true); - } - } - }); + player->CastSpell(player, SPELL_WARCHIEF_BLESSING, true); + } + } }); + }).Schedule(19s, [this](TaskContext /*context*/) + { + me->GetMap()->DoForAllPlayers([&](Player* player) + { + if (player->IsAlive() && !player->IsGameMaster()) + { + if (player->GetAreaId() == AREA_CROSSROADS) + { + player->CastSpell(player, SPELL_WARCHIEF_BLESSING, true); + } + } + }); + }); } } void UpdateAI(uint32 diff) override { - _scheduler.Update(diff); + scheduler.Update(diff); if (!UpdateVictim()) return; @@ -295,9 +304,6 @@ public: DoMeleeAttackIfReady(); } - - protected: - TaskScheduler _scheduler; }; }; From c2c8b837459e4f07aa843de0e4b4e7d7fa3bb908 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 20 Jun 2024 20:15:12 +0000 Subject: [PATCH 18/33] chore(DB): import pending files Referenced commit(s): 6d86fb3721bfd4c1551d28058c5ea42927d9c6dd --- .../rev_1717788081682357961.sql => db_world/2024_06_20_08.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1717788081682357961.sql => db_world/2024_06_20_08.sql} (96%) diff --git a/data/sql/updates/pending_db_world/rev_1717788081682357961.sql b/data/sql/updates/db_world/2024_06_20_08.sql similarity index 96% rename from data/sql/updates/pending_db_world/rev_1717788081682357961.sql rename to data/sql/updates/db_world/2024_06_20_08.sql index 7b6e08d9a..49428e322 100644 --- a/data/sql/updates/pending_db_world/rev_1717788081682357961.sql +++ b/data/sql/updates/db_world/2024_06_20_08.sql @@ -1,3 +1,4 @@ +-- DB update 2024_06_20_07 -> 2024_06_20_08 -- DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 10719); INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES From 3f0b140f01b7b1b115d82986109fd87d5a46f163 Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Thu, 20 Jun 2024 20:41:26 -0400 Subject: [PATCH 19/33] fix(DB/Creature): Correct Doomfire/Spirit speed. (#19105) Init. --- data/sql/updates/pending_db_world/doomfire-speed.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/doomfire-speed.sql diff --git a/data/sql/updates/pending_db_world/doomfire-speed.sql b/data/sql/updates/pending_db_world/doomfire-speed.sql new file mode 100644 index 000000000..de283d79f --- /dev/null +++ b/data/sql/updates/pending_db_world/doomfire-speed.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `speed_walk` = 1 WHERE (`entry` = 18104); +UPDATE `creature_template` SET `speed_walk` = 2.8, `speed_run` = 1 WHERE (`entry` = 18095); From 48c141895adf3f38d7d33fac55b8bada4a75b303 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 21 Jun 2024 00:42:17 +0000 Subject: [PATCH 20/33] chore(DB): import pending files Referenced commit(s): 3f0b140f01b7b1b115d82986109fd87d5a46f163 --- .../doomfire-speed.sql => db_world/2024_06_21_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/doomfire-speed.sql => db_world/2024_06_21_00.sql} (78%) diff --git a/data/sql/updates/pending_db_world/doomfire-speed.sql b/data/sql/updates/db_world/2024_06_21_00.sql similarity index 78% rename from data/sql/updates/pending_db_world/doomfire-speed.sql rename to data/sql/updates/db_world/2024_06_21_00.sql index de283d79f..03226a1b4 100644 --- a/data/sql/updates/pending_db_world/doomfire-speed.sql +++ b/data/sql/updates/db_world/2024_06_21_00.sql @@ -1,2 +1,3 @@ +-- DB update 2024_06_20_08 -> 2024_06_21_00 UPDATE `creature_template` SET `speed_walk` = 1 WHERE (`entry` = 18104); UPDATE `creature_template` SET `speed_walk` = 2.8, `speed_run` = 1 WHERE (`entry` = 18095); From c3a2b83eba21d92c6fa979653757f552372c83ea Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Thu, 20 Jun 2024 21:06:49 -0400 Subject: [PATCH 21/33] fix(Scripts/Midsummer): Resolve Ribbon Pole crash. (#19108) * Init. * Add todo. For you, Nyeriah. :stuck_out_tongue: --- src/server/scripts/Events/midsummer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/scripts/Events/midsummer.cpp b/src/server/scripts/Events/midsummer.cpp index 33106da38..5e8925068 100644 --- a/src/server/scripts/Events/midsummer.cpp +++ b/src/server/scripts/Events/midsummer.cpp @@ -709,7 +709,8 @@ struct npc_midsummer_ribbon_pole_target : public ScriptedAI // remove non-dancing players from list std::erase_if(_dancerList, [](Player* dancer) { - return !dancer->HasAura(SPELL_RIBBON_POLE_PERIODIC_VISUAL); + if (dancer) /// @todo: replace with GUID storage rather than Player object + return !dancer->HasAura(SPELL_RIBBON_POLE_PERIODIC_VISUAL); }); } From e69f642dfeb7f5fe1999863e1443d2f5242e2597 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A9=E9=B9=BF?= <18535853+PkllonG@users.noreply.github.com> Date: Fri, 21 Jun 2024 09:40:23 +0800 Subject: [PATCH 22/33] fix(Core/Ahune): Chest and Quest (#19106) * Add files via upload * Update boss_ahune.cpp * Update boss_ahune.cpp * Update boss_ahune.cpp --- .../CoilfangReservoir/SlavePens/boss_ahune.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp index a3d7fc6e6..caa25161c 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp @@ -158,7 +158,9 @@ enum Points enum Misc { - MAX_FLAMECALLERS = 3 + MAX_FLAMECALLERS = 3, + QUEST_SUMMON_AHUNE = 11691, + ITEM_MAGMA_TOTEM = 34953 }; Position const SummonPositions[] = @@ -307,8 +309,8 @@ struct npc_frozen_core : public ScriptedAI if (Creature* ahune = _instance->GetCreature(DATA_AHUNE)) Unit::Kill(me, ahune); - DoCast(SPELL_SUMMON_LOOT_MISSILE); - DoCast(SPELL_MINION_DESPAWNER); + DoCastSelf(SPELL_SUMMON_LOOT_MISSILE, true); + DoCastSelf(SPELL_MINION_DESPAWNER, true); } void DoAction(int32 action) override @@ -662,6 +664,9 @@ struct go_ahune_ice_stone : public GameObjectAI { ClearGossipMenuFor(player); + player->DestroyItemCount(ITEM_MAGMA_TOTEM, 1, true, false); + player->AreaExploredOrEventHappens(QUEST_SUMMON_AHUNE); //auto rewarded + if (Creature* ahuneBunny = _instance->GetCreature(DATA_AHUNE_BUNNY)) ahuneBunny->AI()->DoAction(ACTION_START_EVENT); From a8b09880fdb006f1b6d808bd8d957ba798d32908 Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Fri, 21 Jun 2024 05:53:48 -0400 Subject: [PATCH 23/33] fix(DB/Creature): Finish correcting Doomfire Spirit speed. (#19110) Init. --- data/sql/updates/pending_db_world/doomfire-speed-again.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 data/sql/updates/pending_db_world/doomfire-speed-again.sql diff --git a/data/sql/updates/pending_db_world/doomfire-speed-again.sql b/data/sql/updates/pending_db_world/doomfire-speed-again.sql new file mode 100644 index 000000000..38c42ec5f --- /dev/null +++ b/data/sql/updates/pending_db_world/doomfire-speed-again.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `speed_run` = 1.14286 WHERE (`entry` = 18104); From 6d819b51d8fce653d2023c3c50e6fb381d45c21e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 21 Jun 2024 09:54:42 +0000 Subject: [PATCH 24/33] chore(DB): import pending files Referenced commit(s): a8b09880fdb006f1b6d808bd8d957ba798d32908 --- .../doomfire-speed-again.sql => db_world/2024_06_21_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/doomfire-speed-again.sql => db_world/2024_06_21_01.sql} (63%) diff --git a/data/sql/updates/pending_db_world/doomfire-speed-again.sql b/data/sql/updates/db_world/2024_06_21_01.sql similarity index 63% rename from data/sql/updates/pending_db_world/doomfire-speed-again.sql rename to data/sql/updates/db_world/2024_06_21_01.sql index 38c42ec5f..50a1ea85e 100644 --- a/data/sql/updates/pending_db_world/doomfire-speed-again.sql +++ b/data/sql/updates/db_world/2024_06_21_01.sql @@ -1 +1,2 @@ +-- DB update 2024_06_21_00 -> 2024_06_21_01 UPDATE `creature_template` SET `speed_run` = 1.14286 WHERE (`entry` = 18104); From 680c219770fb9dc77e372658e866f3be836df63c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A9=E9=B9=BF?= <18535853+PkllonG@users.noreply.github.com> Date: Fri, 21 Jun 2024 21:45:56 +0800 Subject: [PATCH 25/33] fix(Scripts/Midsummer): use GUID storage rather than Player object (#19109) * Update midsummer.cpp * Update midsummer.cpp * Update midsummer.cpp --- src/server/scripts/Events/midsummer.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/server/scripts/Events/midsummer.cpp b/src/server/scripts/Events/midsummer.cpp index 5e8925068..03cf34fb9 100644 --- a/src/server/scripts/Events/midsummer.cpp +++ b/src/server/scripts/Events/midsummer.cpp @@ -676,10 +676,10 @@ struct npc_midsummer_ribbon_pole_target : public ScriptedAI } // prevent duplicates - if (std::find(_dancerList.begin(), _dancerList.end(), dancer) != _dancerList.end()) + if (std::find(_dancerList.begin(), _dancerList.end(), dancer->GetGUID()) != _dancerList.end()) return; - _dancerList.push_back(dancer); + _dancerList.push_back(dancer->GetGUID()); } void LocateRibbonPole() @@ -707,11 +707,11 @@ struct npc_midsummer_ribbon_pole_target : public ScriptedAI return; // remove non-dancing players from list - std::erase_if(_dancerList, [](Player* dancer) - { - if (dancer) /// @todo: replace with GUID storage rather than Player object - return !dancer->HasAura(SPELL_RIBBON_POLE_PERIODIC_VISUAL); - }); + std::erase_if(_dancerList, [this](ObjectGuid dancerGUID) + { + Player* dancer = ObjectAccessor::GetPlayer(*me, dancerGUID); + return !dancer || !dancer->HasAura(SPELL_RIBBON_POLE_PERIODIC_VISUAL); + }); } void DoFlameCircleChecks() @@ -789,9 +789,7 @@ struct npc_midsummer_ribbon_pole_target : public ScriptedAI for (uint8 i = 0; (i < MAX_COUNT_SPEW_LAVA_TARGETS) && (i < _dancerList.size()); i++) { - Player* dancerTarget = _dancerList[i]; - - if (dancerTarget) + if (Player* dancerTarget = ObjectAccessor::GetPlayer(*me, _dancerList[i])) { Creature* fireSpiralBunny = dancerTarget->SummonCreature(NPC_RIBBON_POLE_FIRE_SPIRAL_BUNNY, dancerTarget->GetPositionX(), dancerTarget->GetPositionY(), dancerTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 10000); if (fireSpiralBunny) @@ -824,7 +822,7 @@ struct npc_midsummer_ribbon_pole_target : public ScriptedAI } private: - std::vector _dancerList; + GuidVector _dancerList; GameObject* _ribbonPole; Creature* _bunny; }; From d4c25e589202da38611df29b0691c3354baa65ae Mon Sep 17 00:00:00 2001 From: sudlud Date: Fri, 21 Jun 2024 22:49:17 +0200 Subject: [PATCH 26/33] fix(DB/Creature): add TRIGGER flag to 'Ribbon Pole Fire Spiral Bunny' (#19115) --- data/sql/updates/pending_db_world/rev_1718997265683510500.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1718997265683510500.sql diff --git a/data/sql/updates/pending_db_world/rev_1718997265683510500.sql b/data/sql/updates/pending_db_world/rev_1718997265683510500.sql new file mode 100644 index 000000000..3be4501f0 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1718997265683510500.sql @@ -0,0 +1,2 @@ +-- add TRIGGER flag to 'Ribbon Pole Fire Spiral Bunny' +UPDATE `creature_template` SET `flags_extra` = (`flags_extra` | 128) WHERE (`entry` = 25303); From be92ff1f5bf8715141b3e0d8eb4be6a2f77ffb9a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 21 Jun 2024 20:50:07 +0000 Subject: [PATCH 27/33] chore(DB): import pending files Referenced commit(s): d4c25e589202da38611df29b0691c3354baa65ae --- .../rev_1718997265683510500.sql => db_world/2024_06_21_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1718997265683510500.sql => db_world/2024_06_21_02.sql} (77%) diff --git a/data/sql/updates/pending_db_world/rev_1718997265683510500.sql b/data/sql/updates/db_world/2024_06_21_02.sql similarity index 77% rename from data/sql/updates/pending_db_world/rev_1718997265683510500.sql rename to data/sql/updates/db_world/2024_06_21_02.sql index 3be4501f0..e50ae74d6 100644 --- a/data/sql/updates/pending_db_world/rev_1718997265683510500.sql +++ b/data/sql/updates/db_world/2024_06_21_02.sql @@ -1,2 +1,3 @@ +-- DB update 2024_06_21_01 -> 2024_06_21_02 -- add TRIGGER flag to 'Ribbon Pole Fire Spiral Bunny' UPDATE `creature_template` SET `flags_extra` = (`flags_extra` | 128) WHERE (`entry` = 25303); From 9572cbfaca968db700733cc8e54d9b01bee5a463 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sat, 22 Jun 2024 03:15:49 +0300 Subject: [PATCH 28/33] fix(DB/Gossip): Refik missing text for lowlevel tailoring (#19111) --- .../updates/pending_db_world/rev_1718948799326042600.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1718948799326042600.sql diff --git a/data/sql/updates/pending_db_world/rev_1718948799326042600.sql b/data/sql/updates/pending_db_world/rev_1718948799326042600.sql new file mode 100644 index 000000000..9970a02a7 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1718948799326042600.sql @@ -0,0 +1,8 @@ +-- Refik +DELETE FROM `gossip_menu` WHERE `MenuID` = 8868 and `TextID` = 10652; +INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES +(8868, 10652); + +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 14) AND (`SourceGroup` = 8868) AND (`SourceEntry` = 11551); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14, 8868, 11551, 0, 0, 7, 0, 197, 200, 0, 0, 0, 0, '', 'Show npctext 11551 for Refik if the player\'s tailoring skill is over 200.'); From 3599c26cd5e35fc9caf40683f7a877943557f52e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 22 Jun 2024 00:16:45 +0000 Subject: [PATCH 29/33] chore(DB): import pending files Referenced commit(s): 9572cbfaca968db700733cc8e54d9b01bee5a463 --- .../rev_1718948799326042600.sql => db_world/2024_06_22_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1718948799326042600.sql => db_world/2024_06_22_00.sql} (94%) diff --git a/data/sql/updates/pending_db_world/rev_1718948799326042600.sql b/data/sql/updates/db_world/2024_06_22_00.sql similarity index 94% rename from data/sql/updates/pending_db_world/rev_1718948799326042600.sql rename to data/sql/updates/db_world/2024_06_22_00.sql index 9970a02a7..e2f1c91bb 100644 --- a/data/sql/updates/pending_db_world/rev_1718948799326042600.sql +++ b/data/sql/updates/db_world/2024_06_22_00.sql @@ -1,3 +1,4 @@ +-- DB update 2024_06_21_02 -> 2024_06_22_00 -- Refik DELETE FROM `gossip_menu` WHERE `MenuID` = 8868 and `TextID` = 10652; INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES From b3f21d909ae83617c599de1f02a619fd200e3b5c Mon Sep 17 00:00:00 2001 From: sudlud Date: Sat, 22 Jun 2024 08:04:56 +0200 Subject: [PATCH 30/33] =?UTF-8?q?fix(Core/PlayerQuest):=20Introduce=20flag?= =?UTF-8?q?=20QUEST=5FSPECIAL=5FFLAGS=5FCAN=5FFAIL=5FIN=E2=80=A6=20(#19116?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/PlayerQuest): Introduce flag QUEST_SPECIAL_FLAGS_CAN_FAIL_IN_ANY_STATE - this allows flagging quests so that they are allowed to fail in Player::FailQuest() independant of their current state - update quest 853 accordingly as a first use case --- .../rev_1718999602991537300.sql | 2 ++ .../game/Entities/Player/PlayerQuest.cpp | 2 +- src/server/game/Quests/QuestDef.h | 28 ++++++++++--------- 3 files changed, 18 insertions(+), 14 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1718999602991537300.sql diff --git a/data/sql/updates/pending_db_world/rev_1718999602991537300.sql b/data/sql/updates/pending_db_world/rev_1718999602991537300.sql new file mode 100644 index 000000000..ad9483be0 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1718999602991537300.sql @@ -0,0 +1,2 @@ +-- make Quest 'Apothecary Zamah' failable in any state +UPDATE `quest_template_addon` SET `SpecialFlags` = (`SpecialFlags` | 128) WHERE (`ID` = 853); diff --git a/src/server/game/Entities/Player/PlayerQuest.cpp b/src/server/game/Entities/Player/PlayerQuest.cpp index f71d8a6f7..13e08dab6 100644 --- a/src/server/game/Entities/Player/PlayerQuest.cpp +++ b/src/server/game/Entities/Player/PlayerQuest.cpp @@ -883,7 +883,7 @@ void Player::FailQuest(uint32 questId) { QuestStatus qStatus = GetQuestStatus(questId); // xinef: if quest is marked as failed, dont do it again - if ((qStatus != QUEST_STATUS_INCOMPLETE) && (!quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_TIMED))) + if ((qStatus != QUEST_STATUS_INCOMPLETE) && (!quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_CAN_FAIL_IN_ANY_STATE))) return; SetQuestStatus(questId, QUEST_STATUS_FAILED); diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h index e2f62c3ff..84bbec84b 100644 --- a/src/server/game/Quests/QuestDef.h +++ b/src/server/game/Quests/QuestDef.h @@ -157,23 +157,25 @@ enum QuestSpecialFlags { QUEST_SPECIAL_FLAGS_NONE = 0x000, // Trinity flags for set SpecialFlags in DB if required but used only at server - QUEST_SPECIAL_FLAGS_REPEATABLE = 0x001, // Set by 1 in SpecialFlags from DB - QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT = 0x002, // Set by 2 in SpecialFlags from DB (if required area explore, spell SPELL_EFFECT_QUEST_COMPLETE casting, table `FECT_QUEST_COMPLETE casting, table `*_script` command SCRIPT_COMMAND_QUEST_EXPLORED use, set from script) - QUEST_SPECIAL_FLAGS_AUTO_ACCEPT = 0x004, // Set by 4 in SpecialFlags in DB if the quest is to be auto-accepted. - QUEST_SPECIAL_FLAGS_DF_QUEST = 0x008, // Set by 8 in SpecialFlags in DB if the quest is used by Dungeon Finder. - QUEST_SPECIAL_FLAGS_MONTHLY = 0x010, // Set by 16 in SpecialFlags in DB if the quest is reset at the begining of the month - QUEST_SPECIAL_FLAGS_CAST = 0x020, // Set by 32 in SpecialFlags in DB if the quest requires RequiredOrNpcGo killcredit but NOT kill (a spell cast) - QUEST_SPECIAL_FLAGS_NO_REP_SPILLOVER = 0x040, // Set by 64 in SpecialFlags in DB if the quest does not share rewarded reputation with other allied factions + QUEST_SPECIAL_FLAGS_REPEATABLE = 0x0001, // Set by 1 in SpecialFlags from DB + QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT = 0x0002, // Set by 2 in SpecialFlags from DB (if required area explore, spell SPELL_EFFECT_QUEST_COMPLETE casting, table `FECT_QUEST_COMPLETE casting, table `*_script` command SCRIPT_COMMAND_QUEST_EXPLORED use, set from script) + QUEST_SPECIAL_FLAGS_AUTO_ACCEPT = 0x0004, // Set by 4 in SpecialFlags in DB if the quest is to be auto-accepted. + QUEST_SPECIAL_FLAGS_DF_QUEST = 0x0008, // Set by 8 in SpecialFlags in DB if the quest is used by Dungeon Finder. + QUEST_SPECIAL_FLAGS_MONTHLY = 0x0010, // Set by 16 in SpecialFlags in DB if the quest is reset at the begining of the month + QUEST_SPECIAL_FLAGS_CAST = 0x0020, // Set by 32 in SpecialFlags in DB if the quest requires RequiredOrNpcGo killcredit but NOT kill (a spell cast) + QUEST_SPECIAL_FLAGS_NO_REP_SPILLOVER = 0x0040, // Set by 64 in SpecialFlags in DB if the quest does not share rewarded reputation with other allied factions + QUEST_SPECIAL_FLAGS_CAN_FAIL_IN_ANY_STATE = 0x0080, // Set by 128 in SpecialFlags in DB if the quest is allowed to fail in Player::FailQuest() independant of its current state // room for more custom flags QUEST_SPECIAL_FLAGS_DB_ALLOWED = QUEST_SPECIAL_FLAGS_REPEATABLE | QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT | QUEST_SPECIAL_FLAGS_AUTO_ACCEPT | - QUEST_SPECIAL_FLAGS_DF_QUEST | QUEST_SPECIAL_FLAGS_MONTHLY | QUEST_SPECIAL_FLAGS_CAST | QUEST_SPECIAL_FLAGS_NO_REP_SPILLOVER, + QUEST_SPECIAL_FLAGS_DF_QUEST | QUEST_SPECIAL_FLAGS_MONTHLY | QUEST_SPECIAL_FLAGS_CAST | QUEST_SPECIAL_FLAGS_NO_REP_SPILLOVER | + QUEST_SPECIAL_FLAGS_CAN_FAIL_IN_ANY_STATE, - QUEST_SPECIAL_FLAGS_DELIVER = 0x080, // Internal flag computed only - QUEST_SPECIAL_FLAGS_SPEAKTO = 0x100, // Internal flag computed only - QUEST_SPECIAL_FLAGS_KILL = 0x200, // Internal flag computed only - QUEST_SPECIAL_FLAGS_TIMED = 0x400, // Internal flag computed only - QUEST_SPECIAL_FLAGS_PLAYER_KILL = 0x800 // Internal flag computed only + QUEST_SPECIAL_FLAGS_DELIVER = 0x0100, // Internal flag computed only + QUEST_SPECIAL_FLAGS_SPEAKTO = 0x0200, // Internal flag computed only + QUEST_SPECIAL_FLAGS_KILL = 0x0400, // Internal flag computed only + QUEST_SPECIAL_FLAGS_TIMED = 0x0800, // Internal flag computed only + QUEST_SPECIAL_FLAGS_PLAYER_KILL = 0x1000 // Internal flag computed only }; struct QuestLocale From ada343a6b31e4f25328c5fe7b7bb305f682b50d0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 22 Jun 2024 06:05:48 +0000 Subject: [PATCH 31/33] chore(DB): import pending files Referenced commit(s): b3f21d909ae83617c599de1f02a619fd200e3b5c --- .../rev_1718999602991537300.sql => db_world/2024_06_22_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1718999602991537300.sql => db_world/2024_06_22_01.sql} (77%) diff --git a/data/sql/updates/pending_db_world/rev_1718999602991537300.sql b/data/sql/updates/db_world/2024_06_22_01.sql similarity index 77% rename from data/sql/updates/pending_db_world/rev_1718999602991537300.sql rename to data/sql/updates/db_world/2024_06_22_01.sql index ad9483be0..4de16f04b 100644 --- a/data/sql/updates/pending_db_world/rev_1718999602991537300.sql +++ b/data/sql/updates/db_world/2024_06_22_01.sql @@ -1,2 +1,3 @@ +-- DB update 2024_06_22_00 -> 2024_06_22_01 -- make Quest 'Apothecary Zamah' failable in any state UPDATE `quest_template_addon` SET `SpecialFlags` = (`SpecialFlags` | 128) WHERE (`ID` = 853); From 9ee95bf23e9bdad5408c1f6c1df99d206efa0586 Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Sat, 22 Jun 2024 08:06:05 +0200 Subject: [PATCH 32/33] fix(Scripts/Kalimdor) Thrall Warchief's Blessing, add level and reputation requirement, spike activation (#19121) * activates pike * add sql --- .../pending_db_world/rev_1719024661180085554.sql | 5 +++++ src/server/scripts/Kalimdor/zone_orgrimmar.cpp | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 data/sql/updates/pending_db_world/rev_1719024661180085554.sql diff --git a/data/sql/updates/pending_db_world/rev_1719024661180085554.sql b/data/sql/updates/pending_db_world/rev_1719024661180085554.sql new file mode 100644 index 000000000..37f834556 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1719024661180085554.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 4) AND (`SourceEntry` = 16609) AND (`ConditionTypeOrReference` IN (27,5)); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 4, 16609, 0, 0, 27, 0, 63, 4, 0, 0, 0, 0, '', 'Warchief\'s Blessing - Player must be level 63 or lower'), +(13, 4, 16609, 0, 0, 5, 0, 528, 240, 0, 0, 0, 0, '', 'Warchief\'s Blessing - Player must be at least Friendly with Orgrimmar'); diff --git a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp index 0024ef5d4..2f2b39fbf 100644 --- a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp +++ b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp @@ -153,6 +153,8 @@ enum ThrallWarchief : uint32 AREA_CAMP_TAURAJO = 378, AREA_CROSSROADS = 380, + GO_UNADORNED_SPIKE = 175787, + // What the Wind Carries (ID: 6566) QUEST_WHAT_THE_WIND_CARRIES = 6566, GOSSIP_MENU_THRALL = 3664, @@ -247,7 +249,13 @@ public: me->GetMap()->LoadGrid(heraldOfThrallPos.GetPositionX(), heraldOfThrallPos.GetPositionY()); me->SummonCreature(NPC_HERALD_OF_THRALL, heraldOfThrallPos, TEMPSUMMON_TIMED_DESPAWN, 20 * IN_MILLISECONDS); me->HandleEmoteCommand(EMOTE_ONESHOT_ROAR); - scheduler.Schedule(2s, [this](TaskContext /*context*/) + scheduler.Schedule(1s, [this](TaskContext /*context*/) + { + if (GameObject* spike = me->FindNearestGameObject(GO_UNADORNED_SPIKE, 10.0f)) + { + spike->SetGoState(GO_STATE_ACTIVE); + } + }).Schedule(2s, [this](TaskContext /*context*/) { Talk(SAY_THRALL_ON_QUEST_REWARD_0); }).Schedule(9s, [this](TaskContext /*context*/) From e83e343aecfce7a4a6c0738c795a7e0db19b5295 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 22 Jun 2024 06:06:48 +0000 Subject: [PATCH 33/33] chore(DB): import pending files Referenced commit(s): ada343a6b31e4f25328c5fe7b7bb305f682b50d0 --- .../rev_1719024661180085554.sql => db_world/2024_06_22_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1719024661180085554.sql => db_world/2024_06_22_02.sql} (94%) diff --git a/data/sql/updates/pending_db_world/rev_1719024661180085554.sql b/data/sql/updates/db_world/2024_06_22_02.sql similarity index 94% rename from data/sql/updates/pending_db_world/rev_1719024661180085554.sql rename to data/sql/updates/db_world/2024_06_22_02.sql index 37f834556..d5ad4e547 100644 --- a/data/sql/updates/pending_db_world/rev_1719024661180085554.sql +++ b/data/sql/updates/db_world/2024_06_22_02.sql @@ -1,3 +1,4 @@ +-- DB update 2024_06_22_01 -> 2024_06_22_02 -- DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 4) AND (`SourceEntry` = 16609) AND (`ConditionTypeOrReference` IN (27,5)); INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES