mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
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:
committed by
Giacomo Pozzoni
parent
2762925215
commit
72b1f2e7a4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user