summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-29 01:50:09 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-29 01:50:09 +0000
commitbfc097da65478acd0fff4414621f705bcc2cd739 (patch)
treed5b00552386799ad047e13c567ab5554dae1253f /src/map
parent54ad058192990cf36e5f0520a20326b418ba3ad4 (diff)
downloadhercules-bfc097da65478acd0fff4414621f705bcc2cd739.tar.gz
hercules-bfc097da65478acd0fff4414621f705bcc2cd739.tar.bz2
hercules-bfc097da65478acd0fff4414621f705bcc2cd739.tar.xz
hercules-bfc097da65478acd0fff4414621f705bcc2cd739.zip
Fixed bugreport:6353
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16526 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index a4f5985bd..00b04dc0c 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -351,18 +351,23 @@ int battle_attr_fix(struct block_list *src, struct block_list *target, int damag
status_change_end(target, SC_CRYSTALIZE, INVALID_TIMER);
}
}
- if( src->type == BL_PC || target->type == BL_PC ){
+ if( src->type == BL_PC ){
struct map_session_data *sd = BL_CAST(BL_PC, src);
- struct map_session_data *tsd = BL_CAST(BL_PC, target);
- int s, t;
+ int s;
ARR_FIND(1, 6, s, sd->talisman[s] > 0);
- ARR_FIND(1, 6, t, tsd->talisman[t] > 0);
if( s < 5 && atk_elem == s )
ratio += sd->talisman[s] * 2; // +2% custom value
+ }
+ if( target->type == BL_PC ) {
+ struct map_session_data *tsd = BL_CAST(BL_PC, target);
+ int t;
+
+ ARR_FIND(1, 6, t, tsd->talisman[t] > 0);
+
if( t < 5 && atk_elem == t )
- damage -= damage * tsd->talisman[t] * 3 / 100; // -3% custom value
+ damage -= damage * tsd->talisman[t] * 3 / 100; // -3% custom value
}
return damage*ratio/100;
}