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 <[email protected]>
This commit is contained in:
@@ -14875,7 +14875,7 @@ bool Player::SatisfyQuestPreviousQuest(Quest const* qInfo, bool msg)
|
|||||||
|
|
||||||
|
|
||||||
// If any of the negative previous quests active, return true
|
// 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
|
// skip one-from-all exclusive group
|
||||||
if (qPrevInfo->GetExclusiveGroup() >= 0)
|
if (qPrevInfo->GetExclusiveGroup() >= 0)
|
||||||
@@ -14896,10 +14896,8 @@ bool Player::SatisfyQuestPreviousQuest(Quest const* qInfo, bool msg)
|
|||||||
if (exclude_Id == prevId)
|
if (exclude_Id == prevId)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
QuestStatusMap::iterator i_exstatus = m_QuestStatus.find(exclude_Id);
|
|
||||||
|
|
||||||
// alternative quest from group also must be active
|
// 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)
|
if (msg)
|
||||||
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
|
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
|
// 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)
|
if (msg)
|
||||||
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
|
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
|
||||||
@@ -15038,7 +15036,7 @@ bool Player::SatisfyQuestNextChain(Quest const* qInfo, bool msg)
|
|||||||
Quest const* Nquest = sObjectMgr->GetQuestTemplate(nextQuest);
|
Quest const* Nquest = sObjectMgr->GetQuestTemplate(nextQuest);
|
||||||
|
|
||||||
// next quest in chain already started or completed
|
// 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)
|
if (msg)
|
||||||
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
|
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
|
||||||
@@ -15061,10 +15059,8 @@ bool Player::SatisfyQuestPrevChain(Quest const* qInfo, bool msg)
|
|||||||
{
|
{
|
||||||
uint32 prevId = *iter;
|
uint32 prevId = *iter;
|
||||||
|
|
||||||
QuestStatusMap::iterator i_prevstatus = m_QuestStatus.find(prevId);
|
|
||||||
|
|
||||||
// If any of the previous quests in chain active, return false
|
// 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)
|
if (msg)
|
||||||
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
|
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
|
||||||
|
|||||||
Reference in New Issue
Block a user