From 58c88ef86a2c9f7a4d3f975bac2235a3d4837627 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Sun, 8 Sep 2024 21:08:37 +0200 Subject: Core/Quests: skip most of the checks in CMSG_QUEST_GIVER_ACCEPT_QUEST for auto accept quests as they have been added before the cmsg comes in --- src/server/game/Handlers/QuestHandler.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/server/game/Handlers/QuestHandler.cpp b/src/server/game/Handlers/QuestHandler.cpp index 8b2020a98a6..ad8d8d8062c 100644 --- a/src/server/game/Handlers/QuestHandler.cpp +++ b/src/server/game/Handlers/QuestHandler.cpp @@ -136,6 +136,13 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPackets::Quest::QuestG if (Quest const* quest = sObjectMgr->GetQuestTemplate(packet.QuestID)) { + // Quests with QUEST_FLAGS_AUTO_ACCEPT still send this opcode despite being added already. No need to further check anything and just skip further code execution + if (quest->IsAutoAccept() && _player->GetQuestStatus(packet.QuestID) != QUEST_STATUS_NONE) + { + CLOSE_GOSSIP_CLEAR_SHARING_INFO(); + return; + } + // prevent cheating if (!GetPlayer()->CanTakeQuest(quest, true)) { -- cgit v1.2.3