Core/Quests: Fixed optional quest objectives incorrectly changing quest state when they change completion state
Port From (https://github.com/TrinityCore/TrinityCore/commit/4362a8c3f6aff1a8403ab9c1dee3fd23a82db339)
This commit is contained in:
@@ -2564,9 +2564,12 @@ namespace Game.Entities
|
|||||||
updateZoneAuras = true;
|
updateZoneAuras = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (objectiveIsNowComplete && CanCompleteQuest(questId, objective.Id))
|
if (objectiveIsNowComplete)
|
||||||
CompleteQuest(questId);
|
{
|
||||||
else if (objectiveStatusData.QuestStatusPair.Status.Status == QuestStatus.Complete)
|
if (CanCompleteQuest(questId, objective.Id))
|
||||||
|
CompleteQuest(questId);
|
||||||
|
}
|
||||||
|
else if (!(objective.Flags.HasAnyFlag(QuestObjectiveFlags.Optional) && objectiveStatusData.QuestStatusPair.Status.Status == QuestStatus.Complete)
|
||||||
IncompleteQuest(questId);
|
IncompleteQuest(questId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user