summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-11-25 15:57:37 -0200
committershennetsind <ind@henn.et>2013-11-25 15:57:37 -0200
commit858835c54adb57c54e4870bd61caab8cfcf2f6df (patch)
treed86efd4a99655b53967d0ed31b38d5dca2f1b721 /src/map
parent802fd1926e178629ed99e2f9cba0f708376fb37f (diff)
downloadhercules-858835c54adb57c54e4870bd61caab8cfcf2f6df.tar.gz
hercules-858835c54adb57c54e4870bd61caab8cfcf2f6df.tar.bz2
hercules-858835c54adb57c54e4870bd61caab8cfcf2f6df.tar.xz
hercules-858835c54adb57c54e4870bd61caab8cfcf2f6df.zip
Fixed Bug 7827
Fixed reflect shield not respecting maps reduction flags. Data tested and confirmed on official server, special Thanks to Yommy and Haruna. http://hercules.ws/board/tracker/issue-7827-reflect-shield-woe-reductions-autoguard/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 812301cd6..75885085a 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -5175,7 +5175,19 @@ int64 battle_calc_return_damage(struct block_list* bl, struct block_list *src, i
}
if( sc && sc->count ) {
if( sc->data[SC_REFLECTSHIELD] && skill_id != WS_CARTTERMINATION ){
- NORMALIZE_RDAMAGE(damage * sc->data[SC_REFLECTSHIELD]->val2 / 100);
+ int64 t = damage * sc->data[SC_REFLECTSHIELD]->val2 / 100;
+
+ if (flag & BF_SKILL) {
+ if (flag&BF_WEAPON)
+ t = t * map->list[bl->m].weapon_damage_rate / 100;
+ if (flag&BF_MISC)
+ t = t * map->list[bl->m].misc_damage_rate / 100;
+ } else {
+ if (flag & BF_SHORT)
+ t = t * map->list[bl->m].short_damage_rate / 100;
+ }
+
+ NORMALIZE_RDAMAGE(t);
*delay = clif->skill_damage(src, src, timer->gettick(), status_get_amotion(src), status_get_dmotion(src), rdamage, 1, CR_REFLECTSHIELD, 1, 4);
}
if( sc->data[SC_LG_REFLECTDAMAGE] && rand()%100 < (30 + 10*sc->data[SC_LG_REFLECTDAMAGE]->val1) ) {