Core/Conditions: fix mistake in CONDITION_QUEST_OBJECTIVE_PROGRESS that would behave wrongly if the player did not have the quest in the quest log. (#23447)

This commit is contained in:
Wyrserth
2019-06-20 08:11:29 +02:00
committed by Giacomo Pozzoni
parent 2762925215
commit 72b1f2e7a4

View File

@@ -507,10 +507,9 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) const
{
const Quest* quest = sObjectMgr->GetQuestTemplate(ConditionValue1);
uint16 log_slot = player->FindQuestSlot(quest->GetQuestId());
uint32 progressCount = 0;
if (log_slot < MAX_QUEST_LOG_SIZE)
progressCount = player->GetQuestSlotCounter(log_slot, ConditionValue2);
if (progressCount == ConditionValue3)
if (log_slot >= MAX_QUEST_LOG_SIZE)
break;
if (player->GetQuestSlotCounter(log_slot, ConditionValue2) == ConditionValue3)
condMeets = true;
}
break;