From bd40fef081daaa3b160b4609083599b42435eb79 Mon Sep 17 00:00:00 2001 From: Grimdhex <176165533+Grimdhex@users.noreply.github.com> Date: Sat, 14 Sep 2024 13:22:02 +0200 Subject: [PATCH 01/20] fix(Scripts/BlackTemple): fix blaze and flame bast casting for Flame of Azzinoth (#19967) fix(Scripts/Core): fix blaze and flame bast casting for Flame of Azzinoth --- .../scripts/Outland/BlackTemple/boss_illidan.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index e4de895c3511dd..60873db141e57a 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -1298,12 +1298,21 @@ struct npc_flame_of_azzinoth : public ScriptedAI DoCastVictim(SPELL_FLAME_BLAST); me->m_Events.AddEventAtOffset([&] { - if (Unit* target = me->GetVictim()) - target->CastSpell(target, SPELL_BLAZE, true); + DoCastVictim(SPELL_BLAZE); }, 1s); }, 15s, 20s); } + void UpdateAI(uint32 diff) override + { + scheduler.Update(diff); + + if (!UpdateVictim()) + return; + + DoMeleeAttackIfReady(); + } + private: ObjectGuid _bladeGUID; }; From 4fc60bbbdfb6e40b4e174333065c8365f639dfef Mon Sep 17 00:00:00 2001 From: Grimdhex <176165533+Grimdhex@users.noreply.github.com> Date: Sat, 14 Sep 2024 13:39:03 +0200 Subject: [PATCH 02/20] fix(Core/Spells): Shadow demon - Allow to move while casting Paralyze (#19948) * fix(Scripts/BlackTemple): fix stationary shadow demons * optimization: use else if to stop the execution when a condition is reach * revert last changes and fix the spell to allow move while casting * . --- 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 f88dfbdc93c989..9cf614e11b44f6 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4831,6 +4831,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_3_YARDS); }); + // Paralyze + ApplySpellFix({ 41083 }, [](SpellInfo* spellInfo) + { + spellInfo->AttributesEx5 |= SPELL_ATTR5_ALLOW_ACTION_DURING_CHANNEL; + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; From 99b39e50452e5a5f0362765860fc7c8280f251c0 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 15 Sep 2024 07:46:55 -0300 Subject: [PATCH 03/20] =?UTF-8?q?fix(Scripts/BlackTemple):=20Parasitic=20S?= =?UTF-8?q?hadowfiends=20should=20not=20target=20pl=E2=80=A6=20(#19944)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Scripts/BlackTemple): Parasitic Shadowfiends should not target players affected with debuff * Update boss_illidan.cpp * Update src/server/scripts/Outland/BlackTemple/boss_illidan.cpp * make it simple --- .../Outland/BlackTemple/boss_illidan.cpp | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index 60873db141e57a..a181d6fba8f6ed 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -1186,14 +1186,37 @@ struct npc_parasitic_shadowfiend : public ScriptedAI { npc_parasitic_shadowfiend(Creature* creature) : ScriptedAI(creature) { } + bool CanAIAttack(Unit const* who) const override + { + return !who->HasAura(SPELL_PARASITIC_SHADOWFIEND) && !who->HasAura(SPELL_PARASITIC_SHADOWFIEND_TRIGGER); + } + + void EnterEvadeMode(EvadeReason /*why*/) override + { + me->DespawnOrUnsummon(); + } + void IsSummonedBy(WorldObject* /*summoner*/) override { // Simulate blizz-like AI delay to avoid extreme overpopulation of adds me->SetReactState(REACT_DEFENSIVE); - me->m_Events.AddEventAtOffset([&] { + + scheduler.Schedule(2400ms, [this](TaskContext context) + { me->SetReactState(REACT_AGGRESSIVE); me->SetInCombatWithZone(); - }, 2400ms); + context.Repeat(); + }); + } + + void UpdateAI(uint32 diff) override + { + scheduler.Update(diff); + + if (!UpdateVictim()) + return; + + DoMeleeAttackIfReady(); } }; From 8b16f7d243d54a19e6e7d5bf79bf44427fa84bfe Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 15 Sep 2024 07:48:11 -0300 Subject: [PATCH 04/20] =?UTF-8?q?fix(Scripts/BlackTemple):=20Implement=20e?= =?UTF-8?q?motes=20when=20opening=20Najentus=20and=20=E2=80=A6=20(#19946)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Scripts/BlackTemple): Implement emotes when opening Najentus and Den of Mortal Delights * only check if state is done --- .../rev_1726132179936077700.sql | 2 ++ src/server/game/Instances/InstanceScript.cpp | 18 ++++++++++ src/server/game/Instances/InstanceScript.h | 4 +++ .../Outland/BlackTemple/black_temple.h | 12 +++++-- .../BlackTemple/instance_black_temple.cpp | 34 +++++++++++++------ 5 files changed, 58 insertions(+), 12 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1726132179936077700.sql diff --git a/data/sql/updates/pending_db_world/rev_1726132179936077700.sql b/data/sql/updates/pending_db_world/rev_1726132179936077700.sql new file mode 100644 index 00000000000000..8851a0966dcf4a --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1726132179936077700.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_text` SET `TextRange` = 3 WHERE `CreatureId` = 22984; diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index 122257c15221ea..593aab04aa6e9d 100644 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -761,6 +761,24 @@ void InstanceScript::LoadInstanceSavedGameobjectStateData() } } +bool InstanceScript::AllBossesDone() const +{ + for (auto const& boss : bosses) + if (boss.state != DONE) + return false; + + return true; +} + +bool InstanceScript::AllBossesDone(std::initializer_list bossIds) const +{ + for (auto const& bossId : bossIds) + if (!IsBossDone(bossId)) + return false; + + return true; +} + std::string InstanceScript::GetBossStateName(uint8 state) { // See enum EncounterState in InstanceScript.h diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h index d65bb0349ffad3..c5add7eb201b86 100644 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -275,6 +275,10 @@ class InstanceScript : public ZoneScript void LoadInstanceSavedGameobjectStateData(); + [[nodiscard]] bool IsBossDone(uint32 bossId) const { return GetBossState(bossId) == DONE; }; + [[nodiscard]] bool AllBossesDone() const; + [[nodiscard]] bool AllBossesDone(std::initializer_list bossIds) const; + TaskScheduler scheduler; protected: void SetHeaders(std::string const& dataHeaders); diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.h b/src/server/scripts/Outland/BlackTemple/black_temple.h index 4b88eff2798bec..ac876e1c7926cb 100644 --- a/src/server/scripts/Outland/BlackTemple/black_temple.h +++ b/src/server/scripts/Outland/BlackTemple/black_temple.h @@ -42,7 +42,8 @@ enum DataTypes DATA_GATHIOS_THE_SHATTERER = 12, DATA_HIGH_NETHERMANCER_ZEREVOR = 13, DATA_LADY_MALANDE = 14, - DATA_VERAS_DARKSHADOW = 15 + DATA_VERAS_DARKSHADOW = 15, + DATA_BLACK_TEMPLE_TRIGGER = 16 }; enum CreatureIds @@ -82,7 +83,8 @@ enum CreatureIds NPC_ASHTONGUE_STALKER = 23374, NPC_STORM_FURY = 22848, - NPC_DRAGON_TURTLE = 22885 + NPC_DRAGON_TURTLE = 22885, + NPC_BLACK_TEMPLE_TRIGGER = 22984 }; enum GameObjectIds @@ -113,6 +115,12 @@ enum MiscIds SPELL_SUMMON_SHADOWFIENDS = 41159 }; +enum Texts +{ + EMOTE_NAJENTUS_DEFEATED = 0, + EMOTE_LOWER_TEMPLE_DEFEATED = 1 +}; + template inline AI* GetBlackTempleAI(T* obj) { diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp index f324168f483c1d..7a60d7a375a6d2 100644 --- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp @@ -62,6 +62,7 @@ ObjectData const creatureData[] = { NPC_VERAS_DARKSHADOW, DATA_VERAS_DARKSHADOW }, { NPC_AKAMA_ILLIDAN, DATA_AKAMA_ILLIDAN }, { NPC_ILLIDAN_STORMRAGE, DATA_ILLIDAN_STORMRAGE }, + { NPC_BLACK_TEMPLE_TRIGGER, DATA_BLACK_TEMPLE_TRIGGER }, { 0, 0 } }; @@ -165,18 +166,31 @@ class instance_black_temple : public InstanceMapScript if (!InstanceScript::SetBossState(type, state)) return false; - if (type == DATA_SHADE_OF_AKAMA && state == DONE) + if (state == DONE) { - for (ObjectGuid const& guid : ashtongueGUIDs) - if (Creature* ashtongue = instance->GetCreature(guid)) - ashtongue->SetFaction(FACTION_ASHTONGUE_DEATHSWORN); - } - else if (type == DATA_ILLIDARI_COUNCIL && state == DONE) - { - if (Creature* akama = GetCreature(DATA_AKAMA_ILLIDAN)) - akama->AI()->DoAction(0); - } + switch (type) + { + case DATA_HIGH_WARLORD_NAJENTUS: + if (Creature* trigger = GetCreature(DATA_BLACK_TEMPLE_TRIGGER)) + trigger->AI()->Talk(EMOTE_NAJENTUS_DEFEATED); + break; + case DATA_SHADE_OF_AKAMA: + for (ObjectGuid const& guid : ashtongueGUIDs) + if (Creature* ashtongue = instance->GetCreature(guid)) + ashtongue->SetFaction(FACTION_ASHTONGUE_DEATHSWORN); + break; + case DATA_ILLIDARI_COUNCIL: + if (Creature* akama = GetCreature(DATA_AKAMA_ILLIDAN)) + akama->AI()->DoAction(0); + break; + default: + break; + } + if (AllBossesDone({ DATA_SHADE_OF_AKAMA, DATA_TERON_GOREFIEND, DATA_GURTOGG_BLOODBOIL, DATA_RELIQUARY_OF_SOULS })) + if (Creature* trigger = GetCreature(DATA_BLACK_TEMPLE_TRIGGER)) + trigger->AI()->Talk(EMOTE_LOWER_TEMPLE_DEFEATED); + } return true; } From d13b6963ea9962f03dfc358c286ed6c0f89051c8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 15 Sep 2024 10:49:06 +0000 Subject: [PATCH 05/20] chore(DB): import pending files Referenced commit(s): 8b16f7d243d54a19e6e7d5bf79bf44427fa84bfe --- .../rev_1726132179936077700.sql => db_world/2024_09_15_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1726132179936077700.sql => db_world/2024_09_15_00.sql} (62%) diff --git a/data/sql/updates/pending_db_world/rev_1726132179936077700.sql b/data/sql/updates/db_world/2024_09_15_00.sql similarity index 62% rename from data/sql/updates/pending_db_world/rev_1726132179936077700.sql rename to data/sql/updates/db_world/2024_09_15_00.sql index 8851a0966dcf4a..b8b2dd8d292216 100644 --- a/data/sql/updates/pending_db_world/rev_1726132179936077700.sql +++ b/data/sql/updates/db_world/2024_09_15_00.sql @@ -1,2 +1,3 @@ +-- DB update 2024_09_11_01 -> 2024_09_15_00 -- UPDATE `creature_text` SET `TextRange` = 3 WHERE `CreatureId` = 22984; From 04c8e85434daab642996146a243245ae73a7e858 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 15 Sep 2024 14:39:04 +0200 Subject: [PATCH 06/20] fix(Scripts/BT): correct illidari council enrage timer (#19975) * fix(Scripts/BT): correct illidari council enrage timer * wrong conversion from https://github.com/azerothcore/azerothcore-wotlk/commit/5ae1473e3064beb4adf666e33a38b6072639069a * redundant --- .../BlackTemple/boss_illidari_council.cpp | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidari_council.cpp index 016cbdba89d090..c3ff343ba8c44e 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidari_council.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidari_council.cpp @@ -147,11 +147,11 @@ struct boss_illidari_council : public BossAI bool spoken = false; - me->CastSpell(me, SPELL_EMPYREAL_BALANCE, true); + DoCastSelf(SPELL_EMPYREAL_BALANCE, true); ScheduleTimedEvent(3200ms, [&] { - me->CastSpell(me, SPELL_EMPYREAL_EQUIVALENCY, true); + DoCastSelf(SPELL_EMPYREAL_EQUIVALENCY, true); }, 3200ms); for (uint8 i = DATA_GATHIOS_THE_SHATTERER; i <= DATA_VERAS_DARKSHADOW; ++i) @@ -239,7 +239,7 @@ struct boss_illidari_council_memberAI : public ScriptedAI { if (param == ACTION_ENRAGE) { - me->CastSpell(me, SPELL_BERSERK, true); + DoCastSelf(SPELL_BERSERK, true); Talk(SAY_COUNCIL_ENRAGE); } } @@ -331,14 +331,14 @@ struct boss_gathios_the_shatterer : public boss_illidari_council_memberAI events.ScheduleEvent(EVENT_SPELL_BLESSING, 15s); break; case EVENT_SPELL_AURA: - me->CastSpell(me, _toggleAura ? SPELL_DEVOTION_AURA : SPELL_CHROMATIC_RESISTANCE_AURA); + DoCastSelf(_toggleAura ? SPELL_DEVOTION_AURA : SPELL_CHROMATIC_RESISTANCE_AURA); _toggleAura = !_toggleAura; events.ScheduleEvent(EVENT_SPELL_AURA, 60s); break; case EVENT_SPELL_CONSECRATION: if (roll_chance_i(50)) Talk(SAY_COUNCIL_SPECIAL); - me->CastSpell(me, SPELL_CONSECRATION, false); + DoCastSelf(SPELL_CONSECRATION); events.ScheduleEvent(EVENT_SPELL_AURA, 30s); break; case EVENT_SPELL_HAMMER_OF_JUSTICE: @@ -352,12 +352,12 @@ struct boss_gathios_the_shatterer : public boss_illidari_council_memberAI events.ScheduleEvent(EVENT_SPELL_HAMMER_OF_JUSTICE, 0s); break; case EVENT_SPELL_SEAL: - me->CastSpell(me, _toggleSeal ? SPELL_SEAL_OF_COMMAND : SPELL_SEAL_OF_BLOOD); + DoCastSelf(_toggleSeal ? SPELL_SEAL_OF_COMMAND : SPELL_SEAL_OF_BLOOD); _toggleSeal = !_toggleSeal; events.ScheduleEvent(EVENT_SPELL_SEAL, 20s); break; case EVENT_SPELL_JUDGEMENT: - me->CastSpell(me->GetVictim(), SPELL_JUDGEMENT, false); + me->CastSpell(me->GetVictim(), SPELL_JUDGEMENT); events.ScheduleEvent(EVENT_SPELL_JUDGEMENT, 16s, 20s); break; } @@ -511,22 +511,22 @@ struct boss_lady_malande : public boss_illidari_council_memberAI switch (events.ExecuteEvent()) { case EVENT_SPELL_CIRCLE_OF_HEALING: - me->CastSpell(me, SPELL_CIRCLE_OF_HEALING, false); + DoCastSelf(SPELL_CIRCLE_OF_HEALING); events.ScheduleEvent(EVENT_SPELL_CIRCLE_OF_HEALING, 20s); break; case EVENT_SPELL_REFLECTIVE_SHIELD: if (roll_chance_i(50)) Talk(SAY_COUNCIL_SPECIAL); - me->CastSpell(me, SPELL_REFLECTIVE_SHIELD, false); + DoCastSelf(SPELL_REFLECTIVE_SHIELD); events.ScheduleEvent(EVENT_SPELL_REFLECTIVE_SHIELD, 40s); break; case EVENT_SPELL_DIVINE_WRATH: if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f)) - me->CastSpell(target, SPELL_DIVINE_WRATH, false); + me->CastSpell(target, SPELL_DIVINE_WRATH); events.ScheduleEvent(EVENT_SPELL_DIVINE_WRATH, 20s); break; case EVENT_SPELL_EMPOWERED_SMITE: - me->CastSpell(me->GetVictim(), SPELL_EMPOWERED_SMITE, false); + me->CastSpell(me->GetVictim(), SPELL_EMPOWERED_SMITE); events.ScheduleEvent(EVENT_SPELL_EMPOWERED_SMITE, 3s); break; } @@ -542,7 +542,7 @@ struct boss_veras_darkshadow : public boss_illidari_council_memberAI me->SetCanDualWield(true); boss_illidari_council_memberAI::JustEngagedWith(who); events.ScheduleEvent(EVENT_SPELL_VANISH, 10s); - events.ScheduleEvent(EVENT_SPELL_ENRAGE, 90s); + events.ScheduleEvent(EVENT_SPELL_ENRAGE, 15min); } void JustSummoned(Creature* summon) override @@ -564,13 +564,13 @@ struct boss_veras_darkshadow : public boss_illidari_council_memberAI case EVENT_SPELL_VANISH: if (roll_chance_i(50)) Talk(SAY_COUNCIL_SPECIAL); - me->CastSpell(me, SPELL_DEADLY_STRIKE, false); - me->CastSpell(me, SPELL_VANISH, false); + DoCastSelf(SPELL_DEADLY_STRIKE); + DoCastSelf(SPELL_VANISH); events.ScheduleEvent(EVENT_SPELL_VANISH, 60s); events.ScheduleEvent(EVENT_SPELL_VANISH_OUT, 29s); break; case EVENT_SPELL_VANISH_OUT: - me->CastSpell(me, SPELL_VANISH_OUT, false); + DoCastSelf(SPELL_VANISH_OUT); break; case EVENT_SPELL_ENRAGE: DoResetThreatList(); From ee6e74eb3c7c02425dd564e22bbec6318f8bfc6a Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 15 Sep 2024 15:55:45 -0300 Subject: [PATCH 07/20] fix(Scripts/Commands): Fix level up achievements not being granted (#19969) --- src/server/game/Handlers/CharacterHandler.cpp | 8 ++++++-- src/server/scripts/Commands/cs_character.cpp | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 4021d541f702b3..77fe6a4c153c31 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -987,8 +987,12 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder const& holder) if (pCurrChar->HasAtLoginFlag(AT_LOGIN_CHECK_ACHIEVS)) { - pCurrChar->RemoveAtLoginFlag(AT_LOGIN_CHECK_ACHIEVS, true); - pCurrChar->CheckAllAchievementCriteria(); + // If we process the check while players are loading they won't be notified of the changes. + pCurrChar->m_Events.AddEventAtOffset([pCurrChar] + { + pCurrChar->RemoveAtLoginFlag(AT_LOGIN_CHECK_ACHIEVS, true); + pCurrChar->CheckAllAchievementCriteria(); + }, 1s); } bool firstLogin = pCurrChar->HasAtLoginFlag(AT_LOGIN_FIRST); diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index fc479a383a1cd3..8e5311a65cb074 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -23,6 +23,7 @@ Category: commandscripts EndScriptData */ #include "AccountMgr.h" +#include "AchievementMgr.h" #include "Chat.h" #include "CommandScript.h" #include "DBCStores.h" @@ -272,6 +273,8 @@ class character_commandscript : public CommandScript stmt->SetData(1, playerGuid.GetCounter()); CharacterDatabase.Execute(stmt); + sAchievementMgr->UpdateAchievementCriteriaForOfflinePlayer(playerGuid.GetCounter(), ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL); + sCharacterCache->UpdateCharacterLevel(playerGuid, newLevel); } } From 1df989f7807d9d0e8cfb52a8fe1001dc62b19598 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 15 Sep 2024 21:11:24 +0200 Subject: [PATCH 08/20] chore(Core/Achievement): cleanup offline achievement (#19976) --- data/sql/updates/db_characters/2024_09_03_00.sql | 8 ++++++-- src/server/game/Achievements/AchievementMgr.cpp | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/data/sql/updates/db_characters/2024_09_03_00.sql b/data/sql/updates/db_characters/2024_09_03_00.sql index b61491e17ea979..d43d20b2e5d7e5 100644 --- a/data/sql/updates/db_characters/2024_09_03_00.sql +++ b/data/sql/updates/db_characters/2024_09_03_00.sql @@ -1,11 +1,15 @@ -- DB update 2024_07_05_00 -> 2024_09_03_00 DROP TABLE IF EXISTS `character_achievement_offline_updates`; CREATE TABLE `character_achievement_offline_updates` ( - `guid` BIGINT UNSIGNED NOT NULL COMMENT 'Character\'s GUID', + `guid` INT UNSIGNED NOT NULL COMMENT 'Character\'s GUID', `update_type` TINYINT UNSIGNED NOT NULL COMMENT 'Supported types: 1 - COMPLETE_ACHIEVEMENT; 2 - UPDATE_CRITERIA', `arg1` INT UNSIGNED NOT NULL COMMENT 'For type 1: achievement ID; for type 2: ACHIEVEMENT_CRITERIA_TYPE', `arg2` INT UNSIGNED DEFAULT NULL COMMENT 'For type 2: miscValue1 for updating achievement criteria', `arg3` INT UNSIGNED DEFAULT NULL COMMENT 'For type 2: miscValue2 for updating achievement criteria', INDEX `idx_guid` (`guid`) ) -COMMENT = 'Stores updates to character achievements when the character was offline'; +COMMENT = 'Stores updates to character achievements when the character was offline' +CHARSET = utf8mb4 +COLLATE = utf8mb4_unicode_ci +ENGINE = InnoDB +; diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index 9d3626e3d6c49c..a6b2f905ff21ba 100644 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -2503,7 +2503,7 @@ void AchievementMgr::ProcessOfflineUpdate(AchievementOfflinePlayerUpdate const& { AchievementEntry const* achievement = sAchievementStore.LookupEntry(update.arg1); - ASSERT(achievement != NULL, "Not found achievement to complete for offline achievements update. Wrong arg1 ({}) value?", update.arg1); + ASSERT(achievement, "Not found achievement to complete for offline achievements update. Wrong arg1 ({}) value?", update.arg1); CompletedAchievement(achievement); break; @@ -3142,7 +3142,7 @@ void AchievementGlobalMgr::CompletedAchievementForOfflinePlayer(ObjectGuid::LowT { CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_ACHIEVEMENT_OFFLINE_UPDATES); stmt->SetData(0, playerLowGuid); - stmt->SetData(1, uint32(ACHIEVEMENT_OFFLINE_PLAYER_UPDATE_TYPE_COMPLETE_ACHIEVEMENT)); + stmt->SetData(1, ACHIEVEMENT_OFFLINE_PLAYER_UPDATE_TYPE_COMPLETE_ACHIEVEMENT); stmt->SetData(2, entry->ID); stmt->SetData(3, 0); stmt->SetData(4, 0); @@ -3153,7 +3153,7 @@ void AchievementGlobalMgr::UpdateAchievementCriteriaForOfflinePlayer(ObjectGuid: { CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_ACHIEVEMENT_OFFLINE_UPDATES); stmt->SetData(0, playerLowGuid); - stmt->SetData(1, uint32(ACHIEVEMENT_OFFLINE_PLAYER_UPDATE_TYPE_UPDATE_CRITERIA)); + stmt->SetData(1, ACHIEVEMENT_OFFLINE_PLAYER_UPDATE_TYPE_UPDATE_CRITERIA); stmt->SetData(2, type); stmt->SetData(3, miscValue1); stmt->SetData(4, miscValue2); From e2353a1c9f58a143581ed326e9b0600f90c24aeb Mon Sep 17 00:00:00 2001 From: sudlud Date: Sun, 15 Sep 2024 23:15:21 +0200 Subject: [PATCH 09/20] =?UTF-8?q?fix(Core/PlayerQuest):=20Introduce=20flag?= =?UTF-8?q?=20QUEST=5FSPECIAL=5FFLAGS=5FNO=5FLOREMAST=E2=80=A6=20(#19962)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Core/PlayerQuest): Introduce flag QUEST_SPECIAL_FLAGS_NO_LOREMASTER_COUNT - this allows flagging quests so that they will not count towards Loremaster achievement - update Corrupted Flower Quests in Felwood accordingly as a first use case * load Specialflags as uint32 from DB --- .../pending_db_world/rev_1726231075608295100.sql | 7 +++++++ src/server/game/Achievements/AchievementMgr.cpp | 2 +- src/server/game/Quests/QuestDef.cpp | 2 +- src/server/game/Quests/QuestDef.h | 13 +++++++------ 4 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1726231075608295100.sql diff --git a/data/sql/updates/pending_db_world/rev_1726231075608295100.sql b/data/sql/updates/pending_db_world/rev_1726231075608295100.sql new file mode 100644 index 00000000000000..ed9f2d7e8f8a3b --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1726231075608295100.sql @@ -0,0 +1,7 @@ +-- implement QUEST_SPECIAL_FLAGS_NO_LOREMASTER_COUNT +-- extend column datatype from tinyint to int +ALTER TABLE `quest_template_addon` MODIFY COLUMN `SpecialFlags` INT UNSIGNED DEFAULT 0 NOT NULL; + +-- add flag to Corrupted Flower Quests in Felwood +UPDATE `quest_template_addon` SET `SpecialFlags` = (`SpecialFlags` | 256) +WHERE (`ID` IN (996, 998, 1514, 2523, 2878, 3363, 4113, 4114, 4115, 4116, 4117, 4118, 4119, 4221, 4222, 4343, 4401, 4403, 4443, 4444, 4445, 4446, 4447, 4448, 4461, 4462, 4464, 4465, 4466, 4467)); diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index a6b2f905ff21ba..697dd05a3eff41 100644 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -1087,7 +1087,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui for (RewardedQuestSet::const_iterator itr = rewQuests.begin(); itr != rewQuests.end(); ++itr) { Quest const* quest = sObjectMgr->GetQuestTemplate(*itr); - if (quest && quest->GetZoneOrSort() >= 0 && uint32(quest->GetZoneOrSort()) == achievementCriteria->complete_quests_in_zone.zoneID) + if (quest && quest->GetZoneOrSort() >= 0 && uint32(quest->GetZoneOrSort()) == achievementCriteria->complete_quests_in_zone.zoneID && !(quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_NO_LOREMASTER_COUNT))) ++counter; } SetCriteriaProgress(achievementCriteria, counter); diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp index a4cf35b8532bce..12edb29a2cfc85 100644 --- a/src/server/game/Quests/QuestDef.cpp +++ b/src/server/game/Quests/QuestDef.cpp @@ -187,7 +187,7 @@ void Quest::LoadQuestTemplateAddon(Field* fields) RequiredMaxRepValue = fields[14].Get(); StartItemCount = fields[15].Get(); RewardMailSenderEntry = fields[16].Get(); - SpecialFlags = fields[17].Get(); + SpecialFlags = fields[17].Get(); if ((SpecialFlags & QUEST_SPECIAL_FLAGS_AUTO_ACCEPT) && !sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_ACCEPT)) { diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h index 84bbec84b6b6e0..247ac1ec210a48 100644 --- a/src/server/game/Quests/QuestDef.h +++ b/src/server/game/Quests/QuestDef.h @@ -165,17 +165,18 @@ enum QuestSpecialFlags QUEST_SPECIAL_FLAGS_CAST = 0x0020, // Set by 32 in SpecialFlags in DB if the quest requires RequiredOrNpcGo killcredit but NOT kill (a spell cast) QUEST_SPECIAL_FLAGS_NO_REP_SPILLOVER = 0x0040, // Set by 64 in SpecialFlags in DB if the quest does not share rewarded reputation with other allied factions QUEST_SPECIAL_FLAGS_CAN_FAIL_IN_ANY_STATE = 0x0080, // Set by 128 in SpecialFlags in DB if the quest is allowed to fail in Player::FailQuest() independant of its current state + QUEST_SPECIAL_FLAGS_NO_LOREMASTER_COUNT = 0x0100, // Set by 256 in SpecialFlags in DB if the quest should not count towards Loremaster Achievement // room for more custom flags QUEST_SPECIAL_FLAGS_DB_ALLOWED = QUEST_SPECIAL_FLAGS_REPEATABLE | QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT | QUEST_SPECIAL_FLAGS_AUTO_ACCEPT | QUEST_SPECIAL_FLAGS_DF_QUEST | QUEST_SPECIAL_FLAGS_MONTHLY | QUEST_SPECIAL_FLAGS_CAST | QUEST_SPECIAL_FLAGS_NO_REP_SPILLOVER | - QUEST_SPECIAL_FLAGS_CAN_FAIL_IN_ANY_STATE, + QUEST_SPECIAL_FLAGS_CAN_FAIL_IN_ANY_STATE | QUEST_SPECIAL_FLAGS_NO_LOREMASTER_COUNT, - QUEST_SPECIAL_FLAGS_DELIVER = 0x0100, // Internal flag computed only - QUEST_SPECIAL_FLAGS_SPEAKTO = 0x0200, // Internal flag computed only - QUEST_SPECIAL_FLAGS_KILL = 0x0400, // Internal flag computed only - QUEST_SPECIAL_FLAGS_TIMED = 0x0800, // Internal flag computed only - QUEST_SPECIAL_FLAGS_PLAYER_KILL = 0x1000 // Internal flag computed only + QUEST_SPECIAL_FLAGS_DELIVER = 0x0200, // Internal flag computed only + QUEST_SPECIAL_FLAGS_SPEAKTO = 0x0400, // Internal flag computed only + QUEST_SPECIAL_FLAGS_KILL = 0x0800, // Internal flag computed only + QUEST_SPECIAL_FLAGS_TIMED = 0x1000, // Internal flag computed only + QUEST_SPECIAL_FLAGS_PLAYER_KILL = 0x2000 // Internal flag computed only }; struct QuestLocale From 64c9e4a0a4d54ea24dce09d0ea5e762d92227fea Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 15 Sep 2024 21:16:14 +0000 Subject: [PATCH 10/20] chore(DB): import pending files Referenced commit(s): e2353a1c9f58a143581ed326e9b0600f90c24aeb --- .../rev_1726231075608295100.sql => db_world/2024_09_15_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1726231075608295100.sql => db_world/2024_09_15_01.sql} (92%) diff --git a/data/sql/updates/pending_db_world/rev_1726231075608295100.sql b/data/sql/updates/db_world/2024_09_15_01.sql similarity index 92% rename from data/sql/updates/pending_db_world/rev_1726231075608295100.sql rename to data/sql/updates/db_world/2024_09_15_01.sql index ed9f2d7e8f8a3b..194915502b0bef 100644 --- a/data/sql/updates/pending_db_world/rev_1726231075608295100.sql +++ b/data/sql/updates/db_world/2024_09_15_01.sql @@ -1,3 +1,4 @@ +-- DB update 2024_09_15_00 -> 2024_09_15_01 -- implement QUEST_SPECIAL_FLAGS_NO_LOREMASTER_COUNT -- extend column datatype from tinyint to int ALTER TABLE `quest_template_addon` MODIFY COLUMN `SpecialFlags` INT UNSIGNED DEFAULT 0 NOT NULL; From 3bb5ec779d217e8beedf7e42f8f8146312d2c1db Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Mon, 16 Sep 2024 10:15:50 -0400 Subject: [PATCH 11/20] fix(Core/Spells): Revert triggered spell logic change. (#19983) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Revert "fix(Core/Spells): Resolve a case of triggered spells prolonging comba…" This reverts commit edd7e10dfc7651ed2657a09d5411771831c8ec1e. --- src/server/game/Entities/Unit/Unit.cpp | 12 +++++------- src/server/game/Spells/Spell.cpp | 3 +-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 692e67fb51131b..3e552068e41fcc 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -20228,13 +20228,13 @@ void Unit::OutDebugInfo() const class AuraMunchingQueue : public BasicEvent { public: - AuraMunchingQueue(Unit& owner, ObjectGuid targetGUID, int32 basePoints, uint32 spellId, AuraEffect* aurEff) : _owner(owner), _targetGUID(targetGUID), _basePoints(basePoints), _spellId(spellId), _aurEff(aurEff) { } + AuraMunchingQueue(Unit& owner, ObjectGuid targetGUID, int32 basePoints, uint32 spellId) : _owner(owner), _targetGUID(targetGUID), _basePoints(basePoints), _spellId(spellId) { } bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/) override { if (_owner.IsInWorld() && _owner.FindMap()) if (Unit* target = ObjectAccessor::GetUnit(_owner, _targetGUID)) - _owner.CastCustomSpell(_spellId, SPELLVALUE_BASE_POINT0, _basePoints, target, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_NO_PERIODIC_RESET), nullptr, _aurEff, _owner.GetGUID()); + _owner.CastCustomSpell(_spellId, SPELLVALUE_BASE_POINT0, _basePoints, target, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_NO_PERIODIC_RESET), nullptr, nullptr, _owner.GetGUID()); return true; } @@ -20244,15 +20244,13 @@ class AuraMunchingQueue : public BasicEvent ObjectGuid _targetGUID; int32 _basePoints; uint32 _spellId; - AuraEffect* _aurEff; }; void Unit::CastDelayedSpellWithPeriodicAmount(Unit* caster, uint32 spellId, AuraType auraType, int32 addAmount, uint8 effectIndex) { - AuraEffect* aurEff = nullptr; for (AuraEffectList::iterator i = m_modAuras[auraType].begin(); i != m_modAuras[auraType].end(); ++i) { - aurEff = *i; + AuraEffect* aurEff = *i; if (aurEff->GetCasterGUID() != caster->GetGUID() || aurEff->GetId() != spellId || aurEff->GetEffIndex() != effectIndex || !aurEff->GetTotalTicks()) continue; @@ -20262,9 +20260,9 @@ void Unit::CastDelayedSpellWithPeriodicAmount(Unit* caster, uint32 spellId, Aura // xinef: delay only for casting on different unit if (this == caster || !sWorld->getBoolConfig(CONFIG_MUNCHING_BLIZZLIKE)) - caster->CastCustomSpell(spellId, SPELLVALUE_BASE_POINT0, addAmount, this, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_NO_PERIODIC_RESET), nullptr, aurEff, caster->GetGUID()); + caster->CastCustomSpell(spellId, SPELLVALUE_BASE_POINT0, addAmount, this, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_NO_PERIODIC_RESET), nullptr, nullptr, caster->GetGUID()); else - caster->m_Events.AddEvent(new AuraMunchingQueue(*caster, GetGUID(), addAmount, spellId, aurEff), caster->m_Events.CalculateQueueTime(400)); + caster->m_Events.AddEvent(new AuraMunchingQueue(*caster, GetGUID(), addAmount, spellId), caster->m_Events.CalculateQueueTime(400)); } void Unit::SendClearTarget() diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index e26a2a087ab4e2..24d07cc9452347 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2931,8 +2931,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target) { if (missInfo != SPELL_MISS_EVADE && !m_caster->IsFriendlyTo(effectUnit) && (!m_spellInfo->IsPositive() || m_spellInfo->HasEffect(SPELL_EFFECT_DISPEL))) { - if (!m_triggeredByAuraSpell.spellInfo || (!(m_triggeredByAuraSpell.spellInfo->Effects[m_triggeredByAuraSpell.effectIndex].TriggerSpell == m_spellInfo->Id) && !(m_triggeredByAuraSpell.spellInfo->IsAuraEffectEqual(m_spellInfo)))) - m_caster->CombatStart(effectUnit, !(m_spellInfo->AttributesEx3 & SPELL_ATTR3_SUPRESS_TARGET_PROCS)); + m_caster->CombatStart(effectUnit, !(m_spellInfo->AttributesEx3 & SPELL_ATTR3_SUPRESS_TARGET_PROCS)); // Patch 3.0.8: All player spells which cause a creature to become aggressive to you will now also immediately cause the creature to be tapped. if (effectUnit->IsInCombatWith(m_caster)) From 07c54fe8c7c0eb32ba51d52e3f6bbc34005239ab Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:12:26 -0400 Subject: [PATCH 12/20] fix(DB/Command): Add help values for various commands. (#19984) Init. --- .../pending_db_world/command-syntax.sql | 171 ++++++++++++++++++ src/server/scripts/Commands/cs_debug.cpp | 2 +- src/server/scripts/Commands/cs_misc.cpp | 3 - 3 files changed, 172 insertions(+), 4 deletions(-) create mode 100644 data/sql/updates/pending_db_world/command-syntax.sql diff --git a/data/sql/updates/pending_db_world/command-syntax.sql b/data/sql/updates/pending_db_world/command-syntax.sql new file mode 100644 index 00000000000000..44690096dbb2aa --- /dev/null +++ b/data/sql/updates/pending_db_world/command-syntax.sql @@ -0,0 +1,171 @@ +-- wp modify + +UPDATE `command` SET `help` = 'Syntax: .gobject set $subcommand +Type .gobject set to see the list of possible subcommands or .help gobject set $subcommand to see info on subcommands.' WHERE `name` = 'gobject set'; + +UPDATE `command` SET `help` = 'Syntax: .skirmish [arena] [XvX] [Nick1] [Nick2] ... [NickN] +[arena] can be \"all\" or comma-separated list of possible arenas (NA, BE, RL, DS, RV). +[XvX] can be 1v1, 2v2, 3v3, 5v5. After [XvX] specify enough nicknames for that mode.' WHERE `name` = 'skirmish'; + +UPDATE `command` SET `help` = 'Syntax: .bf $subcommand +Type .bf to see the list of possible subcommands or .help bf $subcommand to see info on subcommands.' WHERE `name` = 'bf'; + +UPDATE `command` SET `help` = 'Syntax: .debug entervehicle #entry #seatID +Enter the targeted or given vehicle ID in the given seat.' WHERE `name` = 'debug entervehicle'; + +UPDATE `command` SET `help` = 'Syntax: .debug getitemstate #itemState [unchanged/changed/new/removed/queue/check_all] +Returns all items in a given player''s inventory with a given item state.' WHERE `name` = 'debug getitemstate'; + +UPDATE `command` SET `help` = 'Syntax: .debug getitemvalue #GUID #index +Returns the value of the given index for the given item GUID.' WHERE `name` = 'debug getitemvalue'; + +UPDATE `command` SET `help` = 'Syntax: .debug getvalue #index #isInt +Returns either an integer or float value at a given index of your target.' WHERE `name` = 'debug getvalue'; + +UPDATE `command` SET `help` = 'Syntax: .debug hostile +Returns the hostile reference list of a given player.' WHERE `name` = 'debug hostile'; + +UPDATE `command` SET `help` = 'Syntax: .debug itemexpire #GUID +Destroy an item with the given GUID.' WHERE `name` = 'debug itemexpire'; + +UPDATE `command` SET `help` = 'Syntax: .debug lootrecipient +Returns the loot recipient of the targeted creature.' WHERE `name` = 'debug lootrecipient'; + +UPDATE `command` SET `help` = 'Syntax: .debug los +Returns line of sight status between you and your target.' WHERE `name` = 'debug los'; + +UPDATE `command` SET `help` = 'Syntax: .debug play $subcommand +Type .debug play to see the list of possible subcommands or .help debug play $subcommand to see info on subcommands.' WHERE `name` = 'debug play'; + +UPDATE `command` SET `help` = 'Syntax: .debug send $subcommand +Type .debug send to see the list of possible subcommands or .help debug send $subcommand to see info on subcommands.' WHERE `name` = 'debug send'; + +UPDATE `command` SET `help` = 'Syntax: .debug send buyerror #error +Sends the given buy error result.' WHERE `name` = 'debug send buyerror'; + +UPDATE `command` SET `help` = 'Syntax: .debug send channelnotify #type +Sends a channel notify message of the given type.' WHERE `name` = 'debug send channelnotify'; + +UPDATE `command` SET `help` = 'Syntax: .debug send chatmessage #type +Sends a chat message of the given type.', `name` = 'debug send chatmessage' WHERE `name` = 'debug send chatmmessage'; + +UPDATE `command` SET `help` = 'Syntax: .debug send equiperror #error +Sends the given equip error result.' WHERE `name` = 'debug send equiperror'; + +UPDATE `command` SET `help` = 'Syntax: .debug send largepacket +Sends a system message of 128 kilobytes.' WHERE `name` = 'debug send largepacket'; + +UPDATE `command` SET `help` = 'Syntax: .debug send opcode +Sends opcodes contained in "opcode.txt".' WHERE `name` = 'debug send opcode'; + +UPDATE `command` SET `help` = 'Syntax: .debug send qinvalidmsg #error +Sends the given quest error result.' WHERE `name` = 'debug send qinvalidmsg'; + +UPDATE `command` SET `help` = 'Syntax: .debug send qpartymsg #message +Sends the given party quest share message.' WHERE `name` = 'debug send qpartymsg'; + +UPDATE `command` SET `help` = 'Syntax: .debug send sellerror #error +Sends the given sell error result.' WHERE `name` = 'debug send sellerror'; + +UPDATE `command` SET `help` = 'Syntax: .debug send setphaseshift #phaseShift +Sends a phase shift message with the given phase shift value.' WHERE `name` = 'debug send setphaseshift'; + +UPDATE `command` SET `help` = 'Syntax: .debug send spellfail #result #failArgument1 #failArgument2 +Sends a spell failure message with the given result and argument values.' WHERE `name` = 'debug send spellfail'; + +UPDATE `command` SET `help` = 'Syntax: .debug setaurastate #state #apply +Sets the selected units aura state using the given apply value.' WHERE `name` = 'debug setaurastate'; + +UPDATE `command` SET `help` = 'Syntax: .debug setbit #index #bit +Sets the unsigned 32-bit integer value of the target at the given index to the given bit.' WHERE `name` = 'debug setbit'; + +UPDATE `command` SET `help` = 'Syntax: .debug setitemvalue #GUID #index #value +Sets the value of the given index for the given item GUID to the given value.' WHERE `name` = 'debug setitemvalue'; + +UPDATE `command` SET `help` = 'Syntax: .debug setvalue #index #value +Sets the unsigned 32-bit integer or float value of the target at the given index to the given value.' WHERE `name` = 'debug setvalue'; + +UPDATE `command` SET `help` = 'Syntax: .debug setvid #ID +Currently disabled. +Sets the given target''s vehicle ID to the given value.' WHERE `name` = 'debug setvid'; + +UPDATE `command` SET `help` = 'Syntax: .debug spawnvehicle #entry #ID +Creates a vehicle with the given ID.' WHERE `name` = 'debug spawnvehicle'; + +UPDATE `command` SET `help` = 'Syntax: .debug threat +Returns the threat list of a given creature.' WHERE `name` = 'debug threat'; + +UPDATE `command` SET `help` = 'Syntax: .debug update #index #value +Sets the unsigned 32-bit integer value of the target at the given index to the given bit.' WHERE `name` = 'debug update'; + +UPDATE `command` SET `help` = 'Syntax: .debug uws #variable #value +Sends a worldstate update for the given variable to the given value.' WHERE `name` = 'debug uws'; + +UPDATE `command` SET `help` = 'Syntax: .gobject set state #GUIDLow, #objectType, #objectState +Sets the byte value or sends a custom animation for a given gameobject GUID.' WHERE `name` = 'gobject set state'; + +UPDATE `command` SET `help` = 'Syntax: .learn all $subcommand +Type .learn all to see the list of possible subcommands or .help learn all $subcommand to see info on subcommands.' WHERE `name` = 'learn all'; + +UPDATE `command` SET `help` = 'Syntax: .learn all my $subcommand +Type .learn all my to see the list of possible subcommands or .help learn all my $subcommand to see info on subcommands.' WHERE `name` = 'learn all my'; + +UPDATE `command` SET `help` = 'Syntax: .lfg $subcommand +Type .lfg to see the list of possible subcommands or .help lfg $subcommand to see info on subcommands.' WHERE `name` = 'lfg'; + +UPDATE `command` SET `help` = 'Syntax: .lookup player $subcommand +Type .lookup player to see the list of possible subcommands or .help lookup player $subcommand to see info on subcommands.' WHERE `name` = 'lookup player'; + +UPDATE `command` SET `help` = 'Syntax: .npc near #distance +Returns all database creature spawns in a given distance.' WHERE `name` = 'npc near'; + +UPDATE `command` SET `help` = 'Syntax: .npc set $subcommand +Type .npc set to see the list of possible subcommands or .help npc set $subcommand to see info on subcommands.' WHERE `name` = 'npc set'; + +UPDATE `command` SET `help` = 'Syntax: .npc tame +Creates a player pet of the targeted creature.' WHERE `name` = 'npc tame'; + +UPDATE `command` SET `help` = 'Syntax: .reload npc_spellclick_spells +Reload npc_spellclick_spells table.' WHERE `name` = 'reload npc_spellclick_spells'; + +UPDATE `command` SET `help` = 'Syntax: .spect $subcommand +Type .spect to see the list of possible subcommands or .help spect $subcommand to see info on subcommands.' WHERE `name` = 'spect'; + +UPDATE `command` SET `help` = 'Syntax: .spect leave +Leave an arena you are spectating.' WHERE `name` = 'spect leave'; + +UPDATE `command` SET `help` = 'Syntax: .spect reset +Reset various values related to spectating.' WHERE `name` = 'spect reset'; + +UPDATE `command` SET `help` = 'Syntax: .spect spectate #name +Begin spectating the given player.' WHERE `name` = 'spect spectate'; + +UPDATE `command` SET `help` = 'Syntax: .spect version #version +Verify addon version for arena spectating.' WHERE `name` = 'spect version'; + +UPDATE `command` SET `help` = 'Syntax: .spect watch #name +Begin watching the given player.' WHERE `name` = 'spect watch'; + +UPDATE `command` SET `help` = 'Syntax: .ticket complete #ticketID +Mark a ticket of the given ID as complete.' WHERE `name` = 'ticket complete'; + +UPDATE `command` SET `help` = 'Syntax: .ticket escalate #ticketID +Add a ticket of the given ID to the escalation queue.' WHERE `name` = 'ticket escalate'; + +UPDATE `command` SET `help` = 'Syntax: .ticket escalatedlist +Return all open tickets in the escalation queue.' WHERE `name` = 'ticket escalatedlist'; + +UPDATE `command` SET `help` = 'Syntax: .ticket response $subcommand +Type .ticket response to see the list of possible subcommands or .help ticket response $subcommand to see info on subcommands.' WHERE `name` = 'ticket response'; + +UPDATE `command` SET `help` = 'Syntax: .ticket togglesystem +Toggle whether tickets are allowed or disallowed.' WHERE `name` = 'ticket togglesystem'; + +UPDATE `command` SET `help` = 'Syntax: .titles $subcommand +Type .titles to see the list of possible subcommands or .help titles $subcommand to see info on subcommands.' WHERE `name` = 'titles'; + +UPDATE `command` SET `help` = 'Syntax: .titles set $subcommand +Type .titles set to see the list of possible subcommands or .help titles set $subcommand to see info on subcommands.' WHERE `name` = 'titles set'; + +UPDATE `command` SET `help` = 'Syntax: .unban playeraccount #name +Unban accounts for character name pattern.' WHERE `name` = 'unban playeraccount'; diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 93fe67cc3cf5e8..b57ff6ccc327cd 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -64,7 +64,7 @@ class debug_commandscript : public CommandScript { { "buyerror", HandleDebugSendBuyErrorCommand, SEC_ADMINISTRATOR, Console::No }, { "channelnotify", HandleDebugSendChannelNotifyCommand, SEC_ADMINISTRATOR, Console::No }, - { "chatmmessage", HandleDebugSendChatMsgCommand, SEC_ADMINISTRATOR, Console::No }, + { "chatmessage", HandleDebugSendChatMsgCommand, SEC_ADMINISTRATOR, Console::No }, { "equiperror", HandleDebugSendEquipErrorCommand, SEC_ADMINISTRATOR, Console::No }, { "largepacket", HandleDebugSendLargePacketCommand, SEC_ADMINISTRATOR, Console::No }, { "opcode", HandleDebugSendOpcodeCommand, SEC_ADMINISTRATOR, Console::No }, diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index db29dcb36eeddf..94ccfb6eb5e625 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -157,9 +157,6 @@ class misc_commandscript : public CommandScript if (args.empty() || !tokens.size()) { - handler->PSendSysMessage("Usage: .skirmish [arena] [XvX] [Nick1] [Nick2] ... [NickN]"); - handler->PSendSysMessage("[arena] can be \"all\" or comma-separated list of possible arenas (NA, BE, RL, DS, RV)."); - handler->PSendSysMessage("[XvX] can be 1v1, 2v2, 3v3, 5v5. After [XvX] specify enough nicknames for that mode."); handler->SetSentErrorMessage(true); return false; } From a35f0c4ef61f20dd88fffff4ac5864830c4c0daf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 16 Sep 2024 15:13:36 +0000 Subject: [PATCH 13/20] chore(DB): import pending files Referenced commit(s): 07c54fe8c7c0eb32ba51d52e3f6bbc34005239ab --- .../command-syntax.sql => db_world/2024_09_16_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/command-syntax.sql => db_world/2024_09_16_00.sql} (99%) diff --git a/data/sql/updates/pending_db_world/command-syntax.sql b/data/sql/updates/db_world/2024_09_16_00.sql similarity index 99% rename from data/sql/updates/pending_db_world/command-syntax.sql rename to data/sql/updates/db_world/2024_09_16_00.sql index 44690096dbb2aa..501e67711f3019 100644 --- a/data/sql/updates/pending_db_world/command-syntax.sql +++ b/data/sql/updates/db_world/2024_09_16_00.sql @@ -1,3 +1,4 @@ +-- DB update 2024_09_15_01 -> 2024_09_16_00 -- wp modify UPDATE `command` SET `help` = 'Syntax: .gobject set $subcommand From 5af3d2d650e4615aff39ccd1adf2a0c71962f084 Mon Sep 17 00:00:00 2001 From: Grimdhex <176165533+Grimdhex@users.noreply.github.com> Date: Wed, 18 Sep 2024 11:52:16 +0200 Subject: [PATCH 14/20] fix(Scripts/BlackTemple): Flames of Azzinoth - Fix the charge logic (#19968) fix(Scripts/BlackTemple): fix the charge mechanic of Flames of Azzinoth * remove also a old duplicate check in a spell script --- .../scripts/Outland/BlackTemple/boss_illidan.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index a181d6fba8f6ed..0c131834c071be 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -1313,7 +1313,7 @@ struct npc_flame_of_azzinoth : public ScriptedAI { ScheduleTimedEvent(10s, [&] { if (Creature* _blade = ObjectAccessor::GetCreature(*me, _bladeGUID)) - if (Unit* target = _blade->AI()->SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true)) + if (Unit* target = _blade->AI()->SelectTarget(SelectTargetMethod::Random, 0, -40.0f, true)) DoCast(target, SPELL_CHARGE); }, 5s, 20s); @@ -1463,16 +1463,6 @@ class spell_illidan_tear_of_azzinoth_summon_channel_aura : public AuraScript GetTarget()->CastSpell(GetTarget(), SPELL_UNCAGED_WRATH, true); } } - - // xinef: ugly hax, dunno how it really works on blizz - Map::PlayerList const& pl = GetTarget()->GetMap()->GetPlayers(); - for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr) - if (Player* player = itr->GetSource()) - if (player->GetPositionX() > 693.4f || player->GetPositionY() < 271.8f || player->GetPositionX() < 658.43f || player->GetPositionY() > 338.68f) - { - GetTarget()->CastSpell(player, SPELL_CHARGE, true); - break; - } } void Register() override From dbde182ecdcf3ebe392943c2b34adae1fdf00110 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Thu, 19 Sep 2024 05:24:11 +0200 Subject: [PATCH 15/20] =?UTF-8?q?refactor(Deps/MySQL):=20Drop=20MariaDB=20?= =?UTF-8?q?and=20MySQL=205.7/8.1=20and=20add=20MySQL=208.=E2=80=A6=20(#194?= =?UTF-8?q?51)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/SECURITY.md | 43 ++++---- data/sql/create/drop_mysql.sql | 14 +-- data/sql/create/drop_mysql_8.sql | 9 -- src/cmake/macros/FindMySQL.cmake | 98 ++----------------- src/cmake/showoptions.cmake | 1 - .../apps/authserver/authserver.conf.dist | 3 +- src/server/apps/worldserver/Main.cpp | 6 -- .../database/Database/DatabaseWorkerPool.cpp | 22 +---- .../database/Database/DatabaseWorkerPool.h | 20 +--- .../database/Database/MySQLConnection.cpp | 14 +-- src/server/database/Updater/DBUpdater.cpp | 9 -- src/tools/dbimport/dbimport.conf.dist | 2 +- 12 files changed, 37 insertions(+), 204 deletions(-) delete mode 100644 data/sql/create/drop_mysql_8.sql diff --git a/.github/SECURITY.md b/.github/SECURITY.md index e7b138f777ca91..fbabc2817ede80 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -15,23 +15,16 @@ Versions of AzerothCore: | AzerothCore Branch | Supported | | ------------------ | ------------------ | | master | :white_check_mark: | +| Any playerbot fork | :red_circle: | +| Any NPCBot fork | :red_circle: | Versions of MySQL: | MySQL Version | Supported | | ------------- | ------------------ | -| 8.1 | :white_check_mark: | +| 8.4 | :white_check_mark: | | 8.0 | :white_check_mark: | -| 5.7 | :white_check_mark: | -| 5.6 and lower | :red_circle: | - -Versions of MariaDB: - -| MariaDB Version | Supported | -| --------------- | ------------------ | -| 10.6 | :white_check_mark: | -| 10.5 | :white_check_mark: | -| 10.4 and lower | :red_circle: | +| 5.7 and lower | :red_circle: | Versions of CLang: @@ -43,26 +36,26 @@ Versions of CLang: Versions of GCC: -| GCC Version | Supported | -| ----------- | ------------------ | -| 14 | :white_check_mark: | -| 12 | :white_check_mark: | -| 11 and lower| :red_circle: | +| GCC Version | Supported | +| ------------ | ------------------ | +| 14 | :white_check_mark: | +| 12 | :white_check_mark: | +| 11 and lower | :red_circle: | Versions of Ubuntu: -| Ubuntu version | Supported | -| -------------- | ------------------ | -| 24.04 | :white_check_mark: | -| 22.04 | :white_check_mark: | -| 20.04 and lower| :red_circle: | +| Ubuntu version | Supported | +| --------------- | ------------------ | +| 24.04 | :white_check_mark: | +| 22.04 | :white_check_mark: | +| 20.04 and lower | :red_circle: | Versions of macOS: -| macOS Version | Supported | -| -------------- | ------------------ | -| 12 | :white_check_mark: | -| 11 and lower | :red_circle: | +| macOS Version | Supported | +| ------------- | ------------------ | +| 12 | :white_check_mark: | +| 11 and lower | :red_circle: | **Note**: We do NOT support any repacks that may or may not have been made based on AzerothCore. This is because they are usually based on older versions and there is no way to know what is in the precompiled binaries. Instead, you should compile your binaries from the AzerothCore source. To get started, read the [Installation Guide](https://www.azerothcore.org/wiki/installation). diff --git a/data/sql/create/drop_mysql.sql b/data/sql/create/drop_mysql.sql index 8b8d66f284b3f9..669e2538bc9819 100644 --- a/data/sql/create/drop_mysql.sql +++ b/data/sql/create/drop_mysql.sql @@ -1,16 +1,4 @@ -REVOKE ALL PRIVILEGES ON * . * FROM 'acore'@'localhost'; - -REVOKE ALL PRIVILEGES ON `acore_world` . * FROM 'acore'@'localhost'; - -REVOKE GRANT OPTION ON `acore_world` . * FROM 'acore'@'localhost'; - -REVOKE ALL PRIVILEGES ON `acore_characters` . * FROM 'acore'@'localhost'; - -REVOKE GRANT OPTION ON `acore_characters` . * FROM 'acore'@'localhost'; - -REVOKE ALL PRIVILEGES ON `acore_auth` . * FROM 'acore'@'localhost'; - -REVOKE GRANT OPTION ON `acore_auth` . * FROM 'acore'@'localhost'; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'acore'@'localhost'; DROP USER 'acore'@'localhost'; diff --git a/data/sql/create/drop_mysql_8.sql b/data/sql/create/drop_mysql_8.sql deleted file mode 100644 index 669e2538bc9819..00000000000000 --- a/data/sql/create/drop_mysql_8.sql +++ /dev/null @@ -1,9 +0,0 @@ -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'acore'@'localhost'; - -DROP USER 'acore'@'localhost'; - -DROP DATABASE IF EXISTS `acore_world`; - -DROP DATABASE IF EXISTS `acore_characters`; - -DROP DATABASE IF EXISTS `acore_auth`; diff --git a/src/cmake/macros/FindMySQL.cmake b/src/cmake/macros/FindMySQL.cmake index 09a7fd1df4dc27..32a577573793ba 100644 --- a/src/cmake/macros/FindMySQL.cmake +++ b/src/cmake/macros/FindMySQL.cmake @@ -24,77 +24,6 @@ set( MYSQL_FOUND 0 ) -# Find MariaDB for Windows -if (WIN32) - # Set know versions MariaDB - set(_MARIADB_KNOWN_VERSIONS "MariaDB 10.9" "MariaDB 10.8" "MariaDB 10.7" "MariaDB 10.6" "MariaDB 10.5") - - # Set default options - set(MARIADB_FOUND_LIB 0) - set(MARIADB_FOUND_INCLUDE 0) - set(MARIADB_FOUND_EXECUTABLE 0) - set(MARIADB_FOUND 0) - - macro(FindLibMariaDB MariaDBVersion) - # Find include - find_path(MYSQL_INCLUDE_DIR - NAMES - mysql.h - PATHS - ${MYSQL_ADD_INCLUDE_PATH} - "$ENV{ProgramW6432}/${MariaDBVersion}/include/mysql" - "$ENV{ProgramFiles}/${MariaDBVersion}/include/mysql" - "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/mysql" - DOC - "Specify the directory containing mysql.h." - ) - - if(MYSQL_INCLUDE_DIR) - set(MARIADB_FOUND_INCLUDE 1) - endif() - - find_library(MYSQL_LIBRARY - NAMES - libmariadb - PATHS - ${MYSQL_ADD_LIBRARIES_PATH} - "$ENV{ProgramW6432}/${MariaDBVersion}/lib" - "$ENV{ProgramW6432}/${MariaDBVersion}/lib/opt" - "$ENV{ProgramFiles}/${MariaDBVersion}/lib" - "$ENV{ProgramFiles}/${MariaDBVersion}/lib/opt" - "$ENV{SystemDrive}/${MariaDBVersion}/lib/opt" - "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" - DOC - "Specify the location of the mysql library here." - ) - - if(MYSQL_LIBRARY) - set(MARIADB_FOUND_LIB 1) - endif() - - find_program(MYSQL_EXECUTABLE mysql - PATHS - "$ENV{ProgramW6432}/${MariaDBVersion}/bin" - "$ENV{ProgramW6432}/${MariaDBVersion}/bin/opt" - "$ENV{ProgramFiles}/${MariaDBVersion}/bin" - "$ENV{ProgramFiles}/${MariaDBVersion}/bin/opt" - "$ENV{SystemDrive}/${MariaDBVersion}/bin/opt" - DOC - "path to your mysql binary.") - - if (MYSQL_LIBRARY AND MYSQL_INCLUDE_DIR AND MYSQL_EXECUTABLE) - set(MARIADB_FOUND 1) - endif() - - endmacro(FindLibMariaDB) - - foreach(version ${_MARIADB_KNOWN_VERSIONS}) - if (NOT MARIADB_FOUND) - FindLibMariaDB(${version}) - endif() - endforeach() -endif() - if( UNIX ) set(MYSQL_CONFIG_PREFER_PATH "$ENV{MYSQL_HOME}/bin" CACHE FILEPATH "preferred path to MySQL (mysql_config)" @@ -156,15 +85,12 @@ find_path(MYSQL_INCLUDE_DIR /usr/local/include/mysql /usr/local/mysql/include "C:/tools/mysql/current/include" # chocolatey package - "$ENV{ProgramW6432}/MySQL/MySQL Server 8.1/include" + "$ENV{ProgramW6432}/MySQL/MySQL Server 8.4/include" + "$ENV{ProgramFiles}/MySQL/MySQL Server 8.4/include" + "$ENV{SystemDrive}/MySQL/MySQL Server 8.4/include" "$ENV{ProgramW6432}/MySQL/MySQL Server 8.0/include" - "$ENV{ProgramW6432}/MySQL/MySQL Server 5.7/include" - "$ENV{ProgramFiles}/MySQL/MySQL Server 8.1/include" "$ENV{ProgramFiles}/MySQL/MySQL Server 8.0/include" - "$ENV{ProgramFiles}/MySQL/MySQL Server 5.7/include" - "$ENV{SystemDrive}/MySQL/MySQL Server 8.1/include" "$ENV{SystemDrive}/MySQL/MySQL Server 8.0/include" - "$ENV{SystemDrive}/MySQL/MySQL Server 5.7/include" "$ENV{MYSQL_INCLUDE_DIR}" "$ENV{MYSQL_DIR}/include" DOC @@ -195,15 +121,12 @@ if( WIN32 ) PATHS ${MYSQL_ADD_LIBRARIES_PATH} "C:/tools/mysql/current/lib" # chocolatey package - "$ENV{ProgramW6432}/MySQL/MySQL Server 8.1/lib" + "$ENV{ProgramW6432}/MySQL/MySQL Server 8.4/lib" + "$ENV{ProgramFiles}/MySQL/MySQL Server 8.4/lib" + "$ENV{SystemDrive}/MySQL/MySQL Server 8.4/lib" "$ENV{ProgramW6432}/MySQL/MySQL Server 8.0/lib" - "$ENV{ProgramW6432}/MySQL/MySQL Server 5.7/lib" - "$ENV{ProgramFiles}/MySQL/MySQL Server 8.1/lib" "$ENV{ProgramFiles}/MySQL/MySQL Server 8.0/lib" - "$ENV{ProgramFiles}/MySQL/MySQL Server 5.7/lib" - "$ENV{SystemDrive}/MySQL/MySQL Server 8.1/lib" "$ENV{SystemDrive}/MySQL/MySQL Server 8.0/lib" - "$ENV{SystemDrive}/MySQL/MySQL Server 5.7/lib" "$ENV{MYSQL_LIBRARY}" "$ENV{MYSQL_DIR}/lib" DOC "Specify the location of the mysql library here." @@ -242,15 +165,12 @@ if( WIN32 ) find_program(MYSQL_EXECUTABLE mysql PATHS "C:/tools/mysql/current/bin" # chocolatey package - "$ENV{ProgramW6432}/MySQL/MySQL Server 8.1/bin" + "$ENV{ProgramW6432}/MySQL/MySQL Server 8.4/bin" + "$ENV{ProgramFiles}/MySQL/MySQL Server 8.4/bin" + "$ENV{SystemDrive}/MySQL/MySQL Server 8.4/bin" "$ENV{ProgramW6432}/MySQL/MySQL Server 8.0/bin" - "$ENV{ProgramW6432}/MySQL/MySQL Server 5.7/bin" - "$ENV{ProgramFiles}/MySQL/MySQL Server 8.1/bin" "$ENV{ProgramFiles}/MySQL/MySQL Server 8.0/bin" - "$ENV{ProgramFiles}/MySQL/MySQL Server 5.7/bin" - "$ENV{SystemDrive}/MySQL/MySQL Server 8.1/bin" "$ENV{SystemDrive}/MySQL/MySQL Server 8.0/bin" - "$ENV{SystemDrive}/MySQL/MySQL Server 5.7/bin" "$ENV{MYSQL_ROOT}/bin" DOC "path to your mysql binary.") diff --git a/src/cmake/showoptions.cmake b/src/cmake/showoptions.cmake index 7111990b6f64ad..443584127de805 100644 --- a/src/cmake/showoptions.cmake +++ b/src/cmake/showoptions.cmake @@ -153,7 +153,6 @@ if(WITH_STRICT_DATABASE_TYPE_CHECKS) message(" *** WITH_STRICT_DATABASE_TYPE_CHECKS - WARNING!") message(" *** Validates uses of database Get***() functions from Field class") message(" *** invalid calls will result in returning value 0") - message(" *** NOT COMPATIBLE WITH MARIADB!") add_definitions(-DACORE_STRICT_DATABASE_TYPE_CHECKS) endif() diff --git a/src/server/apps/authserver/authserver.conf.dist b/src/server/apps/authserver/authserver.conf.dist index 6cd737219189a8..13f2f7063dd5b0 100644 --- a/src/server/apps/authserver/authserver.conf.dist +++ b/src/server/apps/authserver/authserver.conf.dist @@ -176,8 +176,7 @@ SourceDirectory = "" # MySQLExecutable # Description: The path to your MySQL CLI binary. # If the path is left empty, built-in path from cmake is used. -# Example: "C:/Program Files/MariaDB 10.5/bin/mysql.exe" -# "C:/Program Files/MySQL/MySQL Server 8.0/bin/mysql.exe" +# Example: "C:/Program Files/MySQL/MySQL Server 8.4/bin/mysql.exe" # "mysql.exe" # "/usr/bin/mysql" # Default: "" diff --git a/src/server/apps/worldserver/Main.cpp b/src/server/apps/worldserver/Main.cpp index 0b485bffadf4cb..68fb037e839ca5 100644 --- a/src/server/apps/worldserver/Main.cpp +++ b/src/server/apps/worldserver/Main.cpp @@ -386,12 +386,6 @@ int main(int argc, char** argv) sScriptMgr->OnStartup(); -// Be kind and warn people of EOL deprecation :) -#if !defined(MARIADB_VERSION_ID) - if (MySQL::GetLibraryVersion() < 80000) - LOG_WARN("server", "WARNING: You are using MySQL version 5.7 which is soon EOL!\nThis version will be deprecated. Consider upgrading to MySQL 8.0 or 8.1!"); -#endif - // Launch CliRunnable thread std::shared_ptr cliThread; #if AC_PLATFORM == AC_PLATFORM_WINDOWS diff --git a/src/server/database/Database/DatabaseWorkerPool.cpp b/src/server/database/Database/DatabaseWorkerPool.cpp index 3be45ed401d222..0fd20d4b479529 100644 --- a/src/server/database/Database/DatabaseWorkerPool.cpp +++ b/src/server/database/Database/DatabaseWorkerPool.cpp @@ -59,15 +59,10 @@ DatabaseWorkerPool::DatabaseWorkerPool() : { WPFatal(mysql_thread_safe(), "Used MySQL library isn't thread-safe."); -#if !defined(MARIADB_VERSION_ID) || MARIADB_VERSION_ID < 100600 bool isSupportClientDB = mysql_get_client_version() >= MIN_MYSQL_CLIENT_VERSION; bool isSameClientDB = mysql_get_client_version() == MYSQL_VERSION_ID; -#else // MariaDB 10.6+ - bool isSupportClientDB = mysql_get_client_version() >= MIN_MYSQL_CLIENT_VERSION; - bool isSameClientDB = true; // Client version 3.2.3? -#endif - WPFatal(isSupportClientDB, "AzerothCore does not support MySQL versions below 5.7 or MariaDB versions below 10.5.\n\nFound version: {} / {}. Server compiled with: {}.\nSearch the wiki for ACE00043 in Common Errors (https://www.azerothcore.org/wiki/common-errors#ace00043).", + WPFatal(isSupportClientDB, "AzerothCore does not support MySQL versions below 8.0\n\nFound version: {} / {}. Server compiled with: {}.\nSearch the wiki for ACE00043 in Common Errors (https://www.azerothcore.org/wiki/common-errors#ace00043).", mysql_get_client_info(), mysql_get_client_version(), MYSQL_VERSION_ID); WPFatal(isSameClientDB, "Used MySQL library version ({} id {}) does not match the version id used to compile AzerothCore (id {}).\nSearch the wiki for ACE00046 in Common Errors (https://www.azerothcore.org/wiki/common-errors#ace00046).", mysql_get_client_info(), mysql_get_client_version(), MYSQL_VERSION_ID); @@ -378,8 +373,6 @@ void DatabaseWorkerPool::KeepAlive() * * DatabaseIncompatibleVersion("8.0.35") => false * DatabaseIncompatibleVersion("5.6.6") => true -* DatabaseIncompatibleVersion("5.5.5-10.5.5-MariaDB") => false -* DatabaseIncompatibleVersion("5.5.5-10.4.0-MariaDB") => true * * Adapted from stackoverflow response * https://stackoverflow.com/a/2941508 @@ -410,17 +403,6 @@ bool DatabaseIncompatibleVersion(std::string const mysqlVersion) uint8 offset = 0; std::string minVersion = MIN_MYSQL_SERVER_VERSION; - // If the version string contains "MariaDB", use that - if (mysqlVersion.find("MariaDB") != std::string::npos) - { - // All MariaDB 10.X versions have a prefix of 5.5.5 from the - // mysql_get_server_info() function. To make matters more - // annoying, this is removed in MariaDB 11.X - if (mysqlVersion.rfind("5.5.5-", 0) == 0) - offset = 6; - minVersion = MIN_MARIADB_SERVER_VERSION; - } - auto parsedMySQLVersion = parse(mysqlVersion.substr(offset)); auto parsedMinVersion = parse(minVersion); @@ -455,7 +437,7 @@ uint32 DatabaseWorkerPool::OpenConnections(InternalIndex type, uint8 numConne } else if (DatabaseIncompatibleVersion(connection->GetServerInfo())) { - LOG_ERROR("sql.driver", "AzerothCore does not support MySQL versions below 5.7 or MariaDB versions below 10.5.\n\nFound server version: {}. Server compiled with: {}.", + LOG_ERROR("sql.driver", "AzerothCore does not support MySQL versions below 8.0\n\nFound server version: {}. Server compiled with: {}.", connection->GetServerInfo(), MYSQL_VERSION_ID); return 1; } diff --git a/src/server/database/Database/DatabaseWorkerPool.h b/src/server/database/Database/DatabaseWorkerPool.h index 233fd5cf21275c..fb11b2a4ababbf 100644 --- a/src/server/database/Database/DatabaseWorkerPool.h +++ b/src/server/database/Database/DatabaseWorkerPool.h @@ -26,31 +26,17 @@ /** @file DatabaseWorkerPool.h */ -/** -* @def MIN_MYSQL_CLIENT_VERSION -* The minimum MariaDB Client Version -* MARIADB_VERSION_ID is defined if using libmariadbclient instead of libmysqlclient -*/ -#if MARIADB_VERSION_ID >= 100600 -#define MIN_MYSQL_CLIENT_VERSION 30203u -#else /** * @def MIN_MYSQL_CLIENT_VERSION * The minimum MySQL Client Version */ -#define MIN_MYSQL_CLIENT_VERSION 50700u -#endif +#define MIN_MYSQL_CLIENT_VERSION 80000u /** * @def MIN_MYSQL_SERVER_VERSION * The minimum MySQL Server Version */ -#define MIN_MYSQL_SERVER_VERSION "5.7.0" -/** -* @def MIN_MARIADB_SERVER_VERSION -* The minimum MariaDB Server Version -*/ -#define MIN_MARIADB_SERVER_VERSION "10.5.0" +#define MIN_MYSQL_SERVER_VERSION "8.0.0" template class ProducerConsumerQueue; @@ -253,4 +239,4 @@ class DatabaseWorkerPool #endif }; -#endif +#endif // _DATABASEWORKERPOOL_H diff --git a/src/server/database/Database/MySQLConnection.cpp b/src/server/database/Database/MySQLConnection.cpp index 54c393c75b0901..7303ea82fa7262 100644 --- a/src/server/database/Database/MySQLConnection.cpp +++ b/src/server/database/Database/MySQLConnection.cpp @@ -130,7 +130,6 @@ uint32 MySQLConnection::Open() if (m_connectionInfo.ssl != "") { -#if !defined(MARIADB_VERSION_ID) && MYSQL_VERSION_ID >= 80000 mysql_ssl_mode opt_use_ssl = SSL_MODE_DISABLED; if (m_connectionInfo.ssl == "ssl") { @@ -138,15 +137,6 @@ uint32 MySQLConnection::Open() } mysql_options(mysqlInit, MYSQL_OPT_SSL_MODE, (char const*)&opt_use_ssl); -#else - MySQLBool opt_use_ssl = MySQLBool(0); - if (m_connectionInfo.ssl == "ssl") - { - opt_use_ssl = MySQLBool(1); - } - - mysql_options(mysqlInit, MYSQL_OPT_SSL_ENFORCE, (char const*)&opt_use_ssl); -#endif } m_Mysql = reinterpret_cast(mysql_real_connect(mysqlInit, m_connectionInfo.host.c_str(), m_connectionInfo.user.c_str(), @@ -227,7 +217,7 @@ bool MySQLConnection::Execute(PreparedStatementBase* stmt) uint32 _s = getMSTime(); -#if !defined(MARIADB_VERSION_ID) && (MYSQL_VERSION_ID >= 80300) +#if MYSQL_VERSION_ID >= 80300 if (mysql_stmt_bind_named_param(msql_STMT, msql_BIND, m_mStmt->GetParameterCount(), nullptr)) #else if (mysql_stmt_bind_param(msql_STMT, msql_BIND)) @@ -279,7 +269,7 @@ bool MySQLConnection::_Query(PreparedStatementBase* stmt, MySQLPreparedStatement uint32 _s = getMSTime(); -#if !defined(MARIADB_VERSION_ID) && (MYSQL_VERSION_ID >= 80300) +#if MYSQL_VERSION_ID >= 80300 if (mysql_stmt_bind_named_param(msql_STMT, msql_BIND, m_mStmt->GetParameterCount(), nullptr)) #else if (mysql_stmt_bind_param(msql_STMT, msql_BIND)) diff --git a/src/server/database/Updater/DBUpdater.cpp b/src/server/database/Updater/DBUpdater.cpp index 7b3ead0669275e..ee35fc5e6f40dd 100644 --- a/src/server/database/Updater/DBUpdater.cpp +++ b/src/server/database/Updater/DBUpdater.cpp @@ -493,18 +493,9 @@ void DBUpdater::ApplyFile(DatabaseWorkerPool& pool, std::string const& hos // Set max allowed packet to 1 GB args.emplace_back("--max-allowed-packet=1GB"); -#if !defined(MARIADB_VERSION_ID) && MYSQL_VERSION_ID >= 80000 - if (ssl == "ssl") args.emplace_back("--ssl-mode=REQUIRED"); -#else - - if (ssl == "ssl") - args.emplace_back("--ssl"); - -#endif - // Execute sql file args.emplace_back("-e"); args.emplace_back(Acore::StringFormat("BEGIN; SOURCE {}; COMMIT;", path.generic_string())); diff --git a/src/tools/dbimport/dbimport.conf.dist b/src/tools/dbimport/dbimport.conf.dist index 37ea25e5e704d3..c4c38e937cbd8a 100644 --- a/src/tools/dbimport/dbimport.conf.dist +++ b/src/tools/dbimport/dbimport.conf.dist @@ -54,7 +54,7 @@ SourceDirectory = "" # MySQLExecutable # Description: The path to your MySQL CLI binary. # If the path is left empty, built-in path from cmake is used. -# Example: "C:/Program Files/MariaDB 10.9/bin/mysql.exe" +# Example: "C:/Program Files/MySQL Server 8.4/bin/mysql.exe" # "mysql.exe" # "/usr/bin/mysql" # Default: "" From a0057b9e90c8e659dadb107010f224ba9c80e44a Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Thu, 19 Sep 2024 08:49:56 -0400 Subject: [PATCH 16/20] fix(Core/Spells): Resolve a case of triggered spells prolonging combat. (#19991) * Revert "fix(Core/Spells): Revert triggered spell logic change. (#19983)" This reverts commit 3bb5ec779d217e8beedf7e42f8f8146312d2c1db. * Add aura effect check. Co-Authored-By: Anton Popovichenko * Add comment, use target instead of owner. * Adjust comment terminology. --------- Co-authored-by: Anton Popovichenko --- src/server/game/Entities/Unit/Unit.cpp | 24 +++++++++++++++++++----- src/server/game/Spells/Spell.cpp | 3 ++- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 3e552068e41fcc..fde228d5d457f6 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -20228,13 +20228,24 @@ void Unit::OutDebugInfo() const class AuraMunchingQueue : public BasicEvent { public: - AuraMunchingQueue(Unit& owner, ObjectGuid targetGUID, int32 basePoints, uint32 spellId) : _owner(owner), _targetGUID(targetGUID), _basePoints(basePoints), _spellId(spellId) { } + AuraMunchingQueue(Unit& owner, ObjectGuid targetGUID, int32 basePoints, uint32 spellId, AuraEffect* aurEff, AuraType auraType) : _owner(owner), _targetGUID(targetGUID), _basePoints(basePoints), _spellId(spellId), _aurEff(aurEff), _auraType(auraType) { } bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/) override { if (_owner.IsInWorld() && _owner.FindMap()) if (Unit* target = ObjectAccessor::GetUnit(_owner, _targetGUID)) - _owner.CastCustomSpell(_spellId, SPELLVALUE_BASE_POINT0, _basePoints, target, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_NO_PERIODIC_RESET), nullptr, nullptr, _owner.GetGUID()); + { + bool auraFound = false; // Used to ensure _aurEff exists to avoid wild pointer access/crash + Unit::AuraEffectList const& auraEffects = target->GetAuraEffectsByType(_auraType); + for (Unit::AuraEffectList::const_iterator j = auraEffects.begin(); j != auraEffects.end(); ++j) + if ((*j) == _aurEff) + auraFound = true; + + if (!auraFound) + _aurEff = nullptr; + + _owner.CastCustomSpell(_spellId, SPELLVALUE_BASE_POINT0, _basePoints, target, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_NO_PERIODIC_RESET), nullptr, _aurEff, _owner.GetGUID()); + } return true; } @@ -20244,13 +20255,16 @@ class AuraMunchingQueue : public BasicEvent ObjectGuid _targetGUID; int32 _basePoints; uint32 _spellId; + AuraEffect* _aurEff; + AuraType _auraType; }; void Unit::CastDelayedSpellWithPeriodicAmount(Unit* caster, uint32 spellId, AuraType auraType, int32 addAmount, uint8 effectIndex) { + AuraEffect* aurEff = nullptr; for (AuraEffectList::iterator i = m_modAuras[auraType].begin(); i != m_modAuras[auraType].end(); ++i) { - AuraEffect* aurEff = *i; + aurEff = *i; if (aurEff->GetCasterGUID() != caster->GetGUID() || aurEff->GetId() != spellId || aurEff->GetEffIndex() != effectIndex || !aurEff->GetTotalTicks()) continue; @@ -20260,9 +20274,9 @@ void Unit::CastDelayedSpellWithPeriodicAmount(Unit* caster, uint32 spellId, Aura // xinef: delay only for casting on different unit if (this == caster || !sWorld->getBoolConfig(CONFIG_MUNCHING_BLIZZLIKE)) - caster->CastCustomSpell(spellId, SPELLVALUE_BASE_POINT0, addAmount, this, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_NO_PERIODIC_RESET), nullptr, nullptr, caster->GetGUID()); + caster->CastCustomSpell(spellId, SPELLVALUE_BASE_POINT0, addAmount, this, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_NO_PERIODIC_RESET), nullptr, aurEff, caster->GetGUID()); else - caster->m_Events.AddEvent(new AuraMunchingQueue(*caster, GetGUID(), addAmount, spellId), caster->m_Events.CalculateQueueTime(400)); + caster->m_Events.AddEvent(new AuraMunchingQueue(*caster, GetGUID(), addAmount, spellId, aurEff, auraType), caster->m_Events.CalculateQueueTime(400)); } void Unit::SendClearTarget() diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 24d07cc9452347..e26a2a087ab4e2 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2931,7 +2931,8 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target) { if (missInfo != SPELL_MISS_EVADE && !m_caster->IsFriendlyTo(effectUnit) && (!m_spellInfo->IsPositive() || m_spellInfo->HasEffect(SPELL_EFFECT_DISPEL))) { - m_caster->CombatStart(effectUnit, !(m_spellInfo->AttributesEx3 & SPELL_ATTR3_SUPRESS_TARGET_PROCS)); + if (!m_triggeredByAuraSpell.spellInfo || (!(m_triggeredByAuraSpell.spellInfo->Effects[m_triggeredByAuraSpell.effectIndex].TriggerSpell == m_spellInfo->Id) && !(m_triggeredByAuraSpell.spellInfo->IsAuraEffectEqual(m_spellInfo)))) + m_caster->CombatStart(effectUnit, !(m_spellInfo->AttributesEx3 & SPELL_ATTR3_SUPRESS_TARGET_PROCS)); // Patch 3.0.8: All player spells which cause a creature to become aggressive to you will now also immediately cause the creature to be tapped. if (effectUnit->IsInCombatWith(m_caster)) From a196f7f28aa263dc7f9c532e15839f3b409fb68f Mon Sep 17 00:00:00 2001 From: skelUA Date: Thu, 19 Sep 2024 16:11:31 +0300 Subject: [PATCH 17/20] fix(Core/Loot) fix bug with loot (#19882) Try to fix bug with loot --- src/server/game/Groups/Group.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index 7bd5cef5b69ad3..91191514650cb8 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -994,7 +994,7 @@ bool CanRollOnItem(LootItem const& item, Player const* player, Loot* loot) return false; uint32 itemCount = player->GetItemCount(item.itemid); - if ((proto->MaxCount > 0 && static_cast(itemCount) >= proto->MaxCount) || (player->CanEquipUniqueItem(proto) != EQUIP_ERR_OK)) + if ((proto->MaxCount > 0 && static_cast(itemCount) >= proto->MaxCount)) return false; if (!item.AllowedForPlayer(player, loot->sourceWorldObjectGUID)) From 1d899cf3c91c926ef5cc257b402a4c008a7a42ea Mon Sep 17 00:00:00 2001 From: Mattia Date: Fri, 20 Sep 2024 23:18:29 +0200 Subject: [PATCH 18/20] Fix(db/creature) black temple illidari assassin riposte ability missing (#19957) * fix(DB/Creature) Black Temple - Illidari Assassin: Riposte ability missing * fix(DB/Creature): Black Temple - Illidari Assassin: Riposte ability missing * Update 2024_09_13_00.sql * bitwise method --- data/sql/updates/pending_db_world/2024_09_13_00.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/2024_09_13_00.sql diff --git a/data/sql/updates/pending_db_world/2024_09_13_00.sql b/data/sql/updates/pending_db_world/2024_09_13_00.sql new file mode 100644 index 00000000000000..ef390343830756 --- /dev/null +++ b/data/sql/updates/pending_db_world/2024_09_13_00.sql @@ -0,0 +1,5 @@ +UPDATE `creature_template` SET `flags_extra` = `flags_extra` | 134217728 WHERE `entry` = 23403; + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 23403) AND (`source_type` = 0) AND (`id` IN (2)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(23403, 0, 2, 0, 0, 0, 100, 0, 0, 15000, 30000, 40000, 0, 0, 11, 41392, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Illidari Assassin - In Combat - Cast Riposte'); From eda0df70f16317af1f5c861c81d7ab1502394d7b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 20 Sep 2024 21:19:22 +0000 Subject: [PATCH 19/20] chore(DB): import pending files Referenced commit(s): 1d899cf3c91c926ef5cc257b402a4c008a7a42ea --- .../2024_09_13_00.sql => db_world/2024_09_20_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/2024_09_13_00.sql => db_world/2024_09_20_00.sql} (95%) diff --git a/data/sql/updates/pending_db_world/2024_09_13_00.sql b/data/sql/updates/db_world/2024_09_20_00.sql similarity index 95% rename from data/sql/updates/pending_db_world/2024_09_13_00.sql rename to data/sql/updates/db_world/2024_09_20_00.sql index ef390343830756..5da54ef560ff02 100644 --- a/data/sql/updates/pending_db_world/2024_09_13_00.sql +++ b/data/sql/updates/db_world/2024_09_20_00.sql @@ -1,3 +1,4 @@ +-- DB update 2024_09_16_00 -> 2024_09_20_00 UPDATE `creature_template` SET `flags_extra` = `flags_extra` | 134217728 WHERE `entry` = 23403; DELETE FROM `smart_scripts` WHERE (`entryorguid` = 23403) AND (`source_type` = 0) AND (`id` IN (2)); From 2e17b3250897ec1fdf40840865245919410d1735 Mon Sep 17 00:00:00 2001 From: sudlud Date: Fri, 20 Sep 2024 23:20:33 +0200 Subject: [PATCH 20/20] fix(apps/installer): fix Debian 12 build with mysql (#20003) --- apps/installer/includes/os_configs/debian.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/installer/includes/os_configs/debian.sh b/apps/installer/includes/os_configs/debian.sh index 76b1c946348831..da137922d4babc 100644 --- a/apps/installer/includes/os_configs/debian.sh +++ b/apps/installer/includes/os_configs/debian.sh @@ -19,11 +19,11 @@ sudo apt-get update -y sudo apt-get install -y gdbserver gdb unzip curl \ libncurses-dev libreadline-dev clang g++ \ gcc git cmake make ccache \ - default-libmysqlclient-dev libssl-dev libbz2-dev \ + libssl-dev libbz2-dev \ libboost-all-dev gnupg wget # run noninteractive install for MYSQL 8.4 LTS wget https://dev.mysql.com/get/mysql-apt-config_0.8.32-1_all.deb sudo DEBIAN_FRONTEND="noninteractive" dpkg -i ./mysql-apt-config_0.8.32-1_all.deb sudo apt-get update -sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-server +sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-server libmysqlclient-dev