From b6373365e5ac7ccf01c124fcebce6faba2d7519c Mon Sep 17 00:00:00 2001 From: ultramage Date: Sat, 26 Jul 2008 14:22:28 +0000 Subject: 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 --- src/map/skill.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'src/map/skill.c') 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; -- cgit v1.2.3-70-g09d2