diff options
author | Ovah <dreadkiller@gmx.de> | 2022-02-26 23:18:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-26 23:18:34 +0100 |
commit | cec71e83017bd22036a80c7747535ac3c9ee60d4 (patch) | |
tree | 5fc5acf0a62e1bdb9ef5a5057568d50ec78c3190 | |
parent | 8fe7748f30122e13f6d1b83db69a39cd1c1f2448 (diff) |
Core/Quests: Do not tell the client to request questgiver details for the next quest in chain on quest reward if the player cannot accept it yet (#27816)
This fixes an issue that was causing the gossip UI to get stuck when the client tried to request questgiver details that it wasnt allowed to retrieve yet
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index de466cd4b5b..7f726f8a9bd 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -17428,7 +17428,8 @@ void Player::SendQuestReward(Quest const* quest, Creature const* questGiver, uin else if (questGiver->IsQuestGiver()) packet.LaunchQuest = true; else if (quest->GetNextQuestInChain() && !quest->HasFlag(QUEST_FLAGS_AUTOCOMPLETE)) - packet.UseQuestReward = true; + if (Quest const* rewardQuest = sObjectMgr->GetQuestTemplate(quest->GetNextQuestInChain())) + packet.UseQuestReward = CanTakeQuest(rewardQuest, false); } packet.HideChatMessage = hideChatMessage; |