From 78cc255f43fd382df6629a315bf2486cf075ea8a Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 22 Sep 2024 14:52:19 -0300 Subject: [PATCH 1/8] =?UTF-8?q?fix(Core/Spells):=20Fix=20Fatal=20Attractio?= =?UTF-8?q?n=20procing=20multiple=20times=20for=20eac=E2=80=A6=20(#20014)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/Spells): Fix Fatal Attraction procing multiple times for each player nearby --- src/server/game/Spells/SpellInfoCorrections.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index 9cf614e11b44f6..21b0ee636f7593 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4837,6 +4837,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->AttributesEx5 |= SPELL_ATTR5_ALLOW_ACTION_DURING_CHANNEL; }); + // Fatal Attraction + ApplySpellFix({ 40870 }, [](SpellInfo* spellInfo) + { + spellInfo->MaxAffectedTargets = 1; + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; From 2625f8c57ca0decfa407deb2c036ffd155b6528e Mon Sep 17 00:00:00 2001 From: Maxlytrius <44470484+Maxlytrius@users.noreply.github.com> Date: Sun, 22 Sep 2024 20:38:57 +0200 Subject: [PATCH 2/8] fix(DB/Item): Buycount adjustment for Star's Lament and Star's Tear (#18887) Create starstearlament.sql --- data/sql/updates/pending_db_world/starstearlament.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 data/sql/updates/pending_db_world/starstearlament.sql diff --git a/data/sql/updates/pending_db_world/starstearlament.sql b/data/sql/updates/pending_db_world/starstearlament.sql new file mode 100644 index 00000000000000..09ddc2497ca6ec --- /dev/null +++ b/data/sql/updates/pending_db_world/starstearlament.sql @@ -0,0 +1,3 @@ + +UPDATE `item_template` SET `BuyCount` = 20 WHERE (`entry` = 32453); +UPDATE `item_template` SET `BuyCount` = 5 WHERE (`entry` = 32455); From 014602c849a3310bdae6feda8f6fd695878f1eb5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 22 Sep 2024 18:39:51 +0000 Subject: [PATCH 3/8] chore(DB): import pending files Referenced commit(s): 2625f8c57ca0decfa407deb2c036ffd155b6528e --- .../starstearlament.sql => db_world/2024_09_22_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/starstearlament.sql => db_world/2024_09_22_03.sql} (75%) diff --git a/data/sql/updates/pending_db_world/starstearlament.sql b/data/sql/updates/db_world/2024_09_22_03.sql similarity index 75% rename from data/sql/updates/pending_db_world/starstearlament.sql rename to data/sql/updates/db_world/2024_09_22_03.sql index 09ddc2497ca6ec..a433e62ec71c72 100644 --- a/data/sql/updates/pending_db_world/starstearlament.sql +++ b/data/sql/updates/db_world/2024_09_22_03.sql @@ -1,3 +1,4 @@ +-- DB update 2024_09_22_02 -> 2024_09_22_03 UPDATE `item_template` SET `BuyCount` = 20 WHERE (`entry` = 32453); UPDATE `item_template` SET `BuyCount` = 5 WHERE (`entry` = 32455); From aab91777601ba88813dc777bca144edd2242a4d4 Mon Sep 17 00:00:00 2001 From: Ceikry <61421472+Ceikry@users.noreply.github.com> Date: Mon, 23 Sep 2024 05:30:08 -0500 Subject: [PATCH 4/8] fix(DB/Quest) - Omit deprecated Pledge of Secrecy from Goblin and Gnome Engineering Questlines. (#19577) * Add level adjustments for Pledge of Secrecy 30->20 * quest_template_addon -> quest_template * nvim lowercased everything * Update to remove the Pledge of Secrecy from the chain instead * Set RewardNextQuest for other horde breadcrumbs as well --- .../rev_1723083294200919589.sql | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1723083294200919589.sql diff --git a/data/sql/updates/pending_db_world/rev_1723083294200919589.sql b/data/sql/updates/pending_db_world/rev_1723083294200919589.sql new file mode 100644 index 00000000000000..fee9e07c0b60fd --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1723083294200919589.sql @@ -0,0 +1,26 @@ +-- Bug Report #19575 + +-- Unlink from engineering quest chain: +-- 3638 (Goblin Engineering - Pledge of Secrecy) +-- 3640 (gnome engineering - pledge of secrecy, alliance) +-- 3642 (gnome engineering - pledge of secrecy, horde) +UPDATE `quest_template` SET `RewardNextQuest`=0 WHERE `ID`=3638 OR `ID`=3640 OR `ID`=3642; +UPDATE `quest_template` SET `RewardNextQuest`=3639 WHERE `ID`=3526 OR `ID`=3629 OR `ID`=3633 OR `ID`=4181; +UPDATE `quest_template` SET `RewardNextQuest`=3641 WHERE `ID`=3630 OR `ID`=3632 OR `ID`=3634; +UPDATE `quest_template` SET `RewardNextQuest`=3643 WHERE `ID`=3635 OR `ID`=3637; + +-- Remove Pledge of Secrecy from creature_queststarter +DELETE FROM `creature_queststarter` WHERE `quest`=3638 OR `quest`=3640 OR `quest`=3642; +-- Remove Pledge of Secrecy from creature_questender +DELETE FROM `creature_questender` WHERE `quest`=3638 OR `quest`=3640 OR `quest`=3642; + +-- Link quests together: +-- 3526, 3629, 3633, 4181 (Goblin Engineering) -> 3639 (Goblin Engineering - Show Your Work) +UPDATE `quest_template_addon` SET `PrevQuestID`=3633 WHERE `ID`=3639; +UPDATE `quest_template_addon` SET `NextQuestID`=3639 WHERE `ID`=3526 OR `ID`=3629 OR `ID`=3633 OR `ID`=4181; +-- 3630, 3632, 3634 (Gnome Engineering - Alliance) -> 3641 (Gnome Engineering - Show Your Work - Alliance) +UPDATE `quest_template_addon` SET `PrevQuestID`=3634 WHERE `ID`=3641; +UPDATE `quest_template_addon` SET `NextQuestID`=3641 WHERE `ID`=3630 OR `ID`=3632 OR `ID`=3634; +-- 3635, 3637 (Gnome Engineering - Horde) -> 3643 (Gnome Engineering - Show Your Work - Horde) +UPDATE `quest_template_addon` SET `PrevQuestID`=3635 WHERE `ID`=3643; +UPDATE `quest_template_addon` SET `NextQuestID`=3643 WHERE `ID`=3635 OR `ID`=3637; From e58c9cba422d06d76d11b835bd9f376fd525e1dd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 23 Sep 2024 10:31:03 +0000 Subject: [PATCH 5/8] chore(DB): import pending files Referenced commit(s): aab91777601ba88813dc777bca144edd2242a4d4 --- .../rev_1723083294200919589.sql => db_world/2024_09_23_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1723083294200919589.sql => db_world/2024_09_23_00.sql} (97%) diff --git a/data/sql/updates/pending_db_world/rev_1723083294200919589.sql b/data/sql/updates/db_world/2024_09_23_00.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1723083294200919589.sql rename to data/sql/updates/db_world/2024_09_23_00.sql index fee9e07c0b60fd..5455e1901fa2c9 100644 --- a/data/sql/updates/pending_db_world/rev_1723083294200919589.sql +++ b/data/sql/updates/db_world/2024_09_23_00.sql @@ -1,3 +1,4 @@ +-- DB update 2024_09_22_03 -> 2024_09_23_00 -- Bug Report #19575 -- Unlink from engineering quest chain: From 511235cca3ae8e658a018ca81745226a25b8b9be Mon Sep 17 00:00:00 2001 From: Grimgravy Date: Mon, 23 Sep 2024 09:05:11 -0300 Subject: [PATCH 6/8] fix(Scripts/Quest): Fires Over Skettis (#19567) * fix(Scripts/Quest): Fires Over Skettis * Update spell_item.cpp --------- --- .../rev_1722989630849981700.sql | 8 ++++ src/server/scripts/Spells/spell_item.cpp | 41 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1722989630849981700.sql diff --git a/data/sql/updates/pending_db_world/rev_1722989630849981700.sql b/data/sql/updates/pending_db_world/rev_1722989630849981700.sql new file mode 100644 index 00000000000000..90f862a809f10c --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1722989630849981700.sql @@ -0,0 +1,8 @@ +-- +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_item_skyguard_blasting_charges'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(39844, 'spell_item_skyguard_blasting_charges'); + +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 39844) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 30) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 185549) AND (`ConditionValue2` = 30) AND (`ConditionValue3` = 0); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 39844, 0, 0, 30, 0, 185549, 30, 0, 0, 0, 0, '', ' Launch a blasting charge from your flying mount at monstrous kaliri eggs.'); diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 4a92e2a13cd117..5b50c509e449a8 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -4051,6 +4051,46 @@ class spell_item_gor_dreks_ointment : public SpellScript } }; +enum Skettis +{ + QUEST_FIRES_OVER_SKETTIS = 11008 +}; + +class spell_item_skyguard_blasting_charges : public SpellScript +{ + PrepareSpellScript(spell_item_skyguard_blasting_charges); + + void HandleOpenObject(SpellEffIndex effIndex) + { + PreventHitDefaultEffect(effIndex); + if (GameObject* go = GetHitGObj()) + go->UseDoorOrButton(); + } + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + if (Unit* kaliri = GetHitUnit()) + kaliri->ToCreature()->DespawnOrUnsummon(0s, 30s); + } + + SpellCastResult CheckQuest() + { + if (Player* playerCaster = GetCaster()->ToPlayer()) + { + if (playerCaster->GetQuestStatus(QUEST_FIRES_OVER_SKETTIS) == QUEST_STATUS_INCOMPLETE) + return SPELL_CAST_OK; + } + return SPELL_FAILED_DONT_REPORT; + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_item_skyguard_blasting_charges::HandleOpenObject, EFFECT_1, SPELL_EFFECT_ACTIVATE_OBJECT); + OnEffectHitTarget += SpellEffectFn(spell_item_skyguard_blasting_charges::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + OnCheckCast += SpellCheckCastFn(spell_item_skyguard_blasting_charges::CheckQuest); + } +}; + void AddSC_item_spell_scripts() { RegisterSpellScript(spell_item_massive_seaforium_charge); @@ -4175,4 +4215,5 @@ void AddSC_item_spell_scripts() RegisterSpellAndAuraScriptPair(spell_item_eye_of_grillok, spell_item_eye_of_grillok_aura); RegisterSpellScript(spell_item_fel_mana_potion); RegisterSpellScript(spell_item_gor_dreks_ointment); + RegisterSpellScript(spell_item_skyguard_blasting_charges); } From 0858c8bbc0c30993ebe60fabe6e5d6d153fc0cf6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 23 Sep 2024 12:06:09 +0000 Subject: [PATCH 7/8] chore(DB): import pending files Referenced commit(s): 511235cca3ae8e658a018ca81745226a25b8b9be --- .../rev_1722989630849981700.sql => db_world/2024_09_23_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1722989630849981700.sql => db_world/2024_09_23_01.sql} (95%) diff --git a/data/sql/updates/pending_db_world/rev_1722989630849981700.sql b/data/sql/updates/db_world/2024_09_23_01.sql similarity index 95% rename from data/sql/updates/pending_db_world/rev_1722989630849981700.sql rename to data/sql/updates/db_world/2024_09_23_01.sql index 90f862a809f10c..8f8a23d9236749 100644 --- a/data/sql/updates/pending_db_world/rev_1722989630849981700.sql +++ b/data/sql/updates/db_world/2024_09_23_01.sql @@ -1,3 +1,4 @@ +-- DB update 2024_09_23_00 -> 2024_09_23_01 -- DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_item_skyguard_blasting_charges'; INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES From 0e9fb5946b9e7bc1ef3bc86ab50367a30b85d78d Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 23 Sep 2024 10:21:30 -0300 Subject: [PATCH 8/8] =?UTF-8?q?fix(Scripts/BlackTemple):=20Fix=20Fatal=20A?= =?UTF-8?q?ttraction=20not=20being=20removed=20if=20t=E2=80=A6=20(#20021)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Scripts/BlackTemple): Fix Fatal Attraction not being removed if targets move apart --- .../scripts/Outland/BlackTemple/boss_mother_shahraz.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp index 830447c8da54c2..31bf701687f5c1 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp @@ -235,7 +235,13 @@ class spell_mother_shahraz_fatal_attraction_dummy : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override { - return ValidateSpellInfo({ SPELL_FATAL_ATTRACTION_DAMAGE }); + return ValidateSpellInfo({ SPELL_FATAL_ATTRACTION_DAMAGE, SPELL_FATAL_ATTRACTION_AURA }); + } + + void FilterTargets(std::list& targets) + { + if (targets.empty()) + GetCaster()->RemoveAurasDueToSpell(SPELL_FATAL_ATTRACTION_AURA); } void HandleDummy(SpellEffIndex /*effIndex*/) @@ -255,6 +261,7 @@ class spell_mother_shahraz_fatal_attraction_dummy : public SpellScript void Register() override { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mother_shahraz_fatal_attraction_dummy::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ALLY); OnEffectHitTarget += SpellEffectFn(spell_mother_shahraz_fatal_attraction_dummy::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } };