summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-02-15 14:10:50 -0200
committershennetsind <ind@henn.et>2013-02-15 14:10:50 -0200
commit2c13a2a2dab83b3471bf5ce24371259012036e19 (patch)
tree04756c66a730e7f72ae257586a577c951666e349 /src/map
parenta244b61804209ec8a836d8d3f1b7220b2bfec990 (diff)
downloadhercules-2c13a2a2dab83b3471bf5ce24371259012036e19.tar.gz
hercules-2c13a2a2dab83b3471bf5ce24371259012036e19.tar.bz2
hercules-2c13a2a2dab83b3471bf5ce24371259012036e19.tar.xz
hercules-2c13a2a2dab83b3471bf5ce24371259012036e19.zip
Adjusted 'adjust_skill_damage' Mapflag
The flag is now respected by all unit types, not only players. This also fixes a previous problem as reported by exneval (Thanks!) Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 460826414..a6605da5e 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3104,13 +3104,12 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
break;
}
- if( sd )
- {
+ if( (i = battle_adjust_skill_damage(src->m,skill_id)) )
+ ATK_RATE(i);
+
+ if( sd ) {
if (skill_id && (i = pc_skillatk_bonus(sd, skill_id)))
ATK_ADDRATE(i);
-
- if( (i = battle_adjust_skill_damage(sd->bl.m,skill_id)) )
- ATK_RATE(i);
if( skill_id != PA_SACRIFICE && skill_id != MO_INVESTIGATE && skill_id != CR_GRANDCROSS && skill_id != NPC_GRANDDARKNESS && skill_id != PA_SHIELDCHAIN && !flag.cri )
{ //Elemental/Racial adjustments
@@ -4094,7 +4093,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
if ((i = pc_skillatk_bonus(sd, skill_id)))
ad.damage += ad.damage*i/100;
- if( (i = battle_adjust_skill_damage(sd->bl.m,skill_id)) )
+ if( (i = battle_adjust_skill_damage(src->m,skill_id)) )
MATK_RATE(i);
//Ignore Defense?
@@ -4477,7 +4476,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
if (sd && (i = pc_skillatk_bonus(sd, skill_id)))
md.damage += md.damage*i/100;
- if( (i = battle_adjust_skill_damage(sd->bl.m,skill_id)) )
+ if( (i = battle_adjust_skill_damage(src->m,skill_id)) )
md.damage = md.damage * i / 100;
if(md.damage < 0)