diff options
author | Haru <haru@dotalux.com> | 2018-07-24 05:22:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-24 05:22:42 +0200 |
commit | 1f1b82f737809a44aaabb98499293aa75eee8125 (patch) | |
tree | ddbe3ee0b93db54a5febe237524bdf4823596911 /src/map/clif.c | |
parent | 019f60feb9272ac5a527c8cdb430c2328108417c (diff) | |
parent | 90f7ef5dfb75ba3d819a4ac93518ebeadcfe7cc5 (diff) | |
download | hercules-1f1b82f737809a44aaabb98499293aa75eee8125.tar.gz hercules-1f1b82f737809a44aaabb98499293aa75eee8125.tar.bz2 hercules-1f1b82f737809a44aaabb98499293aa75eee8125.tar.xz hercules-1f1b82f737809a44aaabb98499293aa75eee8125.zip |
Merge pull request #2107 from Asheraf/questinfo_vec
Questinfo System overhaul
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 904bfdd68..2a2d87ccc 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -10066,16 +10066,11 @@ static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd) #if PACKETVER >= 20090218 { int i; - for(i = 0; i < map->list[sd->bl.m].qi_count; i++) { - struct questinfo *qi = &map->list[sd->bl.m].qi_data[i]; - if( quest->check(sd, qi->quest_id, HAVEQUEST) == -1 ) {// Check if quest is not started - if( qi->hasJob ) { // Check if quest is job-specific, check is user is said job class. - if (sd->status.class == qi->job) - clif->quest_show_event(sd, &qi->nd->bl, qi->icon, qi->color); - } else { - clif->quest_show_event(sd, &qi->nd->bl, qi->icon, qi->color); - } - } + for (i = 0; i < VECTOR_LENGTH(map->list[sd->bl.m].qi_data); i++) { + struct questinfo *qi = &VECTOR_INDEX(map->list[sd->bl.m].qi_data, i); + + if (quest->questinfo_validate(sd, qi)) + clif->quest_show_event(sd, &qi->nd->bl, qi->icon, qi->color); } } #endif |