From 29666451f3a616eaa1f50cb99d9379124b4bfe28 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 2 Mar 2010 09:59:59 -0700 Subject: * Add support for sending quest completion text * Original patch by NoFantasy - thank you * Ported to Trinity by seirgy - thank you * Closes issue #873 --HG-- branch : trunk --- src/game/GossipDef.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/game/GossipDef.cpp') diff --git a/src/game/GossipDef.cpp b/src/game/GossipDef.cpp index f35205a8c09..ae82c8b1a79 100644 --- a/src/game/GossipDef.cpp +++ b/src/game/GossipDef.cpp @@ -541,12 +541,13 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest ) { - std::string Title,Details,Objectives,EndText; + std::string Title, Details, Objectives, EndText, CompletedText; std::string ObjectiveText[QUEST_OBJECTIVES_COUNT]; Title = pQuest->GetTitle(); Details = pQuest->GetDetails(); Objectives = pQuest->GetObjectives(); EndText = pQuest->GetEndText(); + CompletedText = pQuest->GetCompletedText(); for (int i=0; iObjectiveText[i]; @@ -564,6 +565,8 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest ) Objectives=ql->Objectives[loc_idx]; if (ql->EndText.size() > loc_idx && !ql->EndText[loc_idx].empty()) EndText=ql->EndText[loc_idx]; + if (ql->CompletedText.size() > (size_t)loc_idx && !ql->CompletedText[loc_idx].empty()) + CompletedText=ql->CompletedText[loc_idx]; for (int i=0; iObjectiveText[i].size() > loc_idx && !ql->ObjectiveText[i][loc_idx].empty()) @@ -652,7 +655,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest ) data << Objectives; data << Details; data << EndText; - data << uint8(0); // some string + data << CompletedText; // display in quest objectives window once all objectives are completed for (iI = 0; iI < QUEST_OBJECTIVES_COUNT; ++iI) { -- cgit v1.2.3