diff options
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index d7c2013c3..16e32d7d3 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5206,9 +5206,10 @@ int pc_resethate(struct map_session_data* sd) int pc_skillatk_bonus(struct map_session_data *sd, int skill_num) { int i, bonus = 0; - ARR_FIND(0, ARRAYLENGTH(sd->skillatk), i, !sd->skillatk[i].id || sd->skillatk[i].id == skill_num); - if( i < ARRAYLENGTH(sd->skillatk) && sd->skillatk[i].id ) - bonus = sd->skillatk[i].val; + + ARR_FIND(0, ARRAYLENGTH(sd->skillatk), i, sd->skillatk[i].id == skill_num); + if( i < ARRAYLENGTH(sd->skillatk) ) bonus = sd->skillatk[i].val; + if( sd->sc.data[SC_SKILLATKBONUS] ) { if( sd->sc.data[SC_SKILLATKBONUS]->val1 && sd->sc.data[SC_SKILLATKBONUS]->val1 == skill_num ) |