diff options
| author | Wyrserth <wyrserth@protonmail.com> | 2019-06-20 08:11:29 +0200 |
|---|---|---|
| committer | Giacomo Pozzoni <giacomopoz@gmail.com> | 2019-06-20 08:11:29 +0200 |
| commit | 72b1f2e7a4507eae2102a9ff883affae03ddd018 (patch) | |
| tree | ce2a47e162b8b6d25a4f623874378fadd11db506 /src/server/game/Conditions/ConditionMgr.cpp | |
| parent | 276292521572a2ac028068cb0124c6628f26f3ff (diff) | |
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)
Diffstat (limited to 'src/server/game/Conditions/ConditionMgr.cpp')
| -rw-r--r-- | src/server/game/Conditions/ConditionMgr.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 74c168599bf..122cd65a173 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -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; |
