summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 1dd13b67b..a5f33a655 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -546,7 +546,8 @@ int battle_get_baseatk(struct block_list *bl)
sc_data=battle_get_sc_data(bl);
if(bl->type==BL_PC && (struct map_session_data *)bl) {
batk = ((struct map_session_data *)bl)->base_atk; //設定されているbase_atk
- batk += ((struct map_session_data *)bl)->weapon_atk[((struct map_session_data *)bl)->status.weapon];
+ if (((struct map_session_data *)bl)->status.weapon < 16)
+ batk += ((struct map_session_data *)bl)->weapon_atk[((struct map_session_data *)bl)->status.weapon];
} else { //それ以外なら
int str,dstr;
str = battle_get_str(bl); //STR
@@ -3075,8 +3076,10 @@ static struct Damage battle_calc_pc_weapon_attack(
else
damage2 += atkmin_ ;
if(sd->atk_rate != 100 || sd->weapon_atk_rate != 0) {
- damage = (damage * (sd->atk_rate + sd->weapon_atk_rate[sd->status.weapon]))/100;
- damage2 = (damage2 * (sd->atk_rate + sd->weapon_atk_rate[sd->status.weapon]))/100;
+ if (((struct map_session_data *)bl)->status.weapon < 16) {
+ damage = (damage * (sd->atk_rate + sd->weapon_atk_rate[sd->status.weapon]))/100;
+ damage2 = (damage2 * (sd->atk_rate + sd->weapon_atk_rate[sd->status.weapon]))/100;
+ }
}
if(sd->state.arrow_atk) {