From 08f63aa3b1bf9acdc98a90c03530501fb7252dac Mon Sep 17 00:00:00 2001 From: aleos89 Date: Fri, 26 Aug 2016 14:34:13 -0400 Subject: [PATCH] Corrected quest progression (fixes #1521) * Quests can now progress even if they are marked inactive. Thanks to @Tokeiburu! --- src/map/quest.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/map/quest.c b/src/map/quest.c index c43d090b62..d7ba16ce2f 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -244,7 +244,7 @@ void quest_update_objective(TBL_PC *sd, int mob_id) for( i = 0; i < sd->avail_quests; i++ ) { struct quest_db *qi = NULL; - if( sd->quest_log[i].state != Q_ACTIVE ) // Skip inactive quests + if( sd->quest_log[i].state == Q_COMPLETE ) // Skip complete quests continue; qi = quest_search(sd->quest_log[i].quest_id); @@ -356,6 +356,8 @@ int quest_check(TBL_PC *sd, int quest_id, enum quest_check_type type) switch( type ) { case HAVEQUEST: + if (sd->quest_log[i].state == Q_INACTIVE) // Player has the quest but it's in the inactive state; send it as Q_ACTIVE. + return 1; return sd->quest_log[i].state; case PLAYTIME: return (sd->quest_log[i].time < (unsigned int)time(NULL) ? 2 : sd->quest_log[i].state == Q_COMPLETE ? 1 : 0);