summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-09-20 13:37:12 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-09-20 13:37:12 +0000
commit9667d693f53f5eb0be58798bbb953aa3ee0146b8 (patch)
treedd4d95234b290291fcf46a75aef2751f6bd0e057 /src/map/skill.c
parentf0e5b3a195cedb1bd62e7cc3f214c004aa209042 (diff)
downloadhercules-9667d693f53f5eb0be58798bbb953aa3ee0146b8.tar.gz
hercules-9667d693f53f5eb0be58798bbb953aa3ee0146b8.tar.bz2
hercules-9667d693f53f5eb0be58798bbb953aa3ee0146b8.tar.xz
hercules-9667d693f53f5eb0be58798bbb953aa3ee0146b8.zip
Fixed when devoter is killed by the redirected damage, devotee takes the whole damage. (follow up to r14406)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14410 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index ac6591cad..baf30af35 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1715,23 +1715,6 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
&& skillid != WS_CARTTERMINATION )
rdamage = battle_calc_return_damage(bl, damage, dmg.flag);
- if( sc && sc->data[SC_DEVOTION] && skillid != PA_PRESSURE )
- {
- struct status_change_entry *sce = sc->data[SC_DEVOTION];
- struct block_list *d_bl = map_id2bl(sce->val1);
-
- if( d_bl && (
- (d_bl->type == BL_MER && ((TBL_MER*)d_bl)->master && ((TBL_MER*)d_bl)->master->bl.id == bl->id) ||
- (d_bl->type == BL_PC && ((TBL_PC*)d_bl)->devotion[sce->val2] == bl->id)
- ) && check_distance_bl(bl, d_bl, sce->val3) )
- {
- clif_damage(d_bl, d_bl, gettick(), 0, 0, damage, 0, 0, 0);
- status_fix_damage(NULL, d_bl, damage, 0);
- }
- else
- status_change_end(bl, SC_DEVOTION, -1);
- }
-
//Skill hit type
type=(skillid==0)?5:skill_get_hit(skillid);
@@ -1945,6 +1928,23 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
if (dmg.amotion)
battle_delay_damage(tick, dmg.amotion,src,bl,dmg.flag,skillid,skilllv,damage,dmg.dmg_lv,dmg.dmotion);
+ if( sc && sc->data[SC_DEVOTION] && skillid != PA_PRESSURE )
+ {
+ struct status_change_entry *sce = sc->data[SC_DEVOTION];
+ struct block_list *d_bl = map_id2bl(sce->val1);
+
+ if( d_bl && (
+ (d_bl->type == BL_MER && ((TBL_MER*)d_bl)->master && ((TBL_MER*)d_bl)->master->bl.id == bl->id) ||
+ (d_bl->type == BL_PC && ((TBL_PC*)d_bl)->devotion[sce->val2] == bl->id)
+ ) && check_distance_bl(bl, d_bl, sce->val3) )
+ {
+ clif_damage(d_bl, d_bl, gettick(), 0, 0, damage, 0, 0, 0);
+ status_fix_damage(NULL, d_bl, damage, 0);
+ }
+ else
+ status_change_end(bl, SC_DEVOTION, -1);
+ }
+
if(skillid == RG_INTIMIDATE && damage > 0 && !(tstatus->mode&MD_BOSS)) {
int rate = 50 + skilllv * 5;
rate = rate + (status_get_lv(src) - status_get_lv(bl));