aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <krzysiek.7.5.4@gmail.com>2011-01-08 00:27:50 +0100
committerMachiavelli <machiavelli.trinity@gmail.com>2011-01-08 00:27:50 +0100
commit051cceb7accb0616b375ec4141444eded19b75e4 (patch)
treee690f5a6f74786b5f86cb5da651e94db91760ce0 /src
parentdc3d6a2f230b4b083cdc92b739bce8d2f2638764 (diff)
Core/Quests: Fix daily quests not showing up in list of available quests after having completed them once before. (Bug usually used to surface when in ExclusiveGroup)
Signed-off-by: Machiavelli <machiavelli.trinity@gmail.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 5618bf57d3b..1adf7c6ec14 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -14875,7 +14875,7 @@ bool Player::SatisfyQuestPreviousQuest(Quest const* qInfo, bool msg)
// If any of the negative previous quests active, return true
- if (*iter < 0 && m_QuestStatus.find(prevId) != m_QuestStatus.end())
+ if (*iter < 0 && GetQuestStatus(prevId) != QUEST_STATUS_NONE)
{
// skip one-from-all exclusive group
if (qPrevInfo->GetExclusiveGroup() >= 0)
@@ -14896,10 +14896,8 @@ bool Player::SatisfyQuestPreviousQuest(Quest const* qInfo, bool msg)
if (exclude_Id == prevId)
continue;
- QuestStatusMap::iterator i_exstatus = m_QuestStatus.find(exclude_Id);
-
// alternative quest from group also must be active
- if (m_QuestStatus.find(exclude_Id) != m_QuestStatus.end())
+ if (GetQuestStatus(exclude_Id) != QUEST_STATUS_NONE)
{
if (msg)
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
@@ -15019,7 +15017,7 @@ bool Player::SatisfyQuestExclusiveGroup(Quest const* qInfo, bool msg)
}
// alternative quest already started or completed - but don't check rewarded states if both are repeatable
- if (m_QuestStatus.find(exclude_Id) != m_QuestStatus.end() || (!(qInfo->IsRepeatable() && Nquest->IsRepeatable()) && m_RewardedQuests.find(exclude_Id) != m_RewardedQuests.end()))
+ if (GetQuestStatus(exclude_Id) != QUEST_STATUS_NONE || (!(qInfo->IsRepeatable() && Nquest->IsRepeatable()) && m_RewardedQuests.find(exclude_Id) != m_RewardedQuests.end()))
{
if (msg)
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
@@ -15038,7 +15036,7 @@ bool Player::SatisfyQuestNextChain(Quest const* qInfo, bool msg)
Quest const* Nquest = sObjectMgr->GetQuestTemplate(nextQuest);
// next quest in chain already started or completed
- if (m_QuestStatus.find(nextQuest) != m_QuestStatus.end() || (!(qInfo->IsRepeatable() && Nquest->IsRepeatable()) && m_RewardedQuests.find(nextQuest) != m_RewardedQuests.end()))
+ if (GetQuestStatus(nextQuest) != QUEST_STATUS_NONE || m_RewardedQuests.find(nextQuest) != m_RewardedQuests.end())
{
if (msg)
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
@@ -15061,10 +15059,8 @@ bool Player::SatisfyQuestPrevChain(Quest const* qInfo, bool msg)
{
uint32 prevId = *iter;
- QuestStatusMap::iterator i_prevstatus = m_QuestStatus.find(prevId);
-
// If any of the previous quests in chain active, return false
- if (i_prevstatus != m_QuestStatus.end())
+ if (GetQuestStatus(prevId) != QUEST_STATUS_NONE)
{
if (msg)
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);