Core/Quests: Fixed repeatable quest still showing as completable after completion
Signed-off-by: Machiavelli <[email protected]>
This commit is contained in:
@@ -14238,15 +14238,14 @@ bool Player::CanCompleteQuest(uint32 quest_id)
|
||||
{
|
||||
if (quest_id)
|
||||
{
|
||||
RewardedQuestSet::iterator rewItr = m_RewardedQuests.find(quest_id);
|
||||
if (rewItr != m_RewardedQuests.end())
|
||||
return false; // not allow re-complete quest
|
||||
|
||||
Quest const* qInfo = sObjectMgr->GetQuestTemplate(quest_id);
|
||||
|
||||
if (!qInfo)
|
||||
return false;
|
||||
|
||||
RewardedQuestSet::iterator rewItr = m_RewardedQuests.find(quest_id);
|
||||
if (!qInfo->IsRepeatable() && rewItr != m_RewardedQuests.end())
|
||||
return false; // not allow re-complete quest
|
||||
|
||||
// auto complete quest
|
||||
if ((qInfo->IsAutoComplete() || qInfo->GetFlags() & QUEST_FLAGS_AUTOCOMPLETE) && CanTakeQuest(qInfo, false))
|
||||
return true;
|
||||
@@ -15182,7 +15181,8 @@ QuestStatus Player::GetQuestStatus(uint32 quest_id) const
|
||||
if (itr != m_QuestStatus.end())
|
||||
return itr->second.m_status;
|
||||
|
||||
if (m_RewardedQuests.find(quest_id) != m_RewardedQuests.end())
|
||||
if (Quest const* qInfo = sObjectMgr->GetQuestTemplate(quest_id))
|
||||
if (!qInfo->IsRepeatable() && m_RewardedQuests.find(quest_id) != m_RewardedQuests.end())
|
||||
return QUEST_STATUS_COMPLETE;
|
||||
}
|
||||
return QUEST_STATUS_NONE;
|
||||
|
||||
Reference in New Issue
Block a user