Browse Source

Corrected quest progression (fixes #1521)
* Quests can now progress even if they are marked inactive.
Thanks to @Tokeiburu!

aleos89 8 years ago
parent
commit
08f63aa3b1
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/map/quest.c

+ 3 - 1
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);