Permalink
Browse files

Core/Commands: Fixed lookup quest command to show [rewarded] mark on …

…rewarded quests
  • Loading branch information...
1 parent 3888760 commit 985e8cdcd33f1bf993527da72e24820ffdd15b30 @4m1g0 4m1g0 committed Jun 3, 2012
Showing with 22 additions and 12 deletions.
  1. +22 −12 src/server/game/Chat/Commands/Level3.cpp
@@ -1144,15 +1144,20 @@ bool ChatHandler::HandleLookupQuestCommand(const char *args)
{
QuestStatus status = target->GetQuestStatus(qinfo->GetQuestId());
- if (status == QUEST_STATUS_COMPLETE)
+ switch (status)
{
- if (target->GetQuestRewardStatus(qinfo->GetQuestId()))
- statusStr = GetTrinityString(LANG_COMMAND_QUEST_REWARDED);
- else
+ case QUEST_STATUS_COMPLETE:
statusStr = GetTrinityString(LANG_COMMAND_QUEST_COMPLETE);
+ break;
+ case QUEST_STATUS_INCOMPLETE:
+ statusStr = GetTrinityString(LANG_COMMAND_QUEST_ACTIVE);
+ break;
+ case QUEST_STATUS_REWARDED:
+ statusStr = GetTrinityString(LANG_COMMAND_QUEST_REWARDED);
+ break;
+ default:
+ break;
}
- else if (status == QUEST_STATUS_INCOMPLETE)
- statusStr = GetTrinityString(LANG_COMMAND_QUEST_ACTIVE);
}
if (m_session)
@@ -1187,15 +1192,20 @@ bool ChatHandler::HandleLookupQuestCommand(const char *args)
{
QuestStatus status = target->GetQuestStatus(qinfo->GetQuestId());
- if (status == QUEST_STATUS_COMPLETE)
+ switch (status)
{
- if (target->GetQuestRewardStatus(qinfo->GetQuestId()))
- statusStr = GetTrinityString(LANG_COMMAND_QUEST_REWARDED);
- else
+ case QUEST_STATUS_COMPLETE:
statusStr = GetTrinityString(LANG_COMMAND_QUEST_COMPLETE);
+ break;
+ case QUEST_STATUS_INCOMPLETE:
+ statusStr = GetTrinityString(LANG_COMMAND_QUEST_ACTIVE);
+ break;
+ case QUEST_STATUS_REWARDED:
+ statusStr = GetTrinityString(LANG_COMMAND_QUEST_REWARDED);
+ break;
+ default:
+ break;
}
- else if (status == QUEST_STATUS_INCOMPLETE)
- statusStr = GetTrinityString(LANG_COMMAND_QUEST_ACTIVE);
}
if (m_session)

0 comments on commit 985e8cd

Please sign in to comment.