mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Core/Conditions: CONDITION_QUEST_OBJECTIVE_COMPLETE (#19510)
* Ignore QUEST_OBJECTIVE_FLAG_OPTIONAL from quest_completion
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user