summaryrefslogtreecommitdiff
path: root/src/map/quest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/quest.c')
-rw-r--r--src/map/quest.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/map/quest.c b/src/map/quest.c
index ab0b06974..8cde4538e 100644
--- a/src/map/quest.c
+++ b/src/map/quest.c
@@ -887,7 +887,14 @@ static bool quest_questinfo_validate_quests(struct map_session_data *sd, struct
for (i = 0; i < VECTOR_LENGTH(qi->quest_requirement); i++) {
struct questinfo_qreq *quest_requirement = &VECTOR_INDEX(qi->quest_requirement, i);
- if (quest->check(sd, quest_requirement->id, HAVEQUEST) != quest_requirement->state)
+ int quest_progress = quest->check(sd, quest_requirement->id, HAVEQUEST);
+ if (quest_progress == -1)
+ quest_progress = 0;
+ else if (quest_progress == 0 || quest_progress == 1)
+ quest_progress = 1;
+ else
+ quest_progress = 2;
+ if (quest_progress != quest_requirement->state)
return false;
}