diff options
author | KirieZ <guilherme.menaldo@outlook.com> | 2017-02-27 00:36:17 -0300 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2017-07-11 12:46:15 +0200 |
commit | af099be50ad275c55bfb07831213f4540ae265d7 (patch) | |
tree | 156e787285e2a16e5214cce417c91af43438f74f /src/map/script.c | |
parent | eef92522dcf835f42a922a580be8f855cfea1aa6 (diff) | |
download | hercules-af099be50ad275c55bfb07831213f4540ae265d7.tar.gz hercules-af099be50ad275c55bfb07831213f4540ae265d7.tar.bz2 hercules-af099be50ad275c55bfb07831213f4540ae265d7.tar.xz hercules-af099be50ad275c55bfb07831213f4540ae265d7.zip |
Added time limit parameter to setquest
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/map/script.c b/src/map/script.c index d85438903..85480d3bd 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -20336,19 +20336,21 @@ BUILDIN(setquest) { unsigned short i; int quest_id; + unsigned int time_limit; struct map_session_data *sd = script->rid2sd(st); if (sd == NULL) return true; quest_id = script_getnum(st, 2); + time_limit = script_hasdata(st, 3) ? script_getnum(st, 3) : 0; - quest->add(sd, quest_id); + quest->add(sd, quest_id, time_limit); // If questinfo is set, remove quest bubble once quest is set. - for(i = 0; i < map->list[sd->bl.m].qi_count; 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( qi->quest_id == quest_id ) { + if (qi->quest_id == quest_id) { #if PACKETVER >= 20120410 clif->quest_show_event(sd, &qi->nd->bl, 9999, 0); #else @@ -23918,7 +23920,7 @@ void script_parse_builtin(void) { //Quest Log System [Inkfish] BUILDIN_DEF(questinfo, "ii??"), - BUILDIN_DEF(setquest, "i"), + BUILDIN_DEF(setquest, "i?"), BUILDIN_DEF(erasequest, "i?"), BUILDIN_DEF(completequest, "i?"), BUILDIN_DEF(questprogress, "i?"), |