diff options
Diffstat (limited to 'src/map/intif.c')
-rw-r--r-- | src/map/intif.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/map/intif.c b/src/map/intif.c index 204fbe497..9643338fa 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -1354,6 +1354,18 @@ int intif_parse_questlog(int fd) for( i = 0; i < sd->num_quests; i++ ) { memcpy(&sd->quest_log[i], RFIFOP(fd, i*sizeof(struct quest)+8), sizeof(struct quest)); + + sd->quest_index[i] = quest_search_db(sd->quest_log[i].quest_id); + + if( sd->quest_index[i] < 0 ) + { + ShowError("intif_parse_questlog: quest %d not found in DB.\n",sd->quest_log[i].quest_id); + sd->avail_quests--; + sd->num_quests--; + i--; + continue; + } + if( sd->quest_log[i].state == Q_COMPLETE ) sd->avail_quests--; } |