diff options
author | gumi <mekolat@users.noreply.github.com> | 2017-03-05 12:28:56 -0500 |
---|---|---|
committer | gumi <mekolat@users.noreply.github.com> | 2017-03-05 13:32:29 -0500 |
commit | 404f321df6d5ff717d63528d6bceaadad4c10f07 (patch) | |
tree | eee8db5237bbf239ac74a4b0c17ea2349209ddac /src/map | |
parent | 0920136eab9db973c3fc8aff2f6d7cdcd389d00e (diff) | |
download | hercules-404f321df6d5ff717d63528d6bceaadad4c10f07.tar.gz hercules-404f321df6d5ff717d63528d6bceaadad4c10f07.tar.bz2 hercules-404f321df6d5ff717d63528d6bceaadad4c10f07.tar.xz hercules-404f321df6d5ff717d63528d6bceaadad4c10f07.zip |
allow to use addtimer 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 6d6ce4e85..ae6cb74ed 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -10790,7 +10790,11 @@ BUILDIN(addtimer) struct map_session_data *sd; script->check_event(st, event); - sd = script->rid2sd(st); + + if (script_hasdata(st, 4)) + sd = map->id2sd(script_getnum(st, 4)); + else + sd = script->rid2sd(st); if (sd == NULL) { script_pushint(st, 0); @@ -21092,7 +21096,7 @@ void script_parse_builtin(void) { BUILDIN_DEF(clone,"siisi????"), BUILDIN_DEF(doevent,"s"), BUILDIN_DEF(donpcevent,"s"), - BUILDIN_DEF(addtimer,"is"), + BUILDIN_DEF(addtimer,"is?"), BUILDIN_DEF(deltimer,"s"), BUILDIN_DEF(addtimercount,"si"), BUILDIN_DEF(initnpctimer,"??"), |