diff options
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 3b3ea2047..44adef051 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -4118,7 +4118,8 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * #else short totaldef = tstatus->def2 + (short)status->get_def(target); #endif - if ( sd ) wd.damage += sd->bonus.arrow_atk; + if (sd != NULL) + wd.damage += sd->bonus.arrow_atk; md.damage = (int)(3 * (1 + wd.damage) * (5 + skill_lv) / 5.0f); md.damage -= totaldef; @@ -4583,7 +4584,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list skill_id == NJ_KIRIKAGE)) { short cri = sstatus->cri; - if (sd) { + if (sd != NULL) { // if show_katar_crit_bonus is enabled, it already done the calculation in status.c if (!battle_config.show_katar_crit_bonus && sd->status.weapon == W_KATAR) { cri <<= 1; |