Skip to content

Commit

Permalink
Core/Quests: Better way to fix the problem affected in previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Machiavell1 committed Jan 6, 2011
1 parent f94ae92 commit 463f82f
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/server/game/Entities/Player/Player.cpp
Expand Up @@ -14661,13 +14661,9 @@ void Player::RewardQuest(Quest const *pQuest, uint32 reward, Object* questGiver,
} else if (pQuest->IsWeekly())
SetWeeklyQuestStatus(quest_id);

if (!pQuest->IsRepeatable())
{
m_RewardedQuests.insert(quest_id);
m_RewardedQuestsSave[quest_id] = true;
}
else
RemoveActiveQuest(quest_id);
RemoveActiveQuest(quest_id);
m_RewardedQuests.insert(quest_id);
m_RewardedQuestsSave[quest_id] = true;

if (announce)
SendQuestReward(pQuest, XP, questGiver);
Expand Down Expand Up @@ -15039,8 +15035,10 @@ bool Player::SatisfyQuestNextChain(Quest const* qInfo, bool msg)
if (!nextQuest)
return true;

Quest const* Nquest = sObjectMgr->GetQuestTemplate(nextQuest);

// next quest in chain already started or completed
if (m_QuestStatus.find(nextQuest) != m_QuestStatus.end() || m_RewardedQuests.find(nextQuest) != m_RewardedQuests.end())
if (m_QuestStatus.find(nextQuest) != m_QuestStatus.end() || (!(qInfo->IsRepeatable() && Nquest->IsRepeatable()) && m_RewardedQuests.find(nextQuest) != m_RewardedQuests.end()))
{
if (msg)
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
Expand Down

0 comments on commit 463f82f

Please sign in to comment.