summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpanikon <panikon@zoho.com>2014-03-20 21:05:16 -0300
committerpanikon <panikon@zoho.com>2014-03-20 21:05:16 -0300
commitc9310f3ffdf0532ee728f256590d516106050885 (patch)
tree888830a422c1c9b302fe9a7832d7e0dd3e7149f1 /src
parent4acf44f9f74c9b1ef8153e711072769e708b7128 (diff)
downloadhercules-c9310f3ffdf0532ee728f256590d516106050885.tar.gz
hercules-c9310f3ffdf0532ee728f256590d516106050885.tar.bz2
hercules-c9310f3ffdf0532ee728f256590d516106050885.tar.xz
hercules-c9310f3ffdf0532ee728f256590d516106050885.zip
Fixed issue 6415
http://hercules.ws/board/tracker/issue-6415-kaite-skills-reflect/
Diffstat (limited to 'src')
-rw-r--r--src/map/skill.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 390900d4f..4b2bc200e 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2054,8 +2054,11 @@ int skill_blown(struct block_list* src, struct block_list* target, int count, in
}
-//Checks if 'bl' should reflect back a spell cast by 'src'.
-//type is the type of magic attack: 0: indirect (aoe), 1: direct (targetted)
+// Checks if 'bl' should reflect back a spell cast by 'src'.
+// type is the type of magic attack: 0: indirect (aoe), 1: direct (targetted)
+// In case of success returns type of reflection, otherwise 0
+// 1 - Regular reflection (Maya)
+// 2 - SL_KAITE reflection
int skill_magic_reflect(struct block_list* src, struct block_list* bl, int type) {
struct status_change *sc = status->get_sc(bl);
struct map_session_data* sd = BL_CAST(BL_PC, bl);
@@ -2197,7 +2200,15 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
* Official Magic Reflection Behavior : damage reflected depends on gears caster wears, not target
**/
#if MAGIC_REFLECTION_TYPE
- if( dmg.dmg_lv != ATK_MISS ){ //Wiz SL cancelled and consumed fragment
+
+ #if defined(DISABLE_RENEWAL)
+ // issue:6415 in pre-renewal Kaite reflected the entire damage received
+ // regardless of caster's equipament (Aegis 11.1)
+ if( dmg.dmg_lv != ATK_MISS && type == 1 ) //Wiz SL cancelled and consumed fragment
+ #else
+ if( dmg.dmg_lv != ATK_MISS ) //Wiz SL cancelled and consumed fragment
+ #endif
+ {
short s_ele = skill->get_ele(skill_id, skill_lv);
if (s_ele == -1) // the skill takes the weapon's element
@@ -2218,10 +2229,9 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
status_change_end(bl, SC_ENERGYCOAT, INVALID_TIMER);
//Reduction: 6% + 6% every 20%
dmg.damage -= dmg.damage * (6 * (1+per)) / 100;
- }
-
+ }
}
- #endif
+ #endif /* MAGIC_REFLECTION_TYPE */
}
if(sc && sc->data[SC_MAGICROD] && src == dsrc) {
int sp = skill->get_sp(skill_id,skill_lv);