diff options
author | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-05-15 05:30:25 +0000 |
---|---|---|
committer | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-05-15 05:30:25 +0000 |
commit | a7c1a55bb6f3c3236ba02722e948a52c645a4918 (patch) | |
tree | 15c41cc68bb37051f7fb94bac03055875e25fe5d /src/map/quest.c | |
parent | ec4acd7b1d7f180af5929239ef0706d98d4b6bfc (diff) | |
download | hercules-a7c1a55bb6f3c3236ba02722e948a52c645a4918.tar.gz hercules-a7c1a55bb6f3c3236ba02722e948a52c645a4918.tar.bz2 hercules-a7c1a55bb6f3c3236ba02722e948a52c645a4918.tar.xz hercules-a7c1a55bb6f3c3236ba02722e948a52c645a4918.zip |
* Merged changes from trunk [14784:14819/trunk].
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14821 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/quest.c')
-rw-r--r-- | src/map/quest.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/map/quest.c b/src/map/quest.c index 3e43fcda6..4960d8a93 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -279,17 +279,13 @@ int quest_check(TBL_PC * sd, int quest_id, quest_check_type type) return (sd->quest_log[i].time < (unsigned int)time(NULL) ? 2 : sd->quest_log[i].state == Q_COMPLETE ? 1 : 0); case HUNTING: { - int j = sd->quest_index[i]; - - if( sd->quest_log[i].count[0] < quest_db[j].count[0] || sd->quest_log[i].count[1] < quest_db[j].count[1] || sd->quest_log[i].count[2] < quest_db[j].count[2] ) - { - if( sd->quest_log[i].time < (unsigned int)time(NULL) ) - return 1; - - return 0; - } - - return 2; + int j; + ARR_FIND(0, MAX_QUEST_OBJECTIVES, j, sd->quest_log[i].count[j] < quest_db[sd->quest_index[i]].count[j]); + if( j == MAX_QUEST_OBJECTIVES ) + return 2; + if( sd->quest_log[i].time < (unsigned int)time(NULL) ) + return 1; + return 0; } default: ShowError("quest_check_quest: Unknown parameter %d",type); @@ -334,7 +330,7 @@ int quest_read_db(void) continue; else { - ShowError("quest_read_db: insufficient columes in line %s\n", line); + ShowError("quest_read_db: insufficient columns in line %s\n", line); continue; } } |