aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOvahlord <dreadkiller@gmx.de>2024-09-08 21:08:37 +0200
committerOvahlord <dreadkiller@gmx.de>2024-09-08 21:08:37 +0200
commit58c88ef86a2c9f7a4d3f975bac2235a3d4837627 (patch)
tree262f30b4658f0ba9541ff1e0064deb9dc3653440 /src
parentf359a8710a4b5afbbc3b1d22faa73228e6d4f014 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Handlers/QuestHandler.cpp7
1 files changed, 7 insertions, 0 deletions
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))
{