Corrected quest progression (fixes #1521)

* Quests can now progress even if they are marked inactive.
Thanks to @Tokeiburu!
This commit is contained in:
aleos89 2016-08-26 14:34:13 -04:00
parent 55edbc14ef
commit 08f63aa3b1

View File

@ -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);