Skip to content

Commit

Permalink
Fix showing proper quest giver marks
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife authored and Fabi committed Jan 3, 2017
1 parent 26907e2 commit fa56086
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/game/QuestDef.h
Expand Up @@ -105,6 +105,7 @@ enum QuestStatus
MAX_QUEST_STATUS
};

// TODO: Add comments
enum __QuestGiverStatus
{
DIALOG_STATUS_NONE = 0x000,
Expand Down
9 changes: 3 additions & 6 deletions src/game/QuestHandler.cpp
Expand Up @@ -545,9 +545,9 @@ uint32 WorldSession::getDialogStatus(Player* pPlayer, Object* questgiver, uint32
QuestStatus status = pPlayer->GetQuestStatus(quest_id);

if (status == QUEST_STATUS_COMPLETE && !pPlayer->GetQuestRewardStatus(quest_id))
dialogStatusNew = pQuest->IsRepeatable() ? DIALOG_STATUS_REWARD_REP : DIALOG_STATUS_REWARD;
dialogStatusNew = pQuest->IsRepeatable() && pQuest->IsDailyOrWeekly() ? DIALOG_STATUS_REWARD_REP : DIALOG_STATUS_REWARD;
else if (pQuest->IsAutoComplete() && pPlayer->CanTakeQuest(pQuest, false))
dialogStatusNew = pQuest->IsRepeatable() ? DIALOG_STATUS_AVAILABLE_REP : DIALOG_STATUS_AVAILABLE;
dialogStatusNew = pQuest->IsRepeatable() ? pQuest->IsDailyOrWeekly() ? DIALOG_STATUS_AVAILABLE_REP : DIALOG_STATUS_REWARD_REP : DIALOG_STATUS_AVAILABLE;
else if (status == QUEST_STATUS_INCOMPLETE)
dialogStatusNew = DIALOG_STATUS_INCOMPLETE;

Expand Down Expand Up @@ -575,10 +575,7 @@ uint32 WorldSession::getDialogStatus(Player* pPlayer, Object* questgiver, uint32
{
int32 lowLevelDiff = sWorld.getConfig(CONFIG_INT32_QUEST_LOW_LEVEL_HIDE_DIFF);

auto questStatusItr = pPlayer->getQuestStatusMap().find(quest_id);
bool rewarded = (questStatusItr != pPlayer->getQuestStatusMap().end()) ? questStatusItr->second.m_rewarded : false;

if (pQuest->IsAutoComplete() || (pQuest->IsRepeatable() && rewarded))
if (pQuest->IsAutoComplete())
{
dialogStatusNew = DIALOG_STATUS_REWARD_REP;
}
Expand Down

0 comments on commit fa56086

Please sign in to comment.