summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-26 21:43:33 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-26 21:43:33 +0000
commit9ec5fbe2735ffb4ad524f7f5c2c798872106b0aa (patch)
tree32ad5e36536a3019cfc55fb3d099f2f159a1f8c7 /src/map/battle.c
parentc14814b628fb14c7266310328969a745dd08d042 (diff)
downloadhercules-9ec5fbe2735ffb4ad524f7f5c2c798872106b0aa.tar.gz
hercules-9ec5fbe2735ffb4ad524f7f5c2c798872106b0aa.tar.bz2
hercules-9ec5fbe2735ffb4ad524f7f5c2c798872106b0aa.tar.xz
hercules-9ec5fbe2735ffb4ad524f7f5c2c798872106b0aa.zip
update
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@795 54d463be-8e91-2dee-dedb-b68131a5f0ec
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) {