From 7c8a4fc7d397510ec04bf8fd146b90a9f35a0b6f Mon Sep 17 00:00:00 2001 From: brotalnia Date: Mon, 17 Jul 2017 11:42:05 +0300 Subject: [PATCH] Incomplete text should not be shown for completed quests (#35) * Incomplete text should not be shown for completed quests * Use GetReqItemsCount instead --- src/game/WorldHandlers/GossipDef.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/game/WorldHandlers/GossipDef.cpp b/src/game/WorldHandlers/GossipDef.cpp index 926d60dd..7e7a584a 100644 --- a/src/game/WorldHandlers/GossipDef.cpp +++ b/src/game/WorldHandlers/GossipDef.cpp @@ -727,8 +727,11 @@ void PlayerMenu::SendQuestGiverRequestItems(Quest const* pQuest, ObjectGuid npcG } } - // We may wish a better check, perhaps checking the real quest requirements - if (RequestItemsText.empty()) + // Quests that don't require items use the RequestItemsText field to store the text + // that is shown when you talk to the quest giver while the quest is incomplete. + // Therefore the text should not be shown for them when the quest is complete. + // For quests that do require items, it is self explanatory. + if (RequestItemsText.empty() || ((pQuest->GetReqItemsCount() == 0) && Completable)) { SendQuestGiverOfferReward(pQuest, npcGUID, true); return;