diff options
author | AnnieRuru <jeankof@ymail.com> | 2014-03-17 02:53:54 +0800 |
---|---|---|
committer | AnnieRuru <jeankof@ymail.com> | 2014-03-17 02:53:54 +0800 |
commit | 18278c253f08f5c8b26a1634a7c6c5efff8ee4b5 (patch) | |
tree | 039d23a3655f17a17769121b8dc9debbd62ebc14 /src/map/script.c | |
parent | 1c495a071e907286ebe929dec9a8ead8582aee82 (diff) | |
download | hercules-18278c253f08f5c8b26a1634a7c6c5efff8ee4b5.tar.gz hercules-18278c253f08f5c8b26a1634a7c6c5efff8ee4b5.tar.bz2 hercules-18278c253f08f5c8b26a1634a7c6c5efff8ee4b5.tar.xz hercules-18278c253f08f5c8b26a1634a7c6c5efff8ee4b5.zip |
Fix addtimer will report error when hit MAX_EVENTTIMER
Fix bug 7965
http://hercules.ws/board/tracker/issue-7965-
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c index 5a33a39ed..09a6f7bd2 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -9273,7 +9273,10 @@ BUILDIN(addtimer) if( sd == NULL ) return true; - pc->addeventtimer(sd,tick,event); + if (!pc->addeventtimer(sd,tick,event)) { + ShowWarning("buildin_addtimer: Event timer is full, can't add new event timer. (cid:%d timer:%s)\n",sd->status.char_id,event); + return false; + } return true; } /*========================================== |