diff options
author | gumi <mekolat@users.noreply.github.com> | 2017-03-05 12:23:13 -0500 |
---|---|---|
committer | gumi <mekolat@users.noreply.github.com> | 2017-03-05 13:32:09 -0500 |
commit | 0920136eab9db973c3fc8aff2f6d7cdcd389d00e (patch) | |
tree | 1e6a02cc4e5205695b9a50dd8e9b849b7526ad0e | |
parent | 96a0bb83a3c679b376c6ee3c17c3c732d5f9b8f7 (diff) | |
download | hercules-0920136eab9db973c3fc8aff2f6d7cdcd389d00e.tar.gz hercules-0920136eab9db973c3fc8aff2f6d7cdcd389d00e.tar.bz2 hercules-0920136eab9db973c3fc8aff2f6d7cdcd389d00e.tar.xz hercules-0920136eab9db973c3fc8aff2f6d7cdcd389d00e.zip |
make addtimer return success or failure
-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 950242e77..6d6ce4e85 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -10792,14 +10792,18 @@ BUILDIN(addtimer) script->check_event(st, event); sd = script->rid2sd(st); - if (sd == NULL) - return true; + if (sd == NULL) { + script_pushint(st, 0); + return false; + } if (!pc->addeventtimer(sd, tick, event)) { ShowWarning("script:addtimer: Event timer is full, can't add new event timer. (cid:%d timer:%s)\n", sd->status.char_id, event); + script_pushint(st, 0); return false; } + script_pushint(st, 1); return true; } /*========================================== |