summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-20 03:14:49 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-20 03:14:49 +0000
commit5e6480cb11403f8f634a1cfc9648c7ec654c0fb8 (patch)
tree3da0741855ac2ef854d9176edf624bf3ad3525c3 /src/common
parenteed71eb448822a5e68168714f9f8e597511a09d7 (diff)
downloadhercules-5e6480cb11403f8f634a1cfc9648c7ec654c0fb8.tar.gz
hercules-5e6480cb11403f8f634a1cfc9648c7ec654c0fb8.tar.bz2
hercules-5e6480cb11403f8f634a1cfc9648c7ec654c0fb8.tar.xz
hercules-5e6480cb11403f8f634a1cfc9648c7ec654c0fb8.zip
- Fixed Taekwon stances not triggering.
- Added atcommand @exp - Added error reporting when add_timer_interval receives a negative/0 interval value. - Fixed a possible infinite recursion bug with splash self skills. - Modified the way firewall_hits_on_undead works, to loop and invoke multiple skill_attacks based on the value. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5338 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common')
-rw-r--r--src/common/timer.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/common/timer.c b/src/common/timer.c
index 7b7ac5e2c..49b6e18de 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -237,8 +237,15 @@ int add_timer(unsigned int tick,int (*func)(int,unsigned int,int,int), int id, i
int add_timer_interval(unsigned int tick, int (*func)(int,unsigned int,int,int), int id, int data, int interval)
{
- int tid = acquire_timer();
+ int tid;
+ if (interval < 1) {
+ ShowError("add_timer_interval : function %08x(%s) has invalid interval %d!\n",
+ (int)func, search_timer_func_list(func));
+ return -1;
+ }
+
+ tid = acquire_timer();
timer_data[tid].tick = tick;
timer_data[tid].func = func;
timer_data[tid].id = id;