diff options
author | gumi <mekolat@users.noreply.github.com> | 2017-03-05 12:34:12 -0500 |
---|---|---|
committer | gumi <mekolat@users.noreply.github.com> | 2017-03-05 13:32:58 -0500 |
commit | 50c79f0312c25de2c5b5e285f9f1635f8b74a4bb (patch) | |
tree | 127e3a35078e799232feb088c64c74c88c504956 /src/map | |
parent | 5d94553ad2a3625b2ba74615c89785a2d92e9e2b (diff) | |
download | hercules-50c79f0312c25de2c5b5e285f9f1635f8b74a4bb.tar.gz hercules-50c79f0312c25de2c5b5e285f9f1635f8b74a4bb.tar.bz2 hercules-50c79f0312c25de2c5b5e285f9f1635f8b74a4bb.tar.xz hercules-50c79f0312c25de2c5b5e285f9f1635f8b74a4bb.zip |
allow to use deltimer on another player
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/script.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c index 3da3ff211..43d1822f1 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -10818,7 +10818,11 @@ BUILDIN(deltimer) struct map_session_data *sd; event=script_getstr(st, 2); - sd = script->rid2sd(st); + + if (script_hasdata(st, 3)) + sd = map->id2sd(script_getnum(st, 3)); + else + sd = script->rid2sd(st); if (sd == NULL) return true; @@ -21098,7 +21102,7 @@ void script_parse_builtin(void) { BUILDIN_DEF(doevent,"s"), BUILDIN_DEF(donpcevent,"s"), BUILDIN_DEF(addtimer,"is?"), - BUILDIN_DEF(deltimer,"s"), + BUILDIN_DEF(deltimer,"s?"), BUILDIN_DEF(addtimercount,"si"), BUILDIN_DEF(initnpctimer,"??"), BUILDIN_DEF(stopnpctimer,"??"), |