From 9fa4acce4a3fd134993a5cfe18506392dbfa5555 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 18 Jul 2012 19:59:36 +0000 Subject: Follow up r16427 fixed issue with parenthesis logic and a battle.c warning on missing parenthesis git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16444 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/battle.c | 2 +- src/map/homunculus.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map/battle.c b/src/map/battle.c index ee7cd6869..35e2fc710 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2741,7 +2741,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo if(sc->data[SC_GT_CHANGE] && sc->data[SC_GT_CHANGE]->val2){ struct block_list *bl; // ATK increase: ATK [{(Caster’s DEX / 4) + (Caster’s STR / 2)} x Skill Level / 5] - if( bl = map_id2bl(sc->data[SC_GT_CHANGE]->val2) ) + if( (bl = map_id2bl(sc->data[SC_GT_CHANGE]->val2)) ) ATK_ADD( ( status_get_dex(bl)/4 + status_get_str(bl)/2 ) * sc->data[SC_GT_CHANGE]->val1 / 5 ); } } diff --git a/src/map/homunculus.c b/src/map/homunculus.c index 6787ca43d..1d7b44168 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -244,7 +244,7 @@ int merc_hom_levelup(struct homun_data *hd) m_class = hom_class2mapid(hd->homunculus.class_); - if((m_class&HOM_REG) && hd->homunculus.level >= battle_config.hom_max_level || (m_class&HOM_S) && hd->homunculus.level >= battle_config.hom_S_max_level || !hd->exp_next || hd->homunculus.exp < hd->exp_next) + if((m_class&HOM_REG) && (hd->homunculus.level >= battle_config.hom_max_level || ((m_class&HOM_S) && hd->homunculus.level >= battle_config.hom_S_max_level) || !hd->exp_next || hd->homunculus.exp < hd->exp_next)) return 0 ; hom = &hd->homunculus; -- cgit v1.2.3-70-g09d2