summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-26 14:22:28 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-26 14:22:28 +0000
commitb6373365e5ac7ccf01c124fcebce6faba2d7519c (patch)
tree9f48c4b8dfa8c47d119961a55a8503ed9e3551e6 /src/map/script.c
parent81d811f3c35d37e358f6874dd702923a0a934275 (diff)
downloadhercules-b6373365e5ac7ccf01c124fcebce6faba2d7519c.tar.gz
hercules-b6373365e5ac7ccf01c124fcebce6faba2d7519c.tar.bz2
hercules-b6373365e5ac7ccf01c124fcebce6faba2d7519c.tar.xz
hercules-b6373365e5ac7ccf01c124fcebce6faba2d7519c.zip
Replaced occurences of '-1' with the more appropriate 'INVALID_TIMER' value where appropriate.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12998 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 449c4ba52..8766b1fe5 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -3043,7 +3043,7 @@ int run_script_timer(int tid, unsigned int tick, int id, intptr data)
while( node && st->sleep.timer != -1 ) {
if( (int)node->key == st->oid && ((struct script_state *)node->data)->sleep.timer == st->sleep.timer ) {
script_erase_sleepdb(node);
- st->sleep.timer = -1;
+ st->sleep.timer = INVALID_TIMER;
break;
}
node = node->next;
@@ -9187,7 +9187,7 @@ static int buildin_pvpoff_sub(struct block_list *bl,va_list ap)
clif_pvpset(sd, 0, 0, 2);
if (sd->pvp_timer != -1) {
delete_timer(sd->pvp_timer, pc_calc_pvprank_timer);
- sd->pvp_timer = -1;
+ sd->pvp_timer = INVALID_TIMER;
}
return 0;
}
@@ -10244,9 +10244,9 @@ BUILDIN_FUNC(petskillbonus)
// wait for timer to start
if (battle_config.pet_equip_required && pd->pet.equip == 0)
- pd->bonus->timer=-1;
+ pd->bonus->timer = INVALID_TIMER;
else
- pd->bonus->timer=add_timer(gettick()+pd->bonus->delay*1000, pet_skill_bonus_timer, sd->bl.id, 0);
+ pd->bonus->timer = add_timer(gettick()+pd->bonus->delay*1000, pet_skill_bonus_timer, sd->bl.id, 0);
return 0;
}
@@ -10521,9 +10521,9 @@ BUILDIN_FUNC(petrecovery)
} else //Init
pd->recovery = (struct pet_recovery *)aMalloc(sizeof(struct pet_recovery));
- pd->recovery->type=(sc_type)script_getnum(st,2);
- pd->recovery->delay=script_getnum(st,3);
- pd->recovery->timer=-1;
+ pd->recovery->type = (sc_type)script_getnum(st,2);
+ pd->recovery->delay = script_getnum(st,3);
+ pd->recovery->timer = INVALID_TIMER;
return 0;
}
@@ -10561,9 +10561,9 @@ BUILDIN_FUNC(petheal)
//Use delay as initial offset to avoid skill/heal exploits
if (battle_config.pet_equip_required && pd->pet.equip == 0)
- pd->s_skill->timer=-1;
+ pd->s_skill->timer = INVALID_TIMER;
else
- pd->s_skill->timer=add_timer(gettick()+pd->s_skill->delay*1000,pet_heal_timer,sd->bl.id,0);
+ pd->s_skill->timer = add_timer(gettick()+pd->s_skill->delay*1000,pet_heal_timer,sd->bl.id,0);
return 0;
}
@@ -10654,9 +10654,9 @@ BUILDIN_FUNC(petskillsupport)
//Use delay as initial offset to avoid skill/heal exploits
if (battle_config.pet_equip_required && pd->pet.equip == 0)
- pd->s_skill->timer=-1;
+ pd->s_skill->timer = INVALID_TIMER;
else
- pd->s_skill->timer=add_timer(gettick()+pd->s_skill->delay*1000,pet_skill_support_timer,sd->bl.id,0);
+ pd->s_skill->timer = add_timer(gettick()+pd->s_skill->delay*1000,pet_skill_support_timer,sd->bl.id,0);
return 0;
}
@@ -13114,7 +13114,7 @@ BUILDIN_FUNC(awake)
delete_timer(tst->sleep.timer, run_script_timer);
node = script_erase_sleepdb(node);
- tst->sleep.timer = -1;
+ tst->sleep.timer = INVALID_TIMER;
tst->sleep.tick = 0;
run_script_main(tst);
}