From eced31f47f62b44a953faed291675ebfde254551 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Thu, 25 Aug 2022 16:08:07 -0300 Subject: [PATCH 01/37] fix(DB/Creature): Ayamiss larva should be knockback immune (#12847) --- data/sql/updates/pending_db_world/rev_1661425685471798200.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1661425685471798200.sql diff --git a/data/sql/updates/pending_db_world/rev_1661425685471798200.sql b/data/sql/updates/pending_db_world/rev_1661425685471798200.sql new file mode 100644 index 000000000..82b4d84c1 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1661425685471798200.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `flags_extra` = `flags_extra`|1073741824 WHERE `entry` = 15555; From 11bac9ace104021c54267f6ff23152feb0dc7dcc Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Thu, 25 Aug 2022 19:10:25 +0000 Subject: [PATCH 02/37] chore(DB): import pending files Referenced commit(s): eced31f47f62b44a953faed291675ebfde254551 --- .../rev_1661425685471798200.sql => db_world/2022_08_25_05.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1661425685471798200.sql => db_world/2022_08_25_05.sql} (69%) diff --git a/data/sql/updates/pending_db_world/rev_1661425685471798200.sql b/data/sql/updates/db_world/2022_08_25_05.sql similarity index 69% rename from data/sql/updates/pending_db_world/rev_1661425685471798200.sql rename to data/sql/updates/db_world/2022_08_25_05.sql index 82b4d84c1..c09dc7a9b 100644 --- a/data/sql/updates/pending_db_world/rev_1661425685471798200.sql +++ b/data/sql/updates/db_world/2022_08_25_05.sql @@ -1,2 +1,3 @@ +-- DB update 2022_08_25_04 -> 2022_08_25_05 -- UPDATE `creature_template` SET `flags_extra` = `flags_extra`|1073741824 WHERE `entry` = 15555; From 89251253506d3d1a6baabdf4b40306941789774b Mon Sep 17 00:00:00 2001 From: David Strickland Date: Thu, 25 Aug 2022 15:30:24 -0500 Subject: [PATCH 03/37] feat(CMake): Minor CMake Update to Modules Cmake File to Allow Custom Modules to make changes without changing Core. (#12846) * Added in a the ability for module developers to create a cmake file that gets run inline with the module CMakeLists.txt. Minor Perf hit on the build but will allow for Modules to be more flexible in how they work with CMake. * Comments and Documentation --- modules/CMakeLists.txt | 5 +++++ modules/how_to_make_a_module.md | 2 ++ 2 files changed, 7 insertions(+) diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index a8d199edf..afdfe2c5a 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -288,6 +288,11 @@ target_include_directories(modules ${CMAKE_CURRENT_SOURCE_DIR} ${PUBLIC_INCLUDES}) +# Enables Devs to Include a cmake file in their module that will get run inline with the config. +foreach(SOURCE_MODULE ${MODULES_MODULE_LIST}) + include("${CMAKE_SOURCE_DIR}/modules/${SOURCE_MODULE}/${SOURCE_MODULE}.cmake" OPTIONAL) +endforeach() + set_target_properties(modules PROPERTIES FOLDER diff --git a/modules/how_to_make_a_module.md b/modules/how_to_make_a_module.md index 8a803c456..52db7a86c 100644 --- a/modules/how_to_make_a_module.md +++ b/modules/how_to_make_a_module.md @@ -18,3 +18,5 @@ NOTE: You can also clone our skeleton-module manually, clean the history, and co 3) Share it with the community! Join us on our discord, share it there, then we might fork it officially and it will appear in the module catalogue. + +Note: For Advanced CMake implementations a .cmake file in your module folder will be included in the config of Modules if it exists. See: ./CMakeList.txt around line #290 \ No newline at end of file From 3826d0c94b8fc0ba45a4a6ebe221ca0d1103dc5e Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Thu, 25 Aug 2022 23:21:18 -0300 Subject: [PATCH 04/37] fix(DB/Loot): Update Scarab Coffer (180690 & 180691) loot (#12850) --- .../pending_db_world/rev_1661475791842006200.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1661475791842006200.sql diff --git a/data/sql/updates/pending_db_world/rev_1661475791842006200.sql b/data/sql/updates/pending_db_world/rev_1661475791842006200.sql new file mode 100644 index 000000000..6f48e0b93 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1661475791842006200.sql @@ -0,0 +1,15 @@ +-- +DELETE FROM `reference_loot_template` WHERE `Entry`=14503; +INSERT INTO `reference_loot_template` (`Entry`, `Item`, `Chance`, `GroupId`, `Comment`) VALUES (14503, 21156, 0, 1, 'Scarab Bag'); + +DELETE FROM `gameobject_loot_template` WHERE (`Entry` = 17532) AND (`Item` IN (1, 21156, 21157)); +INSERT INTO `gameobject_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(17532, 21156, 0, 100, 0, 1, 0, 1, 1, 'Scarab Coffer - Scarab Bag'), +(17532, 21157, 14001, 100, 0, 1, 0, 1, 1, 'Scarab Coffer - (ReferenceTable)'); + +DELETE FROM `gameobject_loot_template` WHERE (`Entry` = 17533) AND (`Item` IN (1, 21157, 21159, 21156, 21158)); +INSERT INTO `gameobject_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(17533, 21157, 14503, 34, 0, 1, 0, 1, 1, 'Large Scarab Coffer - (ReferenceTable)'), +(17533, 21159, 14502, 100, 0, 1, 0, 1, 1, 'Large Scarab Coffer - (ReferenceTable)'), +(17533, 21156, 14503, 100, 0, 1, 0, 1, 1, 'Large Scarab Coffer - (ReferenceTable)'), +(17533, 21158, 14503, 34, 0, 1, 0, 1, 1, 'Large Scarab Coffer - (ReferenceTable)'); From 1a043114689514a09d3fdedec5d52c0648fca43a Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Fri, 26 Aug 2022 02:23:44 +0000 Subject: [PATCH 05/37] chore(DB): import pending files Referenced commit(s): 3826d0c94b8fc0ba45a4a6ebe221ca0d1103dc5e --- .../rev_1661475791842006200.sql => db_world/2022_08_26_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1661475791842006200.sql => db_world/2022_08_26_00.sql} (96%) diff --git a/data/sql/updates/pending_db_world/rev_1661475791842006200.sql b/data/sql/updates/db_world/2022_08_26_00.sql similarity index 96% rename from data/sql/updates/pending_db_world/rev_1661475791842006200.sql rename to data/sql/updates/db_world/2022_08_26_00.sql index 6f48e0b93..d2d371991 100644 --- a/data/sql/updates/pending_db_world/rev_1661475791842006200.sql +++ b/data/sql/updates/db_world/2022_08_26_00.sql @@ -1,3 +1,4 @@ +-- DB update 2022_08_25_05 -> 2022_08_26_00 -- DELETE FROM `reference_loot_template` WHERE `Entry`=14503; INSERT INTO `reference_loot_template` (`Entry`, `Item`, `Chance`, `GroupId`, `Comment`) VALUES (14503, 21156, 0, 1, 'Scarab Bag'); From 760d5e071fcd0f24328b523fbe7b2525936c4fc3 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Fri, 26 Aug 2022 08:06:35 -0300 Subject: [PATCH 06/37] =?UTF-8?q?feat(Core/DBUpdater):=20Apply=20each=20sq?= =?UTF-8?q?l=20update=20file=20in=20a=20separate=20transa=E2=80=A6=20(#128?= =?UTF-8?q?42)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cherry-pick: https://github.com/TrinityCore/TrinityCore/commit/b79a91039bba12d62e43806d8a20ad76107ac5d7 Co-authored-by: Shauren --- src/server/database/Updater/DBUpdater.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/server/database/Updater/DBUpdater.cpp b/src/server/database/Updater/DBUpdater.cpp index 4bec99abc..d4f45c297 100644 --- a/src/server/database/Updater/DBUpdater.cpp +++ b/src/server/database/Updater/DBUpdater.cpp @@ -441,7 +441,7 @@ void DBUpdater::ApplyFile(DatabaseWorkerPool& pool, std::string const& hos std::string const& password, std::string const& port_or_socket, std::string const& database, std::string const& ssl, Path const& path) { std::vector args; - args.reserve(7); + args.reserve(9); // CLI Client connection info args.emplace_back("-h" + host); @@ -491,13 +491,17 @@ void DBUpdater::ApplyFile(DatabaseWorkerPool& pool, std::string const& hos #endif + // Execute sql file + args.emplace_back("-e"); + args.emplace_back(Acore::StringFormat("BEGIN; SOURCE %s; COMMIT;", path.generic_string().c_str())); + // Database if (!database.empty()) args.emplace_back(database); // Invokes a mysql process which doesn't leak credentials to logs int const ret = Acore::StartProcess(DBUpdaterUtil::GetCorrectedMySQLExecutable(), args, - "sql.updates", path.generic_string(), true); + "sql.updates", "", true); if (ret != EXIT_SUCCESS) { From 2ed6848d6a98ad8d084a1f8b08bb5b4920376150 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Fri, 26 Aug 2022 08:13:20 -0300 Subject: [PATCH 07/37] =?UTF-8?q?fix(Scripts/RuinsOfAhnQiraj):=20Increase?= =?UTF-8?q?=20Andorov's=20bash=20intervals=20and=20r=E2=80=A6=20(#12853)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp index 4fbe00e82..73e5f93b0 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp @@ -51,12 +51,6 @@ struct boss_rajaxx : public BossAI { boss_rajaxx(Creature* creature) : BossAI(creature, DATA_RAJAXX) { } - void Reset() override - { - BossAI::Reset(); - enraged = false; - } - void JustDied(Unit* /*killer*/) override { Talk(SAY_DEATH); @@ -105,8 +99,6 @@ struct boss_rajaxx : public BossAI DoMeleeAttackIfReady(); } -private: - bool enraged; }; class spell_rajaxx_thundercrash : public SpellScript @@ -183,7 +175,6 @@ struct npc_general_andorov : public npc_escortAI kaldoreielitist->SetImmuneToNPC(true); kaldoreielitist->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE); kaldoreielitist->SetReactState(REACT_PASSIVE); - kaldoreielitist->SetFaction(FACTION_ESCORT_H_ACTIVE); CAST_AI(SmartAI, kaldoreielitist->AI())->SetFollow(me, 2.5f, 0.f + i * (M_PI / 2)); } } @@ -330,7 +321,7 @@ struct npc_general_andorov : public npc_escortAI { case EVENT_BASH: DoCastVictim(SPELL_BASH); - events.ScheduleEvent(EVENT_BASH, urand(12, 15) * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_BASH, urand(25, 38) * IN_MILLISECONDS); break; case EVENT_COMMAND_AURA: DoCastSelf(SPELL_AURA_OF_COMMAND, true); From 2acd0a4bb4a38a501f5d3e310260d336c8cbee76 Mon Sep 17 00:00:00 2001 From: Angelo Venturini Date: Fri, 26 Aug 2022 16:50:07 -0300 Subject: [PATCH 08/37] fix: Buru crash (#12858) --- src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp index f0a04ed3b..ee9317513 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp @@ -129,7 +129,7 @@ struct boss_buru : public BossAI void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType, SpellSchoolMask) override { - if (attacker->GetEntry() == NPC_BURU_EGG) + if (attacker && attacker->GetEntry() == NPC_BURU_EGG) { me->LowerPlayerDamageReq(damage); } From ba3640255bd94ac60223619271c375ddc70e0d11 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Fri, 26 Aug 2022 20:11:39 -0300 Subject: [PATCH 09/37] =?UTF-8?q?fix(Scripts/RuinsOfAhnQiraj):=20Implement?= =?UTF-8?q?=20bonus=20reputation=20gains=20if=20you=E2=80=A6=20(#12856)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Scripts/RuinsOfAhnQiraj): Implement bonus reputation gains if you keep Andorov + Keldorei Elites alive during the General Rajaxx encounter * Update boss_rajaxx.cpp * Update boss_rajaxx.cpp * Update boss_rajaxx.cpp --- .../Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp | 38 ++++++++++++++++--- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp index 73e5f93b0..c5131c4a3 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp @@ -35,9 +35,12 @@ enum Yells enum Spells { - SPELL_DISARM = 6713, - SPELL_FRENZY = 8269, - SPELL_THUNDERCRASH = 25599 + SPELL_DISARM = 6713, + SPELL_FRENZY = 8269, + SPELL_THUNDERCRASH = 25599, + + // Server-side + SPELL_CENARION_REPUTATION = 26342 }; enum Events @@ -61,6 +64,26 @@ struct boss_rajaxx : public BossAI andorov->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_VENDOR); andorov->ForceValuesUpdateAtIndex(UNIT_NPC_FLAGS); } + + std::list creatureList; + me->GetCreatureListWithEntryInGrid(creatureList, NPC_KALDOREI_ELITE, 200.0f); + creatureList.remove_if([&](Creature* creature) -> bool { return !creature->IsAlive(); }); + + me->GetMap()->DoForAllPlayers([&, creatureList](Player* player) + { + for (uint8 i = 0; i < creatureList.size(); ++i) + { + player->CastSpell(player, SPELL_CENARION_REPUTATION, true); + } + + if (Creature* andorov = instance->instance->GetCreature(instance->GetGuidData(DATA_ANDOROV))) + { + if (andorov->IsAlive()) + { + player->CastSpell(player, SPELL_CENARION_REPUTATION, true); + } + } + }); } void EnterCombat(Unit* /*victim*/) override @@ -237,13 +260,16 @@ struct npc_general_andorov : public npc_escortAI } } - void JustDied(Unit* /*killer*/) override + void JustDied(Unit* killer) override { _summons.DespawnAll(); - if (Creature* rajaxx = instance->GetCreature(DATA_RAJAXX)) + if (killer->GetEntry() == NPC_RAJAXX) { - rajaxx->AI()->Talk(SAY_KILLS_ANDOROV); + if (Creature* rajaxx = instance->GetCreature(DATA_RAJAXX)) + { + rajaxx->AI()->Talk(SAY_KILLS_ANDOROV); + } } } From 0f0beb01488aad0cc33a83afa9c43a906866db3a Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sat, 27 Aug 2022 14:44:52 +0200 Subject: [PATCH 10/37] fix(Scripts/TempleOfAhnQiraj): Aggro Drones. (#12737) * fix(Scripts/Temple of AhnQiraj): Aggro Drones. Fixes #12716 * fix build Co-authored-by: Angelo Venturini --- .../rev_1660487789222263800.sql | 4 +++ .../TempleOfAhnQiraj/temple_of_ahnqiraj.cpp | 34 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1660487789222263800.sql diff --git a/data/sql/updates/pending_db_world/rev_1660487789222263800.sql b/data/sql/updates/pending_db_world/rev_1660487789222263800.sql new file mode 100644 index 000000000..1804a5187 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1660487789222263800.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `spell_script_names` WHERE `spell_id`=25153; +INSERT INTO `spell_script_names` VALUES +(25153,'spell_aggro_drones'); diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp index 9b319ed4c..925a943c7 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp @@ -17,6 +17,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellScript.h" #include "temple_of_ahnqiraj.h" #include "TaskScheduler.h" @@ -150,7 +151,40 @@ private: bool _enraged; }; +enum NPCs +{ + NPC_VEKNISS_DRONE = 15300 +}; + +class spell_aggro_drones : public SpellScript +{ + PrepareSpellScript(spell_aggro_drones); + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + if (Unit* caster = GetCaster()) + { + if (Creature* target = GetHitCreature()) + { + if (target->GetEntry() == NPC_VEKNISS_DRONE) + { + if (Unit* victim = caster->GetVictim()) + { + target->AI()->AttackStart(victim); + } + } + } + } + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_aggro_drones::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } +}; + void AddSC_temple_of_ahnqiraj() { RegisterTempleOfAhnQirajCreatureAI(npc_anubisath_defender); + RegisterSpellScript(spell_aggro_drones); } From f7de5235f8e12a50205e7a90c2577003b78d14db Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sat, 27 Aug 2022 14:45:09 +0200 Subject: [PATCH 11/37] fix(Core/Spells): Death's Respite should not generate threat. (#12807) * fix(Core/Spells): Death's Respite should not generate threat. Fixes #12798 * Update SpellInfoCorrections.cpp --- 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 85927da69..e646a9774 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4361,6 +4361,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->AttributesEx3 |= SPELL_ATTR3_ALWAYS_HIT; }); + // Death's Respite + ApplySpellFix({ 67731, 68305 }, [](SpellInfo* spellInfo) + { + spellInfo->AttributesEx3 |= SPELL_ATTR3_SUPRESS_TARGET_PROCS; + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; From d1e7fc240c4d46fe2c8f72b5639d0fb26dcc30c1 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sat, 27 Aug 2022 14:45:49 +0200 Subject: [PATCH 12/37] fix(Scripts/TempleOfAhnQiraj): Skeram should cast True Fulfillment on closest non-tank player. fix(Scripts/TempleOfAhnQiraj): Skeram should cast True Fulfillment on closest non-tank player. Fixes #12713 --- src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp index b48830de2..4cce25cdf 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp @@ -146,9 +146,7 @@ struct boss_skeram : public BossAI events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, 8s, 18s); break; case EVENT_FULLFILMENT: - /// @todo For some weird reason boss does not cast this - // Spell actually works, tested in duel - DoCast(SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true), SPELL_TRUE_FULFILLMENT, false); + DoCast(SelectTarget(SelectTargetMethod::MinDistance, 1, 0.0f, true), SPELL_TRUE_FULFILLMENT, false); events.ScheduleEvent(EVENT_FULLFILMENT, 20s, 30s); break; case EVENT_BLINK: From e01ec7533e740ba9affcf94772695bf524e8e6a2 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 27 Aug 2022 09:46:06 -0300 Subject: [PATCH 13/37] =?UTF-8?q?fix(Scripts/TempleOfAhnQiraj):=20Princess?= =?UTF-8?q?=20Huhuran's=20Poison=20Bolts=20should=E2=80=A6=20(#12861)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Scripts/TempleOfAhnQiraj): Princess Huhuran's Poison Bolts should hit the closest targets --- .../rev_1661569695988798600.sql | 4 ++++ .../TempleOfAhnQiraj/boss_huhuran.cpp | 22 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1661569695988798600.sql diff --git a/data/sql/updates/pending_db_world/rev_1661569695988798600.sql b/data/sql/updates/pending_db_world/rev_1661569695988798600.sql new file mode 100644 index 000000000..4f51be928 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1661569695988798600.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_huhuran_poison_bolt'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(26052, 'spell_huhuran_poison_bolt'); diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp index 75959e85a..2f3dffc3e 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp @@ -148,8 +148,30 @@ class spell_huhuran_wyvern_sting : public AuraScript } }; +// 26052 - Poison Bolt +class spell_huhuran_poison_bolt : public SpellScript +{ + PrepareSpellScript(spell_huhuran_poison_bolt); + + void FilterTargets(std::list& targets) + { + uint32 const maxTargets = GetSpellInfo()->MaxAffectedTargets; + if (targets.size() > maxTargets) + { + targets.sort(Acore::ObjectDistanceOrderPred(GetCaster())); + targets.resize(maxTargets); + } + } + + void Register() override + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_huhuran_poison_bolt::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); + } +}; + void AddSC_boss_huhuran() { RegisterTempleOfAhnQirajCreatureAI(boss_huhuran); RegisterSpellScript(spell_huhuran_wyvern_sting); + RegisterSpellScript(spell_huhuran_poison_bolt); } From 022a90cff4944c8248634641eacf9fcb4b5f3093 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sat, 27 Aug 2022 14:46:32 +0200 Subject: [PATCH 14/37] fix(Scripts/TempleOfAhnQiraj): Added missing doors. (#12734) Fixes #12712 --- .../rev_1660471315394863600.sql | 6 +++ .../Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp | 2 + .../TempleOfAhnQiraj/boss_twinemperors.cpp | 7 +++ .../instance_temple_of_ahnqiraj.cpp | 51 +++++++++++++++++++ .../TempleOfAhnQiraj/temple_of_ahnqiraj.h | 7 +++ 5 files changed, 73 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1660471315394863600.sql diff --git a/data/sql/updates/pending_db_world/rev_1660471315394863600.sql b/data/sql/updates/pending_db_world/rev_1660471315394863600.sql new file mode 100644 index 000000000..a8ea93a32 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1660471315394863600.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `gameobject` WHERE `id` IN (180634,180635,180636); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`) VALUES +(6680,180634,531,0,0,1,1,-8929.61,1344.38,-104.211,-2.43473,0,0,-0.938191,0.346119,604800,100,0,'',0), +(6683,180635,531,0,0,1,1,-9016.36,1330.68,-104.211,2.80125,0,0,0.985556,0.169351,604800,100,1,'',0), +(6686,180636,531,0,0,1,1,-8429.59,2048.81,153.309,-2.76634,0,0,-0.98245,0.186527,604800,100,1,'',0); diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp index 4cce25cdf..e01f1dc05 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp @@ -112,6 +112,8 @@ struct boss_skeram : public BossAI { _JustDied(); Talk(SAY_DEATH); + + instance->HandleGameObject(instance->GetGuidData(AQ40_DOOR_3), true); } else me->RemoveCorpse(); diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp index 1b5922a36..e496ef8a3 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp @@ -91,6 +91,8 @@ struct boss_twinemperorsAI : public BossAI me->ClearUnitState(UNIT_STATE_STUNNED); DontYellWhenDead = false; EnrageTimer = 15 * 60000; + + instance->HandleGameObject(instance->GetGuidData(AQ40_DOOR_1), true); } Creature* GetOtherBoss() @@ -127,6 +129,9 @@ struct boss_twinemperorsAI : public BossAI } if (!DontYellWhenDead) // I hope AI is not threaded DoPlaySoundToSet(me, IAmVeklor() ? SOUND_VL_DEATH : SOUND_VN_DEATH); + + instance->HandleGameObject(instance->GetGuidData(AQ40_DOOR_1), true); + instance->HandleGameObject(instance->GetGuidData(AQ40_DOOR_2), true); } void KilledUnit(Unit* /*victim*/) override @@ -150,6 +155,8 @@ struct boss_twinemperorsAI : public BossAI otherAI->DoZoneInCombat(); } } + + instance->HandleGameObject(instance->GetGuidData(AQ40_DOOR_1), false); } void SpellHit(Unit* caster, SpellInfo const* entry) override diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp index afa17a879..5c989a169 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp @@ -42,6 +42,7 @@ public: instance_temple_of_ahnqiraj_InstanceMapScript(Map* map) : InstanceScript(map) { LoadObjectData(creatureData, nullptr); + doorGUIDs.fill(ObjectGuid::Empty); SetBossNumber(MAX_BOSS_NUMBER); } @@ -55,6 +56,8 @@ public: ObjectGuid VeklorGUID; ObjectGuid VeknilashGUID; ObjectGuid ViscidusGUID; + std::array doorGUIDs; + uint32 BugTrioDeathCount; uint32 CthunPhase; @@ -73,6 +76,10 @@ public: { case NPC_SKERAM: SkeramGUID = creature->GetGUID(); + if (!creature->IsAlive()) + { + HandleGameObject(doorGUIDs[2], true); + } break; case NPC_VEM: VemGUID = creature->GetGUID(); @@ -85,6 +92,10 @@ public: break; case NPC_VEKLOR: VeklorGUID = creature->GetGUID(); + if (!creature->IsAlive()) + { + HandleGameObject(doorGUIDs[1], true); + } break; case NPC_VEKNILASH: VeknilashGUID = creature->GetGUID(); @@ -101,6 +112,40 @@ public: InstanceScript::OnCreatureCreate(creature); } + void OnGameObjectCreate(GameObject* go) override + { + switch (go->GetEntry()) + { + case AQ40_DOOR_1: + doorGUIDs[0] = go->GetGUID(); + break; + case AQ40_DOOR_2: + doorGUIDs[1] = go->GetGUID(); + if (Creature* veklor = instance->GetCreature(VeklorGUID)) + { + if (!veklor->IsAlive()) + { + HandleGameObject(go->GetGUID(), true); + } + } + break; + case AQ40_DOOR_3: + doorGUIDs[2] = go->GetGUID(); + if (Creature* skeram = instance->GetCreature(SkeramGUID)) + { + if (!skeram->IsAlive()) + { + HandleGameObject(go->GetGUID(), true); + } + } + break; + default: + break; + } + + InstanceScript::OnGameObjectCreate(go); + } + uint32 GetData(uint32 type) const override { switch (type) @@ -142,6 +187,12 @@ public: return VeknilashGUID; case DATA_VISCIDUS: return ViscidusGUID; + case AQ40_DOOR_1: + return doorGUIDs[0]; + case AQ40_DOOR_2: + return doorGUIDs[1]; + case AQ40_DOOR_3: + return doorGUIDs[2]; } return ObjectGuid::Empty; } diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h index 5b097f344..c81b09033 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h @@ -79,6 +79,13 @@ enum Creatures NPC_SARTURA = 15516 }; +enum ObjectsAQ40 +{ + AQ40_DOOR_1 = 180634, + AQ40_DOOR_2 = 180635, + AQ40_DOOR_3 = 180636 +}; + template inline AI* GetTempleOfAhnQirajAI(T* obj) { From 9b3082f99291f8c95fc33146b89af3787a39b88a Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sat, 27 Aug 2022 12:48:41 +0000 Subject: [PATCH 15/37] chore(DB): import pending files Referenced commit(s): 022a90cff4944c8248634641eacf9fcb4b5f3093 --- .../rev_1660471315394863600.sql => db_world/2022_08_27_00.sql} | 1 + .../rev_1660487789222263800.sql => db_world/2022_08_27_01.sql} | 1 + .../rev_1661569695988798600.sql => db_world/2022_08_27_02.sql} | 1 + 3 files changed, 3 insertions(+) rename data/sql/updates/{pending_db_world/rev_1660471315394863600.sql => db_world/2022_08_27_00.sql} (93%) rename data/sql/updates/{pending_db_world/rev_1660487789222263800.sql => db_world/2022_08_27_01.sql} (74%) rename data/sql/updates/{pending_db_world/rev_1661569695988798600.sql => db_world/2022_08_27_02.sql} (81%) diff --git a/data/sql/updates/pending_db_world/rev_1660471315394863600.sql b/data/sql/updates/db_world/2022_08_27_00.sql similarity index 93% rename from data/sql/updates/pending_db_world/rev_1660471315394863600.sql rename to data/sql/updates/db_world/2022_08_27_00.sql index a8ea93a32..11062f078 100644 --- a/data/sql/updates/pending_db_world/rev_1660471315394863600.sql +++ b/data/sql/updates/db_world/2022_08_27_00.sql @@ -1,3 +1,4 @@ +-- DB update 2022_08_26_00 -> 2022_08_27_00 -- DELETE FROM `gameobject` WHERE `id` IN (180634,180635,180636); INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`) VALUES diff --git a/data/sql/updates/pending_db_world/rev_1660487789222263800.sql b/data/sql/updates/db_world/2022_08_27_01.sql similarity index 74% rename from data/sql/updates/pending_db_world/rev_1660487789222263800.sql rename to data/sql/updates/db_world/2022_08_27_01.sql index 1804a5187..c633373c6 100644 --- a/data/sql/updates/pending_db_world/rev_1660487789222263800.sql +++ b/data/sql/updates/db_world/2022_08_27_01.sql @@ -1,3 +1,4 @@ +-- DB update 2022_08_27_00 -> 2022_08_27_01 -- DELETE FROM `spell_script_names` WHERE `spell_id`=25153; INSERT INTO `spell_script_names` VALUES diff --git a/data/sql/updates/pending_db_world/rev_1661569695988798600.sql b/data/sql/updates/db_world/2022_08_27_02.sql similarity index 81% rename from data/sql/updates/pending_db_world/rev_1661569695988798600.sql rename to data/sql/updates/db_world/2022_08_27_02.sql index 4f51be928..4b9e65f18 100644 --- a/data/sql/updates/pending_db_world/rev_1661569695988798600.sql +++ b/data/sql/updates/db_world/2022_08_27_02.sql @@ -1,3 +1,4 @@ +-- DB update 2022_08_27_01 -> 2022_08_27_02 -- DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_huhuran_poison_bolt'; INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES From 8c369ef865276032d0755e6c88eec2bf2da3f8de Mon Sep 17 00:00:00 2001 From: Grimgravy Date: Sat, 27 Aug 2022 09:51:40 -0300 Subject: [PATCH 16/37] fix(Core/Quest): improved flight of the wintergarde defender (#12437) * fix(Scripts/Quest): Flight of the Wintergarde Defender * . * update * update --- .../rev_1658237791462383400.sql | 86 ++++++ .../scripts/Northrend/zone_dragonblight.cpp | 262 ++++++++++++++++++ 2 files changed, 348 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1658237791462383400.sql diff --git a/data/sql/updates/pending_db_world/rev_1658237791462383400.sql b/data/sql/updates/pending_db_world/rev_1658237791462383400.sql new file mode 100644 index 000000000..2081b131a --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1658237791462383400.sql @@ -0,0 +1,86 @@ +-- +UPDATE `creature_template` SET `ScriptName`='npc_wintergarde_gryphon' WHERE `entry`=27258; + +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 48397) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 30) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 188679) AND (`ConditionValue2` = 15) AND (`ConditionValue3` = 0); +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 48363) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 29) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 27315) AND (`ConditionValue2` = 5) AND (`ConditionValue3` = 0); +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 48363) AND (`SourceId` = 0) AND (`ElseGroup` = 1) AND (`ConditionTypeOrReference` = 29) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 27336) AND (`ConditionValue2` = 5) AND (`ConditionValue3` = 0); +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 48397) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 29) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 27315) AND (`ConditionValue2` = 5) AND (`ConditionValue3` = 0); +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 48397) AND (`SourceId` = 0) AND (`ElseGroup` = 1) AND (`ConditionTypeOrReference` = 29) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 27336) AND (`ConditionValue2` = 5) AND (`ConditionValue3` = 0); + +-- fly speed 200% +UPDATE `creature_template_addon` SET `bytes1` = 50331648, `auras` = '60534' WHERE (`entry` = 27258); + +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_q12237_rescue_villager'; +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_q12237_drop_off_villager'; +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_call_wintergarde_gryphon'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(48363, 'spell_q12237_rescue_villager'), +(48397, 'spell_q12237_drop_off_villager'), +(48388, 'spell_call_wintergarde_gryphon'); + +DELETE FROM `creature_text` WHERE `creatureid` IN (27336,27315); +INSERT INTO `creature_text` (`creatureid`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`broadcasttextid`,`textrange`,`comment`) VALUES +(27336,0,0,"HELP! HELP!",12,0,100,0,0,0,26342,0, "Helpless Wintergarde Villager"), +(27336,0,1,"I'll die before I let one of you fiends turn me!",12,0,100,0,0,0,26347,0, "Helpless Wintergarde Villager"), +(27336,0,2,"THEY'RE TRYING TO KILL ME! HELP!",12,0,100,0,0,0,26346,0, "Helpless Wintergarde Villager"), +(27336,0,3,"Where did this all come from! Somebody help!",12,0,100,0,0,0,26348,0, "Helpless Wintergarde Villager"), +(27336,0,4,"YOU'LL NEVER CATCH ME, FIENDS!",12,0,100,0,0,0,26343,0, "Helpless Wintergarde Villager"), +(27336,1,0,"Are you sure you know how to fly this thing? Feels a little wobbly.",12,0,100,0,0,0,26359,0, "Helpless Wintergarde Villager"), +(27336,1,1,"For the love of the Light, get me out of here!",12,0,100,0,0,0,26344,0, "Helpless Wintergarde Villager"), +(27336,1,2,"I don't mean to sound ungrateful, but could you fly a little closer to the ground? I hate heights!",12,0,100,0,0,0,26360,0, "Helpless Wintergarde Villager"), +(27336,1,3,"I picked a bad day to stop drinking!",12,0,100,0,0,0,26345,0, "Helpless Wintergarde Villager"), +(27336,1,4,"I'm gettin' a little woozy... Oooooof...",12,0,100,0,0,0,26364,0, "Helpless Wintergarde Villager"), +(27336,1,5,"Who woulda thought that we'd have this problem again? Oh wait, EVERYBODY DID!",12,0,100,0,0,0,26349,0, "Helpless Wintergarde Villager"), +(27336,2,0,"How can I ever repay you for this, friend?",12,0,100,0,0,0,26363,0, "Helpless Wintergarde Villager"), +(27336,2,1,"HURRAY!",12,0,100,0,0,0,26382,0, "Helpless Wintergarde Villager"), +(27336,2,2,"Kindness is not lost with this one, Urik. Thank you, hero!",12,0,100,0,0,0,26383,0, "Helpless Wintergarde Villager"), +(27336,2,3,"My shop's doors will always be open to you, friend.",12,0,100,0,0,0,26385,0, "Helpless Wintergarde Villager"), +(27336,2,4,"Safe at last! Thank you, stranger!",12,0,100,0,0,0,26381,0, "Helpless Wintergarde Villager"), +(27336,2,5,"Thanks for your help, hero!",12,0,100,0,0,0,26357,0, "Helpless Wintergarde Villager"), +(27336,2,6,"We made it! We actually made it!",12,0,100,0,0,0,26384,0, "Helpless Wintergarde Villager"), +(27336,2,7,"You are my guardian angel! Like a white knight you flew in from the heavens and lifted me from the pit of damnation!",12,0,100,0,0,0,26362,0, "Helpless Wintergarde Villager"), +(27336,2,8,"You saved my life! Thanks!",12,0,100,0,0,0,26358,0, "Helpless Wintergarde Villager"), +(27315,0,0,"HELP! HELP!",12,0,100,0,0,0,26342,0, "Helpless Wintergarde Villager"), +(27315,0,1,"I'll die before I let one of you fiends turn me!",12,0,100,0,0,0,26347,0, "Helpless Wintergarde Villager"), +(27315,0,2,"THEY'RE TRYING TO KILL ME! HELP!",12,0,100,0,0,0,26346,0, "Helpless Wintergarde Villager"), +(27315,0,3,"Where did this all come from! Somebody help!",12,0,100,0,0,0,26348,0, "Helpless Wintergarde Villager"), +(27315,0,4,"YOU'LL NEVER CATCH ME, FIENDS!",12,0,100,0,0,0,26343,0, "Helpless Wintergarde Villager"), +(27315,1,0,"Are you sure you know how to fly this thing? Feels a little wobbly.",12,0,100,0,0,0,26359,0, "Helpless Wintergarde Villager"), +(27315,1,1,"For the love of the Light, get me out of here!",12,0,100,0,0,0,26344,0, "Helpless Wintergarde Villager"), +(27315,1,2,"I don't mean to sound ungrateful, but could you fly a little closer to the ground? I hate heights!",12,0,100,0,0,0,26360,0, "Helpless Wintergarde Villager"), +(27315,1,3,"I picked a bad day to stop drinking!",12,0,100,0,0,0,26345,0, "Helpless Wintergarde Villager"), +(27315,1,4,"I'm gettin' a little woozy... Oooooof...",12,0,100,0,0,0,26364,0, "Helpless Wintergarde Villager"), +(27315,1,5,"Who woulda thought that we'd have this problem again? Oh wait, EVERYBODY DID!",12,0,100,0,0,0,26349,0, "Helpless Wintergarde Villager"), +(27315,2,0,"How can I ever repay you for this, friend?",12,0,100,0,0,0,26363,0, "Helpless Wintergarde Villager"), +(27315,2,1,"HURRAY!",12,0,100,0,0,0,26382,0, "Helpless Wintergarde Villager"), +(27315,2,2,"Kindness is not lost with this one, Urik. Thank you, hero!",12,0,100,0,0,0,26383,0, "Helpless Wintergarde Villager"), +(27315,2,3,"My shop's doors will always be open to you, friend.",12,0,100,0,0,0,26385,0, "Helpless Wintergarde Villager"), +(27315,2,4,"Safe at last! Thank you, stranger!",12,0,100,0,0,0,26381,0, "Helpless Wintergarde Villager"), +(27315,2,5,"Thanks for your help, hero!",12,0,100,0,0,0,26357,0, "Helpless Wintergarde Villager"), +(27315,2,6,"We made it! We actually made it!",12,0,100,0,0,0,26384,0, "Helpless Wintergarde Villager"), +(27315,2,7,"You are my guardian angel! Like a white knight you flew in from the heavens and lifted me from the pit of damnation!",12,0,100,0,0,0,26362,0, "Helpless Wintergarde Villager"), +(27315,2,8,"You saved my life! Thanks!",12,0,100,0,0,0,26358,0, "Helpless Wintergarde Villager"); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27315; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27315); +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 +(27315, 0, 0, 1, 8, 0, 100, 512, 48363, 0, 0, 0, 0, 28, 49774, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Helpless Wintergarde Villager - On Spellhit \'Rescue Villager\' - Remove Aura \'Cower + Fear Visual\''), +(27315, 0, 1, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Helpless Wintergarde Villager - On Spellhit \'Rescue Villager\' - Set Event Phase 2'), +(27315, 0, 2, 0, 1, 2, 100, 1, 18000, 18000, 18000, 18000, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Helpless Wintergarde Villager - Out of Combat - Say Line 1 (Phase 2) (No Repeat)'), +(27315, 0, 3, 0, 23, 2, 100, 1, 43671, 0, 1000, 1000, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Helpless Wintergarde Villager - On Aura \'Ride Vehicle\' - Say Line 2 (Phase 2) (No Repeat)'), +(27315, 0, 4, 0, 60, 0, 100, 1, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Helpless Wintergarde Villager - On Update - Set Event Phase 1 (No Repeat)'), +(27315, 0, 5, 0, 1, 1, 100, 0, 30000, 45000, 50000, 50000, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Helpless Wintergarde Villager - Out of Combat - Say Line 0 (Phase 1)'), +(27315, 0, 6, 0, 1, 1, 100, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Helpless Wintergarde Villager - Out of Combat - Set Reactstate Passive (Phase 1)'); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27336; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27336); +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 +(27336, 0, 0, 1, 8, 0, 100, 512, 48363, 0, 0, 0, 0, 28, 49774, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Helpless Wintergarde Villager - On Spellhit \'Rescue Villager\' - Remove Aura \'Cower + Fear Visual\''), +(27336, 0, 1, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Helpless Wintergarde Villager - On Spellhit \'Rescue Villager\' - Set Event Phase 2'), +(27336, 0, 2, 0, 1, 2, 100, 1, 18000, 18000, 18000, 18000, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Helpless Wintergarde Villager - Out of Combat - Say Line 1 (Phase 2) (No Repeat)'), +(27336, 0, 3, 0, 23, 2, 100, 1, 43671, 0, 1000, 1000, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Helpless Wintergarde Villager - On Aura \'Ride Vehicle\' - Say Line 2 (Phase 2) (No Repeat)'), +(27336, 0, 4, 0, 60, 0, 100, 1, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Helpless Wintergarde Villager - On Update - Set Event Phase 1 (No Repeat)'), +(27336, 0, 5, 0, 1, 1, 100, 0, 30000, 45000, 50000, 50000, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Helpless Wintergarde Villager - Out of Combat - Say Line 0 (Phase 1)'), +(27336, 0, 6, 0, 1, 1, 100, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Helpless Wintergarde Villager - Out of Combat - Set Reactstate Passive (Phase 1)'); diff --git a/src/server/scripts/Northrend/zone_dragonblight.cpp b/src/server/scripts/Northrend/zone_dragonblight.cpp index 4aed88845..a8aff815f 100644 --- a/src/server/scripts/Northrend/zone_dragonblight.cpp +++ b/src/server/scripts/Northrend/zone_dragonblight.cpp @@ -633,6 +633,264 @@ public: }; }; +enum WintergardeGryphon +{ + SPELL_RESCUE_VILLAGER = 48363, + SPELL_DROP_OFF_VILLAGER = 48397, + SPELL_RIDE_VEHICLE = 43671, + + NPC_HELPLESS_VILLAGER_A = 27315, + NPC_HELPLESS_VILLAGER_B = 27336, + + EVENT_VEHICLE_GET = 1, + EVENT_TAKE_OFF = 2, + EVENT_GET_VILLAGER = 3, + + EVENT_PHASE_FEAR = 1, + EVENT_PHASE_VEHICLE = 2, + + POINT_LAND = 1, + POINT_TAKE_OFF = 2, + + QUEST_FLIGHT_OF_THE_WINTERGARDE_DEFENDER = 12237, + GO_TEMP_GRYPHON_STATION = 188679, + AREA_WINTERGARDE_KEEP = 4177 +}; + +class npc_wintergarde_gryphon : public VehicleAI +{ +public: + npc_wintergarde_gryphon(Creature* creature) : VehicleAI(creature) + { + creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void JustDied(Unit* /*killer*/) override + { + me->DespawnOrUnsummon(3s, 0s); + } + + void IsSummonedBy(Unit* summoner) override + { + me->SetFacingToObject(summoner); + Position pos = summoner->GetPosition(); + me->GetMotionMaster()->MovePoint(POINT_LAND, pos); + } + + void MovementInform(uint32 type, uint32 id) override + { + if (type == POINT_MOTION_TYPE && id == POINT_LAND) + events.ScheduleEvent(EVENT_VEHICLE_GET, 0s); + } + + void PassengerBoarded(Unit* passenger, int8 seatId, bool apply) override + { + if (!apply && seatId == 0) + { + // left the vehicle with a passenger will result in despawn + if (Vehicle* gryphon = me->GetVehicleKit()) + if (Unit* villager = gryphon->GetPassenger(1)) + { + if (villager->GetTypeId() != TYPEID_UNIT) + return; + + if (Creature* seat = villager->ToCreature()) + { + seat->ExitVehicle(); + seat->DespawnOrUnsummon(); + } + } + + me->RemoveVehicleKit(); // not Crash (; + events.ScheduleEvent(EVENT_TAKE_OFF, 2s); + me->CastSpell(passenger, VEHICLE_SPELL_PARACHUTE, true); + } + } + + Creature* getVillager() { return ObjectAccessor::GetCreature(*me, villagerGUID); } + + void UpdateAI(uint32 diff) override + { + events.Update(diff); + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_VEHICLE_GET: + { + me->SetDisableGravity(false); + me->SetHover(false); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + break; + } + case EVENT_TAKE_OFF: + { + me->DespawnOrUnsummon(4050); + me->SetOrientation(2.5f); + me->SetSpeedRate(MOVE_FLIGHT, 1.0f); + Position pos = me->GetPosition(); + Position offset = { 14.0f, 14.0f, 16.0f, 0.0f }; + pos.RelocateOffset(offset); + me->GetMotionMaster()->MovePoint(POINT_TAKE_OFF, pos); + break; + } + case EVENT_GET_VILLAGER: + { + if (getVillager()) + { + getVillager()->GetMotionMaster()->MovePoint(0, 3660.0f, -706.4f, 215.0f); + getVillager()->DespawnOrUnsummon(7s, 0s); + } + break; + } + } + } + } + + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override + { + if (spell->Id != SPELL_DROP_OFF_VILLAGER) + return; + + if (Vehicle* gryphon = me->GetVehicleKit()) + if (Unit* villager = gryphon->GetPassenger(1)) + { + villager->ExitVehicle(); + villager->GetMotionMaster()->Clear(false); + villager->GetMotionMaster()->MoveIdle(); + villager->SetCanFly(false); // prevents movement in flight + villagerGUID = villager->GetGUID(); + villager->HandleEmoteCommand(EMOTE_ONESHOT_CHEER); + events.ScheduleEvent(EVENT_GET_VILLAGER, 3s); + } + } +private: + ObjectGuid villagerGUID; +}; + +class spell_q12237_rescue_villager : public SpellScript +{ + PrepareSpellScript(spell_q12237_rescue_villager); + + SpellCastResult CheckCast() + { + Player* owner = GetCaster()->GetCharmerOrOwnerPlayerOrPlayerItself(); + + if (!owner) + return SPELL_FAILED_DONT_REPORT; + + SpellCustomErrors extension = SPELL_CUSTOM_ERROR_NONE; + SpellCastResult result = SPELL_CAST_OK; + + if (GetCaster()->GetAreaId() == AREA_WINTERGARDE_KEEP) + { + extension = SPELL_CUSTOM_ERROR_MUST_BE_NEAR_HELPLESS_VILLAGER; + result = SPELL_FAILED_CUSTOM_ERROR; + } + + if (!GetCaster()->FindNearestCreature(NPC_HELPLESS_VILLAGER_A, 5.0f) && !GetCaster()->FindNearestCreature(NPC_HELPLESS_VILLAGER_B, 5.0f)) + { + extension = SPELL_CUSTOM_ERROR_MUST_BE_NEAR_HELPLESS_VILLAGER; + result = SPELL_FAILED_CUSTOM_ERROR; + } + + if (GetCaster()->FindNearestGameObject(GO_TEMP_GRYPHON_STATION, 15.0f)) + { + extension = SPELL_CUSTOM_ERROR_NEED_HELPLESS_VILLAGER; + result = SPELL_FAILED_CUSTOM_ERROR; + } + + if (GetCaster()->HasAura(SPELL_RIDE_VEHICLE)) + result = SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW; + + if (result != SPELL_CAST_OK) + { + Spell::SendCastResult(owner, GetSpellInfo(), 0, result, extension); + return result; + } + + return SPELL_CAST_OK; + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + if (Unit* target = GetHitUnit()) + target->CastSpell(GetCaster(), uint32(GetEffectValue()), true); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_q12237_rescue_villager::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + OnCheckCast += SpellCheckCastFn(spell_q12237_rescue_villager::CheckCast); + } +}; + +class spell_q12237_drop_off_villager : public SpellScript +{ + PrepareSpellScript(spell_q12237_drop_off_villager); + + SpellCastResult CheckCast() + { + Player* master = GetCaster()->GetCharmerOrOwnerPlayerOrPlayerItself(); + + if (!master) + return SPELL_FAILED_DONT_REPORT; + + SpellCustomErrors extension = SPELL_CUSTOM_ERROR_NONE; + SpellCastResult result = SPELL_CAST_OK; + + if (!GetCaster()->FindNearestGameObject(GO_TEMP_GRYPHON_STATION, 10.0f)) + result = SPELL_FAILED_REQUIRES_SPELL_FOCUS; + + if (!GetCaster()->HasAura(SPELL_RIDE_VEHICLE)) + { + extension = SPELL_CUSTOM_ERROR_NO_PASSENGER; + result = SPELL_FAILED_CUSTOM_ERROR; + } + + if (result != SPELL_CAST_OK) + { + Spell::SendCastResult(master, GetSpellInfo(), 0, result, extension); + return result; + } + + return SPELL_CAST_OK; + } + + void Register() override + { + OnCheckCast += SpellCheckCastFn(spell_q12237_drop_off_villager::CheckCast); + } +}; + +class spell_call_wintergarde_gryphon : public SpellScript +{ + PrepareSpellScript(spell_call_wintergarde_gryphon); + + void SetDest(SpellDestination& dest) + { + // Adjust effect summon position + Position const offset = { 0.0f, 0.0f, 9.0f, 0.0f }; + dest.RelocateOffset(offset); + } + + SpellCastResult CheckRequirement() + { + if (Player* playerCaster = GetCaster()->ToPlayer()) + { + if (playerCaster->GetQuestStatus(QUEST_FLIGHT_OF_THE_WINTERGARDE_DEFENDER) == QUEST_STATUS_INCOMPLETE) + return SPELL_CAST_OK; + } + return SPELL_FAILED_DONT_REPORT; + } + + void Register() override + { + OnCheckCast += SpellCheckCastFn(spell_call_wintergarde_gryphon::CheckRequirement); + OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_call_wintergarde_gryphon::SetDest, EFFECT_0, TARGET_DEST_CASTER_FRONT); + } +}; + class npc_heated_battle : public CreatureScript { public: @@ -2009,6 +2267,10 @@ void AddSC_dragonblight() new npc_future_you(); new npc_mindless_ghoul(); new npc_injured_7th_legion_soldier(); + RegisterCreatureAI(npc_wintergarde_gryphon); + RegisterSpellScript(spell_q12237_rescue_villager); + RegisterSpellScript(spell_q12237_drop_off_villager); + RegisterSpellScript(spell_call_wintergarde_gryphon); new npc_heated_battle(); new spell_q12478_frostmourne_cavern(); new spell_q12243_fire_upon_the_waters(); From 0a9ff22a860503460287bb839d0e31d8ee923230 Mon Sep 17 00:00:00 2001 From: neifion-00000000 <91289495+neifion-00000000@users.noreply.github.com> Date: Sat, 27 Aug 2022 07:52:29 -0500 Subject: [PATCH 17/37] fix(DB/Creature): ZG Snake Area Unpooled Fixes (#12540) --- .../rev_1658802255073427200.sql | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1658802255073427200.sql diff --git a/data/sql/updates/pending_db_world/rev_1658802255073427200.sql b/data/sql/updates/pending_db_world/rev_1658802255073427200.sql new file mode 100644 index 000000000..7b2836e90 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1658802255073427200.sql @@ -0,0 +1,20 @@ +-- +-- Cleanup on creatures that don't exist +DELETE FROM `creature` WHERE `guid` IN (200616); +DELETE FROM `creature_addon` WHERE `guid` IN (200616); +DELETE FROM `waypoint_data` WHERE `id` IN (2006160); + +-- UPDATE id2 on Axe Thrower / Priest spawn +UPDATE `creature` SET `id2`=11350 WHERE `guid`=49105; + +-- Snakes that can be set both ways +UPDATE `creature` SET `id1`=11371 WHERE `guid` IN (49101, 49098, 49100, 49099, 51451, 51452); +UPDATE `creature` SET `id2`=11372 WHERE `guid` IN (49101, 49098, 49100, 49099, 51451, 51452); + +DELETE FROM `creature_formations` where `leaderGUID`=49101; +-- Link the snakes so they agro together, this should ensure the entire 7 pack agros together while also allowing pooling for the trolls +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES +(49101, 49101, 0, 0, 3, 0, 0), +(49101, 49098, 0, 0, 3, 0, 0), +(49101, 49100, 0, 0, 3, 0, 0), +(49101, 49099, 0, 0, 3, 0, 0); From 9a2e3fdbe6c53ad04e0ba425f17a08c25d9cc8e3 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sat, 27 Aug 2022 12:54:48 +0000 Subject: [PATCH 18/37] chore(DB): import pending files Referenced commit(s): 0a9ff22a860503460287bb839d0e31d8ee923230 --- .../rev_1658237791462383400.sql => db_world/2022_08_27_03.sql} | 1 + .../rev_1658802255073427200.sql => db_world/2022_08_27_04.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1658237791462383400.sql => db_world/2022_08_27_03.sql} (99%) rename data/sql/updates/{pending_db_world/rev_1658802255073427200.sql => db_world/2022_08_27_04.sql} (95%) diff --git a/data/sql/updates/pending_db_world/rev_1658237791462383400.sql b/data/sql/updates/db_world/2022_08_27_03.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1658237791462383400.sql rename to data/sql/updates/db_world/2022_08_27_03.sql index 2081b131a..f91ae87aa 100644 --- a/data/sql/updates/pending_db_world/rev_1658237791462383400.sql +++ b/data/sql/updates/db_world/2022_08_27_03.sql @@ -1,3 +1,4 @@ +-- DB update 2022_08_27_02 -> 2022_08_27_03 -- UPDATE `creature_template` SET `ScriptName`='npc_wintergarde_gryphon' WHERE `entry`=27258; diff --git a/data/sql/updates/pending_db_world/rev_1658802255073427200.sql b/data/sql/updates/db_world/2022_08_27_04.sql similarity index 95% rename from data/sql/updates/pending_db_world/rev_1658802255073427200.sql rename to data/sql/updates/db_world/2022_08_27_04.sql index 7b2836e90..fa4d8bb0a 100644 --- a/data/sql/updates/pending_db_world/rev_1658802255073427200.sql +++ b/data/sql/updates/db_world/2022_08_27_04.sql @@ -1,3 +1,4 @@ +-- DB update 2022_08_27_03 -> 2022_08_27_04 -- -- Cleanup on creatures that don't exist DELETE FROM `creature` WHERE `guid` IN (200616); From 8439ce9920933acc4eb5ad46845e96b29def0502 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sat, 27 Aug 2022 18:23:50 +0200 Subject: [PATCH 19/37] fix(Core/Spells): Feed Pet should not interrupt eating/drinking. (#12817) Fixes #12634 --- 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 e646a9774..e6e57cf68 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4367,6 +4367,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->AttributesEx3 |= SPELL_ATTR3_SUPRESS_TARGET_PROCS; }); + // Feed Pet + ApplySpellFix({ 1539, 51284 }, [](SpellInfo* spellInfo) + { + spellInfo->Attributes |= SPELL_ATTR0_ALLOW_WHILE_SITTING; + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; From 8b9b7e633c0b4b98ec2519c6dd1785dcc4eaf2dd Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sat, 27 Aug 2022 19:07:53 +0200 Subject: [PATCH 20/37] =?UTF-8?q?fix(Core/Battelgrounds):=20Fixed=20regist?= =?UTF-8?q?ering=20newly=20created=20battleground=E2=80=A6=20(#12869)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/Battelgrounds): Fixed registering newly created battleground groups in global container. Fixes #5261 --- src/server/game/Battlegrounds/Battleground.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 1fb81dec7..e38057f43 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -32,7 +32,7 @@ #include "Formulas.h" #include "GameGraveyard.h" #include "GridNotifiersImpl.h" -#include "Group.h" +#include "GroupMgr.h" #include "MapMgr.h" #include "MiscPackets.h" #include "Object.h" @@ -1151,6 +1151,7 @@ void Battleground::AddOrSetPlayerToCorrectBgGroup(Player* player, TeamId teamId) group = new Group; SetBgRaid(teamId, group); group->Create(player); + sGroupMgr->AddGroup(group); } else if (group->IsMember(playerGuid)) { From 674382ca6ab290573bd05c22d3a1a8467f0c2be7 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sat, 27 Aug 2022 19:29:19 +0200 Subject: [PATCH 21/37] fix(DB/TempleOfAhnQiraj): Added missing spawns of Cthun Graps. (#12806) * fix(DB/Temple of AhnQiraj): Added missing spawns of Cthun Graps. Fixes #12800 * Update. * Update. --- .../rev_1660996114567482800.sql | 6 +++ .../Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp | 16 -------- .../instance_temple_of_ahnqiraj.cpp | 37 +++++++++++++++++++ .../TempleOfAhnQiraj/temple_of_ahnqiraj.h | 20 +++++++++- 4 files changed, 62 insertions(+), 17 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1660996114567482800.sql diff --git a/data/sql/updates/pending_db_world/rev_1660996114567482800.sql b/data/sql/updates/pending_db_world/rev_1660996114567482800.sql new file mode 100644 index 000000000..cf7097a16 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1660996114567482800.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `gameobject` WHERE `id`=180745 and `guid` IN (6660,6663,6665); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(6660,180745,531,0,0,1,1,-8660.63,2022.4,108.577,3.64774,0,0,-0.968147,0.250381,7200,255,1), +(6663,180745,531,0,0,1,1,-8652.2,2020.92,108.577,0.244346,0,0,0.121869,0.992546,7200,255,1), +(6665,180745,531,0,0,1,1,-8663.34,2029.9,108.577,4.45059,0,0,-0.793353,0.608762,7200,255,1); diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp index b9dd0cbff..3b72c1ea3 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp @@ -28,22 +28,6 @@ EndScriptData */ #include "TaskScheduler.h" #include "temple_of_ahnqiraj.h" -enum Phases -{ - PHASE_NOT_STARTED = 0, - - // Main Phase 1 - EYE - PHASE_EYE_GREEN_BEAM = 1, - PHASE_EYE_RED_BEAM = 2, - - // Main Phase 2 - CTHUN - PHASE_CTHUN_TRANSITION = 3, - PHASE_CTHUN_STOMACH = 4, - PHASE_CTHUN_WEAK = 5, - - PHASE_CTHUN_DONE = 6, -}; - enum Spells { // ***** Main Phase 1 ******** diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp index 5c989a169..38097a791 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp @@ -56,6 +56,8 @@ public: ObjectGuid VeklorGUID; ObjectGuid VeknilashGUID; ObjectGuid ViscidusGUID; + ObjectGuid CThunGUID; + GuidVector CThunGraspGUIDs; std::array doorGUIDs; uint32 BugTrioDeathCount; @@ -107,6 +109,21 @@ public: if (GetBossState(DATA_OURO) != DONE) creature->Respawn(); break; + case NPC_CTHUN: + CThunGUID = creature->GetGUID(); + if (!creature->IsAlive()) + { + for (ObjectGuid const& guid : CThunGraspGUIDs) + { + if (GameObject* cthunGrasp = instance->GetGameObject(guid)) + { + cthunGrasp->DespawnOrUnsummon(1s); + } + } + } + break; + default: + break; } InstanceScript::OnCreatureCreate(creature); @@ -139,6 +156,16 @@ public: } } break; + case GO_CTHUN_GRASP: + CThunGraspGUIDs.push_back(go->GetGUID()); + if (Creature* CThun = instance->GetCreature(CThunGUID)) + { + if (!CThun->IsAlive()) + { + go->DespawnOrUnsummon(1s); + } + } + break; default: break; } @@ -215,6 +242,16 @@ public: break; case DATA_CTHUN_PHASE: CthunPhase = data; + if (data == PHASE_CTHUN_DONE) + { + for (ObjectGuid const& guid : CThunGraspGUIDs) + { + if (GameObject* cthunGrasp = instance->GetGameObject(guid)) + { + cthunGrasp->DespawnOrUnsummon(1s); + } + } + } break; } } diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h index c81b09033..e5d2ed286 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h @@ -53,6 +53,7 @@ enum DataTypes enum Creatures { + NPC_CTHUN = 15727, NPC_EYE_OF_CTHUN = 15589, NPC_CTHUN_PORTAL = 15896, NPC_CLAW_TENTACLE = 15725, @@ -83,7 +84,24 @@ enum ObjectsAQ40 { AQ40_DOOR_1 = 180634, AQ40_DOOR_2 = 180635, - AQ40_DOOR_3 = 180636 + AQ40_DOOR_3 = 180636, + GO_CTHUN_GRASP = 180745 +}; + +enum CThunPhases +{ + PHASE_NOT_STARTED = 0, + + // Main Phase 1 - EYE + PHASE_EYE_GREEN_BEAM = 1, + PHASE_EYE_RED_BEAM = 2, + + // Main Phase 2 - CTHUN + PHASE_CTHUN_TRANSITION = 3, + PHASE_CTHUN_STOMACH = 4, + PHASE_CTHUN_WEAK = 5, + + PHASE_CTHUN_DONE = 6 }; template From d8b59bb6e817d80512a22dc65bda0401343282aa Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sat, 27 Aug 2022 17:31:32 +0000 Subject: [PATCH 22/37] chore(DB): import pending files Referenced commit(s): 674382ca6ab290573bd05c22d3a1a8467f0c2be7 --- .../rev_1660996114567482800.sql => db_world/2022_08_27_05.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1660996114567482800.sql => db_world/2022_08_27_05.sql} (93%) diff --git a/data/sql/updates/pending_db_world/rev_1660996114567482800.sql b/data/sql/updates/db_world/2022_08_27_05.sql similarity index 93% rename from data/sql/updates/pending_db_world/rev_1660996114567482800.sql rename to data/sql/updates/db_world/2022_08_27_05.sql index cf7097a16..f9f8879d2 100644 --- a/data/sql/updates/pending_db_world/rev_1660996114567482800.sql +++ b/data/sql/updates/db_world/2022_08_27_05.sql @@ -1,3 +1,4 @@ +-- DB update 2022_08_27_04 -> 2022_08_27_05 -- DELETE FROM `gameobject` WHERE `id`=180745 and `guid` IN (6660,6663,6665); INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES From 2de08a8719e668d15a7ad0e31aa5c8be303df75e Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 27 Aug 2022 20:01:48 -0300 Subject: [PATCH 23/37] fix(Scripts/RuinsOfAhnQiraj): Restructure Ayamiss task scheduling during landing (#12870) * fix(Scripts/RuinsOfAhnQiraj): Restructure Ayamiss * Update boss_ayamiss.cpp --- .../Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp index 752af287f..0e1c3c4f1 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp @@ -126,6 +126,15 @@ struct boss_ayamiss : public BossAI } }, 1s); + + _scheduler.Schedule(5s, 8s, [this](TaskContext context) { + DoCastVictim(SPELL_LASH); + context.Repeat(8s, 15s); + }).Schedule(16s, [this](TaskContext context) + { + DoCastSelf(SPELL_THRASH); + context.Repeat(); + }); } } @@ -210,17 +219,6 @@ struct boss_ayamiss : public BossAI me->SetDisableGravity(false); me->GetMotionMaster()->MovePath(me->GetEntry() * 10, false); DoResetThreat(); - - _scheduler.Schedule(5s, 8s, [this](TaskContext context) { - DoCastVictim(SPELL_LASH); - context.Repeat(8s, 15s); - }).Schedule(16s, [this](TaskContext context) - { - DoCastSelf(SPELL_THRASH); - context.Repeat(); - }); - - _scheduler.DelayAll(5s); _scheduler.CancelGroup(PHASE_AIR); } @@ -271,6 +269,7 @@ struct npc_hive_zara_larva : public ScriptedAI if (Creature* ayamiss = _instance->GetCreature(DATA_AYAMISS)) { ayamiss->AI()->JustSummoned(summon); + summon->SetInCombatWithZone(); } } From 82894ba2ad04c0c1b6beed897adbe8a679a0a2b9 Mon Sep 17 00:00:00 2001 From: Eddy Vega <61223313+Si1ker@users.noreply.github.com> Date: Sat, 27 Aug 2022 17:04:28 -0600 Subject: [PATCH 24/37] fix(DB/Creature): Remove incorrect drops for Idol of Brutality (#12769) --- data/sql/updates/pending_db_world/rev_1660710379331178100.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1660710379331178100.sql diff --git a/data/sql/updates/pending_db_world/rev_1660710379331178100.sql b/data/sql/updates/pending_db_world/rev_1660710379331178100.sql new file mode 100644 index 000000000..d7c0359c3 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1660710379331178100.sql @@ -0,0 +1,4 @@ +-- + +DELETE FROM `creature_loot_template` WHERE item =23198 AND entry !=10435; -- Magistrate Barthilas + From 6fb0c1b27e79d21b1f540f3799dcf4f164d97f07 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sat, 27 Aug 2022 23:06:27 +0000 Subject: [PATCH 25/37] chore(DB): import pending files Referenced commit(s): 82894ba2ad04c0c1b6beed897adbe8a679a0a2b9 --- .../rev_1660710379331178100.sql => db_world/2022_08_27_06.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1660710379331178100.sql => db_world/2022_08_27_06.sql} (70%) diff --git a/data/sql/updates/pending_db_world/rev_1660710379331178100.sql b/data/sql/updates/db_world/2022_08_27_06.sql similarity index 70% rename from data/sql/updates/pending_db_world/rev_1660710379331178100.sql rename to data/sql/updates/db_world/2022_08_27_06.sql index d7c0359c3..0dbbcaa15 100644 --- a/data/sql/updates/pending_db_world/rev_1660710379331178100.sql +++ b/data/sql/updates/db_world/2022_08_27_06.sql @@ -1,3 +1,4 @@ +-- DB update 2022_08_27_05 -> 2022_08_27_06 -- DELETE FROM `creature_loot_template` WHERE item =23198 AND entry !=10435; -- Magistrate Barthilas From b74df7734302ee666f4d6a044cfb7fe05f0b9a5b Mon Sep 17 00:00:00 2001 From: Eddy Vega <61223313+Si1ker@users.noreply.github.com> Date: Sat, 27 Aug 2022 17:08:09 -0600 Subject: [PATCH 26/37] fix(DB/Loot): Remove all Punctured Voodoo Dolls from mobs (#12768) --- .../rev_1660709375823590700.sql | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1660709375823590700.sql diff --git a/data/sql/updates/pending_db_world/rev_1660709375823590700.sql b/data/sql/updates/pending_db_world/rev_1660709375823590700.sql new file mode 100644 index 000000000..a5722d766 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1660709375823590700.sql @@ -0,0 +1,17 @@ +-- + +DELETE FROM `creature_loot_template` WHERE `item` IN (19813,19814,19815,19816,19817,19818,19819,19820,19821); + +UPDATE `creature_template` SET `lootid`=0 WHERE `entry` IN ( +15146, -- Mad Voidwalker +15117, -- Chained Spirit +15112, -- Brain Wash Totem +15041, -- Spawn of Mar'li +14988, -- Ohgan +14987, -- Powerful Healing Ward +14986, -- Shade of Jin'do +14965, -- Frenzied Bloodseeker Bat +14826, -- Sacrificed Troll +14122, -- Massive Geyser +11347); -- Zealot Lor'Khan + From 6d0b9b87e6ee7a564551a54ba207430f38543c1c Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sat, 27 Aug 2022 23:10:10 +0000 Subject: [PATCH 27/37] chore(DB): import pending files Referenced commit(s): b74df7734302ee666f4d6a044cfb7fe05f0b9a5b --- .../rev_1660709375823590700.sql => db_world/2022_08_27_07.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1660709375823590700.sql => db_world/2022_08_27_07.sql} (91%) diff --git a/data/sql/updates/pending_db_world/rev_1660709375823590700.sql b/data/sql/updates/db_world/2022_08_27_07.sql similarity index 91% rename from data/sql/updates/pending_db_world/rev_1660709375823590700.sql rename to data/sql/updates/db_world/2022_08_27_07.sql index a5722d766..0d96fe914 100644 --- a/data/sql/updates/pending_db_world/rev_1660709375823590700.sql +++ b/data/sql/updates/db_world/2022_08_27_07.sql @@ -1,3 +1,4 @@ +-- DB update 2022_08_27_06 -> 2022_08_27_07 -- DELETE FROM `creature_loot_template` WHERE `item` IN (19813,19814,19815,19816,19817,19818,19819,19820,19821); From a29926d52fc31ffa215ac030b0ad540ee4896607 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 28 Aug 2022 01:11:33 +0200 Subject: [PATCH 28/37] =?UTF-8?q?fix(Core/Spells):=20Fixed=20Rejuvenation?= =?UTF-8?q?=20healing=20amount=20increased=20by=20Idol=E2=80=A6=20(#12812)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... of Rejuvenation and Harold's Rejuvenating Broach. --- 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 169f5ded8..da48a89ba 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -12045,6 +12045,8 @@ uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, ui { case 4415: // Increased Rejuvenation Healing case 4953: + DoneTotal += (*i)->GetAmount() / 5; // 5 ticks of Rejuvenation + break; case 3736: // Hateful Totem of the Third Wind / Increased Lesser Healing Wave / LK Arena (4/5/6) Totem of the Third Wind / Savage Totem of the Third Wind DoneTotal += (*i)->GetAmount(); break; From db760ee2ed09df6db15e918aaa5af698577df912 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 28 Aug 2022 01:14:46 +0200 Subject: [PATCH 29/37] =?UTF-8?q?fix(Core/Spells):=20Nature's=20Swiftness?= =?UTF-8?q?=20should=20not=20be=20consumed=20by=20instan=E2=80=A6=20(#1281?= =?UTF-8?q?6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...t spells. --- src/server/game/Entities/Unit/Unit.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index da48a89ba..12e2fc904 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -16128,9 +16128,13 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u { if (SpellModifier* mod = triggeredByAura->GetSpellModifier()) { - if (mod->op == SPELLMOD_CASTING_TIME && procSpell && (procSpell->GetTriggeredCastFlags() & TRIGGERED_CAST_DIRECTLY) != 0) + if (mod->op == SPELLMOD_CASTING_TIME && mod->value < 0 && procSpell) { - break; + // Skip instant spells + if (procSpellInfo->CalcCastTime() <= 0 || (procSpell->GetTriggeredCastFlags() & TRIGGERED_CAST_DIRECTLY) != 0) + { + break; + } } } takeCharges = true; From 93ae148a7594c8b6d2e81d5907ff025b62d76c52 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 28 Aug 2022 01:17:26 +0200 Subject: [PATCH 30/37] =?UTF-8?q?fix(Core/TotemAI):=20Active=20totems=20sh?= =?UTF-8?q?ould=20interrupt=20its=20spell=20casting=20i=E2=80=A6=20(#12864?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...f current victim is dead. --- src/server/game/AI/CoreAI/TotemAI.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/server/game/AI/CoreAI/TotemAI.cpp b/src/server/game/AI/CoreAI/TotemAI.cpp index d12232f27..9df6fbb7c 100644 --- a/src/server/game/AI/CoreAI/TotemAI.cpp +++ b/src/server/game/AI/CoreAI/TotemAI.cpp @@ -60,8 +60,23 @@ void TotemAI::UpdateAI(uint32 /*diff*/) if (me->ToTotem()->GetTotemType() != TOTEM_ACTIVE) return; - if (!me->IsAlive() || me->IsNonMeleeSpellCast(false)) + if (!me->IsAlive()) + { return; + } + + if (me->IsNonMeleeSpellCast(false)) + { + if (Unit* victim = ObjectAccessor::GetUnit(*me, i_victimGuid)) + { + if (!victim || !victim->IsAlive()) + { + me->InterruptNonMeleeSpells(false); + } + } + + return; + } // Search spell SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(me->ToTotem()->GetSpell()); From 72f89105c8182d6a4963ada1832ebeebd36554c3 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 28 Aug 2022 01:18:43 +0200 Subject: [PATCH 31/37] =?UTF-8?q?fix(DB/Spells):=20Glyph=20of=20Blocking?= =?UTF-8?q?=20should=20proc=20on=20Shield=20Slam=20use=20rath=E2=80=A6=20(?= =?UTF-8?q?#12865)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...er than on hit. --- data/sql/updates/pending_db_world/rev_1661595588546954500.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1661595588546954500.sql diff --git a/data/sql/updates/pending_db_world/rev_1661595588546954500.sql b/data/sql/updates/pending_db_world/rev_1661595588546954500.sql new file mode 100644 index 000000000..a9727f5d3 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1661595588546954500.sql @@ -0,0 +1,2 @@ +-- +UPDATE `spell_proc_event` SET `procPhase`=1 WHERE `entry`=58375; From 9ae2b93514b16adf78b27543d0947c694bbb2f29 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sat, 27 Aug 2022 23:20:47 +0000 Subject: [PATCH 32/37] chore(DB): import pending files Referenced commit(s): 72f89105c8182d6a4963ada1832ebeebd36554c3 --- .../rev_1661595588546954500.sql => db_world/2022_08_27_08.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1661595588546954500.sql => db_world/2022_08_27_08.sql} (60%) diff --git a/data/sql/updates/pending_db_world/rev_1661595588546954500.sql b/data/sql/updates/db_world/2022_08_27_08.sql similarity index 60% rename from data/sql/updates/pending_db_world/rev_1661595588546954500.sql rename to data/sql/updates/db_world/2022_08_27_08.sql index a9727f5d3..12550c62e 100644 --- a/data/sql/updates/pending_db_world/rev_1661595588546954500.sql +++ b/data/sql/updates/db_world/2022_08_27_08.sql @@ -1,2 +1,3 @@ +-- DB update 2022_08_27_07 -> 2022_08_27_08 -- UPDATE `spell_proc_event` SET `procPhase`=1 WHERE `entry`=58375; From d1562d9f1e127a2bfdd4424c1f2d091c0a4626aa Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 28 Aug 2022 07:05:05 +0200 Subject: [PATCH 33/37] =?UTF-8?q?fix(Scripts/Spells):=20Moonkin=20Form=20p?= =?UTF-8?q?assive=20aura=20should=20not=20proc=20off=20fr=E2=80=A6=20(#128?= =?UTF-8?q?15)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...om AoE spells. --- .../rev_1661075973663887000.sql | 4 ++++ src/server/scripts/Spells/spell_druid.cpp | 22 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1661075973663887000.sql diff --git a/data/sql/updates/pending_db_world/rev_1661075973663887000.sql b/data/sql/updates/pending_db_world/rev_1661075973663887000.sql new file mode 100644 index 000000000..08f682904 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1661075973663887000.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `spell_script_names` WHERE `spell_id`=24905; +INSERT INTO `spell_script_names` VALUES +(24905,'spell_dru_moonkin_form_passive_proc'); diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 9b15b0373..021dc7aa7 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -1150,6 +1150,27 @@ class spell_dru_berserk : public SpellScript } }; +// 24905 - Moonkin Form (Passive) +class spell_dru_moonkin_form_passive_proc : public AuraScript +{ + PrepareAuraScript(spell_dru_moonkin_form_passive_proc); + + bool CheckProc(ProcEventInfo& eventInfo) + { + if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo()) + { + return !spellInfo->IsAffectingArea(); + } + + return false; + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_dru_moonkin_form_passive_proc::CheckProc); + } +}; + void AddSC_druid_spell_scripts() { RegisterSpellScript(spell_dru_bear_form_passive); @@ -1185,4 +1206,5 @@ void AddSC_druid_spell_scripts() RegisterSpellScript(spell_dru_typhoon); RegisterSpellScript(spell_dru_t10_restoration_4p_bonus); RegisterSpellScript(spell_dru_wild_growth); + RegisterSpellScript(spell_dru_moonkin_form_passive_proc); } From e5c6abddbeed80fe16c024bb85c3598dd4a06917 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 28 Aug 2022 05:07:09 +0000 Subject: [PATCH 34/37] chore(DB): import pending files Referenced commit(s): d1562d9f1e127a2bfdd4424c1f2d091c0a4626aa --- .../rev_1661075973663887000.sql => db_world/2022_08_28_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1661075973663887000.sql => db_world/2022_08_28_00.sql} (76%) diff --git a/data/sql/updates/pending_db_world/rev_1661075973663887000.sql b/data/sql/updates/db_world/2022_08_28_00.sql similarity index 76% rename from data/sql/updates/pending_db_world/rev_1661075973663887000.sql rename to data/sql/updates/db_world/2022_08_28_00.sql index 08f682904..4bfa31ad3 100644 --- a/data/sql/updates/pending_db_world/rev_1661075973663887000.sql +++ b/data/sql/updates/db_world/2022_08_28_00.sql @@ -1,3 +1,4 @@ +-- DB update 2022_08_27_08 -> 2022_08_28_00 -- DELETE FROM `spell_script_names` WHERE `spell_id`=24905; INSERT INTO `spell_script_names` VALUES From ce27bbbc86b73279c771a819073c2a5f96487519 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 28 Aug 2022 07:08:06 +0200 Subject: [PATCH 35/37] =?UTF-8?q?fix(Core/Spells):=20Wyvern=20Sting=20DoT?= =?UTF-8?q?=20(ranks=201-3)=20should=20considered=20as=20n=E2=80=A6=20(#12?= =?UTF-8?q?803)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...egative spell. --- 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 e6e57cf68..afe37df65 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4367,6 +4367,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->AttributesEx3 |= SPELL_ATTR3_SUPRESS_TARGET_PROCS; }); + // Wyvern Sting DoT + ApplySpellFix({ 24131, 24134, 24135 }, [](SpellInfo* spellInfo) + { + spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_TARGET_ENEMY); + }); + // Feed Pet ApplySpellFix({ 1539, 51284 }, [](SpellInfo* spellInfo) { From 84c7db5ab62fd24c972d552332914b97c9a3caa8 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 29 Aug 2022 07:54:58 -0300 Subject: [PATCH 36/37] =?UTF-8?q?fix(DB/Quest):=20Import=20several=20missi?= =?UTF-8?q?ng=20texts=20and=20creature=20links=20for=20th=E2=80=A6=20(#128?= =?UTF-8?q?90)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(DB/Quest): Import several missing texts and creature links for the War Effort quests * Include the commendation quests as well * Update rev_1661569695988798600.sql --- .../rev_1661569695988798600.sql | 138 ++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1661569695988798600.sql diff --git a/data/sql/updates/pending_db_world/rev_1661569695988798600.sql b/data/sql/updates/pending_db_world/rev_1661569695988798600.sql new file mode 100644 index 000000000..01448f170 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1661569695988798600.sql @@ -0,0 +1,138 @@ +-- +DELETE FROM `quest_offer_reward` WHERE `ID` IN (8504, 8506, 8510, 8527, 8550, 8581, 8601, 8605, 8608, 8610, 8612, 8614, 8616, 8846, 8847, 8848, 8849, 8850, 8851, 8852, 8853, 8854, 8855); +INSERT INTO `quest_offer_reward` (`ID`, `RewardText`, `VerifiedBuild`) VALUES +(8506, 'I gladly accept your contribution on behalf of the Alliance, $N. Your efforts will directly lead to the creation of several potions and oils in support of our men and women in the field. Thank you, and should come across more, please consider returning to me.', 0), +(8504, 'Oh goodness that\'s a quite a load of stranglekelp you have there. Quick, let\'s get that into a box to keep it fresh. You\'ve done me... us, the Alliance a great favor by bringing that batch in. I\'ll make sure that everyone knows that it was you, the great $N, that helped to tip the scales in the Ahn\'Qiraj war effort with your contribution of stranglekelp!', 0), +(8510, 'Simply outstanding, $N! You\'re a real credit to the Alliance. I\'ll make sure to get these herbs packed away until someone comes to make them into something useful for the war. Feel free to come back around anytime, especially if you have more Arthas\' Tears for me.', 0), +(8527, 'Wow, you\'re a real go-getter. You make me tired just looking at you. Anyway, thanks from the Alliance and all that. I\'ll make sure that all of that dead meat gets packed away. I guess you could check back with me later to see if we still need more of it, though it\'s starting to stink up the place if you ask me.', 0), +(8550, 'Thank you for your continued efforts, $N. You bring great honor to yourself and your ancestors with your selfless giving, and it will be known to all! I will store these herbs away so that they stay fresh until they are needed. Once again you reveal the truest spirit of the Horde, the struggle to overcome and the promise that we can work together to do so.', 0), +(8581, 'This no joke, $C? You bring Pele\'keiki firebloom that fast? Pele\'keiki count them up right now, mon! You makin\' Pele\'keiki so happy, he be tellin\' everyone, $N best firebloom collector ever! Pele\'keiki can\'t wait for war to start. Now we really light up the sky over Silithus, right, bruddah?!', 0), +(8601, 'Practice, practice, practice. A well honed knife and the skill to use it will get you far in this world, $N. Looks like the edges on these skins are better than the last. Did you buy a new knife?$B$BIn any case, we thank you for your efforts. Your donation has been noted, and will be put to good use I can assure you. Should you find yourself in the possession of more rugged leather, be sure to come back and speak with me, as I will probably need it.', 0), +(8605, 'You are an honorable $C, $N! I will see to it that these bandages get into the right hands. You have my thanks, and that of the Horde.$B$BGo in peace, and return to me again should you find yourself with excess wool bandaging. We can use all of the help that we can get here.', 0), +(8608, 'Astounding, $C, you actually did it again! Well, they do say that I have good taste in those that I choose to place in my service. Very well, your contribution is noted and you will receive the social benefits that your efforts have afforded. I suggest though that you go back out and gather yet another bundle of mageweave bandages if you truly wish to prove your worth.', 0), +(8610, 'It is a very selfless act of giving that you perform, $N. One that is likely to save the lives of many combatants at Ahn\'Qiraj. Thank you and know that you have the appreciation of the Horde for your donation. Should you create, or come across, more runecloth bandages, please consider bringing them to me here.', 0), +(8612, 'Smells like you, or someone you know, are quite the cook, $N. Those lean wolf steaks are making my mouth water; I suppose a few going missing won\'t be noticed. Anyway, good work. I\'ll make sure someone packs them away right so that they don\'t spoil too much. $B$BIf you come across more, you know where to find me.', 0), +(8614, 'That be the best catch yet, $N! Good, honest work right there. And no bones too! Thanks goin\' out to you for this spotted yellowtail here mon. Come back soon if you cookin\' up some more!', 0), +(8616, 'Your donation of time and energy to the war effort goes above and beyond, $n. I assure you that your labors have not gone unnoticed. You have my thanks, and the gratitude of the Horde. Please return to me again should you bake up another batch.', 0), +(8846, 'Well then, it\'s settled; here are your supplies, $C. If you wish to do an additional exchange, then I am prepared to authorize it. Just give me the word and I\'ll make it happen. $B$BKeep up the good work, $N. We need all the materiel we can muster if we\'re going to win this thing. If we all do our part, then victory shall be ours for the taking!', 0), +(8847, 'Well then, it\'s settled; here are your supplies, $C. If you wish to do an additional exchange, then I am prepared to authorize it. Just give me the word and I\'ll make it happen. $B$BKeep up the good work, $N. We need all the materiel we can muster if we\'re going to win this thing. If we all do our part, then victory shall be ours for the taking!', 0), +(8848, 'Well then, it\'s settled; here are your supplies, $C. If you wish to do an additional exchange, then I am prepared to authorize it. Just give me the word and I\'ll make it happen. $B$BKeep up the good work, $N. We need all the materiel we can muster if we\'re going to win this thing. If we all do our part, then victory shall be ours for the taking!', 0), +(8849, 'Well then, it\'s settled; here are your supplies, $C. If you wish to do an additional exchange, then I am prepared to authorize it. Just give me the word and I\'ll make it happen. $B$BKeep up the good work, $N. We need all the materiel we can muster if we\'re going to win this thing. If we all do our part, then victory shall be ours for the taking!', 0), +(8850, 'Well then, it\'s settled; here are your supplies, $C. If you wish to do an additional exchange, then I am prepared to authorize it. Just give me the word and I\'ll make it happen. $B$BKeep up the good work, $N. We need all the materiel we can muster if we\'re going to win this thing. If we all do our part, then victory shall be ours for the taking!', 0), +(8851, 'Well then, it\'s settled; here are your supplies, $C. If you wish to do an additional exchange, then I am prepared to authorize it. Just give me the word and I\'ll make it happen. $B$BKeep up the good work, $N. We need all the materiel we can muster if we\'re going to win this thing. If we all do our part, then victory shall be ours for the taking!', 0), +(8852, 'Well then, it\'s settled; here are your supplies, $C. If you wish to do an additional exchange, then I am prepared to authorize it. Just give me the word and I\'ll make it happen. $B$BKeep up the good work, $N. We need all the materiel we can muster if we\'re going to win this thing. If we all do our part, then victory shall be ours for the taking!', 0), +(8853, 'Well then, it\'s settled; here are your supplies, $C. If you wish to do an additional exchange, then I am prepared to authorize it. Just give me the word and I\'ll make it happen. $B$BKeep up the good work, $N. We need all the materiel we can muster if we\'re going to win this thing. If we all do our part, then victory shall be ours for the taking!', 0), +(8854, 'Well then, it\'s settled; here are your supplies, $C. If you wish to do an additional exchange, then I am prepared to authorize it. Just give me the word and I\'ll make it happen. $B$BKeep up the good work, $N. We need all the materiel we can muster if we\'re going to win this thing. If we all do our part, then victory shall be ours for the taking!', 0), +(8855, 'Well then, it\'s settled; here are your supplies, $C. If you wish to do an additional exchange, then I am prepared to authorize it. Just give me the word and I\'ll make it happen. $B$BKeep up the good work, $N. We need all the materiel we can muster if we\'re going to win this thing. If we all do our part, then victory shall be ours for the taking!', 0); + +UPDATE `quest_request_items` SET `CompletionText` = 'Welcome back $c. Our collection grows, but even now we have a need for additional purple lotus. If it is still within your power to gather more of the herb, I entreat you to do so and return them to me here.' WHERE `ID` = 8506; +UPDATE `quest_request_items` SET `CompletionText` = 'Well hello again there... what was it? Ah yes, $N! Come to see if I still need more stranglekelp have you? Well, it\'s your lucky day, because the answer to that very important question is a very affirmative YES! Think you could gather up twenty more?' WHERE `ID` = 8504; +UPDATE `quest_request_items` SET `CompletionText` = 'Ok, so it looks like I still need more Arthas\' Tears. I would imagine that you will be able to find them in the general location that you gathered them up for me last time. The quicker we get these, the faster we can start up the offensive against the forces at Ahn\'Qiraj.$B$BYou gonna help us out again $c?' WHERE `ID` = 8510; +UPDATE `quest_request_items` SET `CompletionText` = 'Hi again $c. I can tell you\'re very excited about all of this. So I suppose you want to bring me another twenty roast raptor. Great. Well you do that. I guess I\'ll see you when you get back.' WHERE `ID` = 8527; +UPDATE `quest_request_items` SET `CompletionText` = 'Hello again, $N. I am glad that you wish to speak to me once more concerning our neverending need for peacebloom. The war effort continues, and with it our production of potions and elixirs to aid in the battles to come. Will you help us again, $C? I am in need of the same amount of peacebloom as before, so if you can gather it up and return it to me here I would be most grateful. Of course, if you already have it on your person, I will be more than happy to accept it from you now.' WHERE `ID` = 8550; +UPDATE `quest_request_items` SET `CompletionText` = 'Good to see you again, $C. We are still working on preparations here for the war effort, and I can still use all of the help that you can give in gathering up wool bandaging. Any assistance at all will be greatly appreciated. I only hope that our efforts will be good enough. I\'ve lost too many noble souls on the battlefields of yesterday to not do everything in my power to see to it that doesn\'t happen again.' WHERE `ID` = 8605; +UPDATE `quest_request_items` SET `CompletionText` = 'You returned? Interesting. As you can see I am still collecting for the Ahn\'Qiraj \'war effort\'. Which means that I need you to once again go out and collect a stack of mageweave bandages for me. I look forward to your return, $C.' WHERE `ID` = 8608; +UPDATE `quest_request_items` SET `CompletionText` = 'Ever does the time grow nearer when we shall launch ourselves headlong into the conflagration at Ahn\'Qiraj, priest. But first we must gather our strength and prepare so that we can survive the onslaught of the insects and their masters.$B$BIf you are here again, then surely you wish to make another contribution of runecloth bandages to the war effort? Please do so as soon as you can and return to me once more.' WHERE `ID` = 8610; +UPDATE `quest_request_items` SET `CompletionText` = 'As you can see, $C, we still need to pack away more food for the soldiers. I don\'t know if you\'ve ever been in a war before, but once you get past the initial shock of the battlefield, you can get pretty hungry. You did a good job last time, so I expect that you\'ll do as well, if not a little quicker, in getting me another stack of those lean wolf steaks.' WHERE `ID` = 8612; +UPDATE `quest_request_items` SET `CompletionText` = 'So as you can see, we still be needin\' a lot of the fishies. The combatants in the upcomin\' Ahn\'Qiraj War gonna be needin\' a lot to eat, so I needin\' to get all the spotted yellowtail that I can. You catch \'em, cook \'em, and bringin\' \'em back to me here, and I be givin\' you thanks, and the thanks of the Horde.' WHERE `ID` = 8614; +UPDATE `quest_request_items` SET `CompletionText` = 'The last batch of baked salmon that you donated to the war effort looked very delicious, $C. I must admit that I was tempted to take a few for myself. As you can tell, we have not yet reached our quota here. I am hoping you have returned because you have another stack of baked salmon with you.' WHERE `ID` = 8616; +UPDATE `quest_request_items` SET `CompletionText` = 'Pele\'keiki know you come to help. Bring many firebloom and make him very happy. Pele\'keiki might make big bombs with firebloom. Drop them on insects from his bat over Ahn\'Qiraj when war come. But Pele\'keiki need more firebloom, $C!$B$BYou gonna bring Pele\'keiki that firebloom, real quick now. Come back with at least as much as last time, and Pele\'keiki be pleased.' WHERE `ID` = 8581; +UPDATE `quest_request_items` SET `CompletionText` = 'Preparations for the impending war at Ahn\'Qiraj are proceeding, $C. However, to ensure that we do not fall behind, or at least that I am not the one that causes us to fall behind, I want for you to bring back another stack of rugged leather. Your prompt attention to this matter will be greatly appreciated, $N.' WHERE `ID` = 8601; + +UPDATE `quest_request_items` SET `CompletionText` = 'Ah, here for additional supplies for yourself, are you? Well, I can certainly understand the need for additional materiel... just take a look around if you need any proof. $B$BI\'ll issue you some additional supplies, but you\'ll need to give me an appropriate number of commendation signets in exchange. You won\'t receive any recognition for surrendering the signets in this manner, but you might find something useful that will help keep you alive when battle is finally upon us.' WHERE `ID` IN (8846, 8847, 8848, 8849, 8850, 8851, 8852, 8853, 8854, 8855); + +UPDATE `quest_template_addon` SET `SpecialFlags` = `SpecialFlags`|1 WHERE `id` IN (8846, 8847, 8848, 8849, 8850, 8851, 8852, 8853, 8854, 8855, 8518, 8521, 8605, 8608, 8523, 8609, 8525, 8527, 8612, 8616, 8529, 8614, 8500, 8504, 8510, 8550, 8581, 8506, 8583, 8493, 8533, 8512, 8514, 8589, 8601, 8516, 8591); + +-- commendation quests +DELETE FROM `creature_queststarter` WHERE `quest` IN (8814, 8825, 8818, 8822, 8842, 8813, 8821, 8812, 8820, 8811, 8819, 8815, 8823, 8814, 8822, 8816, 8824, 8817, 8826, 10693, 10698, 10699, 10700) AND `id` IN (21968, 15738, 15737, 15739, 15736, 15731, 15733, 15735, 15734, 21969); +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(15735, 8814), -- Human +(15735, 8822), +(15734, 8813), -- Dwarf +(15734, 8821), +(15733, 8812), -- Gnome +(15733, 8820), +(15731, 8811), -- Nelf +(15731, 8819), +(15736, 8815), -- Orc +(15736, 8823), +(15739, 8818), -- tauren +(15739, 8825), +(15737, 8816), -- troll +(15737, 8824), +(15738, 8842), -- Undead +(15738, 8826), +(21968, 10693), -- Belf +(21968, 10698), +(21969, 10699), -- Draenei +(21969, 10700); + +DELETE FROM `creature_questender` WHERE `quest` IN (8814, 8825, 8818, 8822, 8842, 8813, 8821, 8812, 8820, 8811, 8819, 8815, 8823, 8814, 8822, 8816, 8824, 8817, 8826, 10693, 10698, 10699, 10700) AND `id` IN (21968, 15738, 15737, 15739, 15736, 15731, 15733, 15735, 15734, 21969); +INSERT INTO `creature_questender` (`id`, `quest`) VALUES +(15735, 8814), -- Human +(15735, 8822), +(15734, 8813), -- Dwarf +(15734, 8821), +(15733, 8812), -- Gnome +(15733, 8820), +(15731, 8811), -- Nelf +(15731, 8819), +(15736, 8815), -- Orc +(15736, 8823), +(15739, 8818), -- tauren +(15739, 8825), +(15737, 8816), -- troll +(15737, 8824), +(15738, 8842), -- Undead +(15738, 8826), +(21968, 10693), -- Belf +(21968, 10698), +(21969, 10699), -- Draenei +(21969, 10700); + +UPDATE `creature_template` SET `npcflag` = `npcflag`|2 WHERE `entry` IN (15731, 15733, 15735, 15734, 21969, 15736, 15737, 15738, 15739, 21968); + +DELETE FROM `creature_queststarter` WHERE `id` = 15535 AND `quest` = 8616; +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(15535, 8616); + +DELETE FROM `creature_questender` WHERE `id` = 15535 AND `quest` = 8616; +INSERT INTO `creature_questender` (`id`, `quest`) VALUES +(15535, 8616); + +UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE `ID` = 8520; -- Alliance silk + +-- Warlord Grohuk / Field Marshall Snowfall +UPDATE `creature_template` SET `npcflag` = `npcflag`|1|2 WHERE `entry` IN (15700, 15701); + +DELETE FROM `creature_queststarter` WHERE `id` = 15701 AND `quest` IN (8846, 8847, 8848, 8849, 8850); +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(15701, 8846), +(15701, 8847), +(15701, 8848), +(15701, 8849), +(15701, 8850); + +DELETE FROM `creature_queststarter` WHERE `id` = 15700 AND `quest` IN (8851, 8852, 8853, 8854, 8855); +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(15700, 8851), +(15700, 8852), +(15700, 8853), +(15700, 8854), +(15700, 8855); + +DELETE FROM `creature_questender` WHERE `id` = 15701 AND `quest` IN (8846, 8847, 8848, 8849, 8850); +INSERT INTO `creature_questender` (`id`, `quest`) VALUES +(15701, 8846), +(15701, 8847), +(15701, 8848), +(15701, 8849), +(15701, 8850); + +DELETE FROM `creature_questender` WHERE `id` = 15700 AND `quest` IN (8851, 8852, 8853, 8854, 8855); +INSERT INTO `creature_questender` (`id`, `quest`) VALUES +(15700, 8851), +(15700, 8852), +(15700, 8853), +(15700, 8854), +(15700, 8855); From 27d0086b8c1f0a844aeb2f733f5699b21717019f Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Mon, 29 Aug 2022 10:57:16 +0000 Subject: [PATCH 37/37] chore(DB): import pending files Referenced commit(s): 84c7db5ab62fd24c972d552332914b97c9a3caa8 --- .../rev_1661569695988798600.sql => db_world/2022_08_29_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1661569695988798600.sql => db_world/2022_08_29_00.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1661569695988798600.sql b/data/sql/updates/db_world/2022_08_29_00.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1661569695988798600.sql rename to data/sql/updates/db_world/2022_08_29_00.sql index 01448f170..6669dcd93 100644 --- a/data/sql/updates/pending_db_world/rev_1661569695988798600.sql +++ b/data/sql/updates/db_world/2022_08_29_00.sql @@ -1,3 +1,4 @@ +-- DB update 2022_08_28_00 -> 2022_08_29_00 -- DELETE FROM `quest_offer_reward` WHERE `ID` IN (8504, 8506, 8510, 8527, 8550, 8581, 8601, 8605, 8608, 8610, 8612, 8614, 8616, 8846, 8847, 8848, 8849, 8850, 8851, 8852, 8853, 8854, 8855); INSERT INTO `quest_offer_reward` (`ID`, `RewardText`, `VerifiedBuild`) VALUES