summaryrefslogtreecommitdiff
path: root/src/map/skill.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/skill.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/skill.c')
-rw-r--r--src/map/skill.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 178a946c1..1a11d9a0f 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -5244,7 +5244,7 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr data)
md = BL_CAST(BL_MOB, src);
if( src->prev == NULL ) {
- ud->skilltimer = -1;
+ ud->skilltimer = INVALID_TIMER;
return 0;
}
@@ -5252,17 +5252,17 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr data)
{// otherwise handled in unit_skillcastcancel()
if( ud->skilltimer != tid ) {
ShowError("skill_castend_id: Timer mismatch %d!=%d!\n", ud->skilltimer, tid);
- ud->skilltimer = -1;
+ ud->skilltimer = INVALID_TIMER;
return 0;
}
if( sd && ud->skilltimer != -1 && pc_checkskill(sd,SA_FREECAST) > 0 )
{// restore original walk speed
- ud->skilltimer = -1;
+ ud->skilltimer = INVALID_TIMER;
status_calc_bl(&sd->bl, SCB_SPEED);
}
- ud->skilltimer = -1;
+ ud->skilltimer = INVALID_TIMER;
}
if (ud->skilltarget == id)
@@ -5475,23 +5475,23 @@ int skill_castend_pos(int tid, unsigned int tick, int id, intptr data)
md = BL_CAST(BL_MOB, src);
if( src->prev == NULL ) {
- ud->skilltimer = -1;
+ ud->skilltimer = INVALID_TIMER;
return 0;
}
if( ud->skilltimer != tid )
{
ShowError("skill_castend_pos: Timer mismatch %d!=%d\n", ud->skilltimer, tid);
- ud->skilltimer = -1;
+ ud->skilltimer = INVALID_TIMER;
return 0;
}
if( sd && ud->skilltimer != -1 && pc_checkskill(sd,SA_FREECAST) > 0 )
{// restore original walk speed
- ud->skilltimer=-1;
+ ud->skilltimer = INVALID_TIMER;
status_calc_bl(&sd->bl, SCB_SPEED);
}
- ud->skilltimer=-1;
+ ud->skilltimer = INVALID_TIMER;
do {
if(status_isdead(src))
@@ -7822,12 +7822,13 @@ int skill_check_condition(struct map_session_data* sd, short skill, short lv, in
return 0; //Can't repeat previous combo skill.
}
break;
- } else
- if(sc->data[SC_COMBO]->val1 == skill)
- break; //Combo ready.
- //Cancel combo wait.
- unit_cancel_combo(&sd->bl);
- return 0;
+ }
+ if(sc->data[SC_COMBO]->val1 != skill)
+ { //Cancel combo wait.
+ unit_cancel_combo(&sd->bl);
+ return 0;
+ }
+ break; //Combo ready.
case BD_ADAPTATION:
{
int time;