Core/Conditions: CONDITION_QUEST_OBJECTIVE_COMPLETE (#19510)

* Ignore QUEST_OBJECTIVE_FLAG_OPTIONAL from quest_completion
This commit is contained in:
Arog
2017-05-05 16:23:45 -04:00
committed by joschiwald
parent b68b7ecd9f
commit f2becced5a

View File

@@ -14644,8 +14644,11 @@ bool Player::CanCompleteQuest(uint32 quest_id)
{
for (QuestObjective const& obj : qInfo->GetObjectives())
{
if (!IsQuestObjectiveComplete(obj))
return false;
if (!(obj.Flags & QUEST_OBJECTIVE_FLAG_OPTIONAL) && !(obj.Flags & QUEST_OBJECTIVE_FLAG_PART_OF_PROGRESS_BAR))
{
if (!IsQuestObjectiveComplete(obj))
return false;
}
}
if (qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_TIMED) && q_status.Timer == 0)
@@ -16775,9 +16778,6 @@ bool Player::IsQuestObjectiveComplete(QuestObjective const& objective) const
Quest const* quest = sObjectMgr->GetQuestTemplate(objective.QuestID);
ASSERT(quest);
if (objective.Flags & QUEST_OBJECTIVE_FLAG_PART_OF_PROGRESS_BAR)
return true;
switch (objective.Type)
{
case QUEST_OBJECTIVE_MONSTER: