summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorgumi <mekolat@users.noreply.github.com>2017-03-05 14:19:21 -0500
committergumi <mekolat@users.noreply.github.com>2017-03-05 14:21:02 -0500
commit9a9294956a47a4eee51b072f6e23ede28962fa69 (patch)
tree6760aaefee26f4de3b63856578d61af823d47dfb /src/map
parent083c90c4497e7b5bd19fb5f2491255a3fbc9972c (diff)
downloadhercules-9a9294956a47a4eee51b072f6e23ede28962fa69.tar.gz
hercules-9a9294956a47a4eee51b072f6e23ede28962fa69.tar.bz2
hercules-9a9294956a47a4eee51b072f6e23ede28962fa69.tar.xz
hercules-9a9294956a47a4eee51b072f6e23ede28962fa69.zip
allow to use addtimercount on another player
Diffstat (limited to 'src/map')
-rw-r--r--src/map/script.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 84d5ed98f..1641aba66 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -10841,7 +10841,11 @@ BUILDIN(addtimercount)
event = script_getstr(st, 2);
tick = script_getnum(st, 3);
- sd = script->rid2sd(st);
+
+ if (script_hasdata(st, 4))
+ sd = map->id2sd(script_getnum(st, 4));
+ else
+ sd = script->rid2sd(st);
if (sd == NULL)
return true;
@@ -21104,7 +21108,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF(donpcevent,"s"),
BUILDIN_DEF(addtimer,"is?"),
BUILDIN_DEF(deltimer,"s?"),
- BUILDIN_DEF(addtimercount,"si"),
+ BUILDIN_DEF(addtimercount,"si?"),
BUILDIN_DEF(initnpctimer,"??"),
BUILDIN_DEF(stopnpctimer,"??"),
BUILDIN_DEF(startnpctimer,"??"),