summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-07-05 03:40:34 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-07-05 03:40:34 +0000
commitb047d84cd4edb22e1ab61d8054d69a120e9938a5 (patch)
tree5a1dfe36ff620d8a387de11dbf6754367a82299a /src
parent65d3824a9e6732760ce0e12201f8b856e097d08e (diff)
downloadhercules-b047d84cd4edb22e1ab61d8054d69a120e9938a5.tar.gz
hercules-b047d84cd4edb22e1ab61d8054d69a120e9938a5.tar.bz2
hercules-b047d84cd4edb22e1ab61d8054d69a120e9938a5.tar.xz
hercules-b047d84cd4edb22e1ab61d8054d69a120e9938a5.zip
You should lose hp anyway even if your Martyr's Reckoning is perfect dodged.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13934 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index cfeeeb095..a5c17be30 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1265,14 +1265,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
break;
case PA_SACRIFICE:
wd.damage = sstatus->max_hp* 9/100;
- status_zap(src, wd.damage, 0);//Damage to self is always 9%
wd.damage2 = 0;
-
- if (sc && sc->data[SC_SACRIFICE])
- {
- if (--sc->data[SC_SACRIFICE]->val2 <= 0)
- status_change_end(src, SC_SACRIFICE,-1);
- }
break;
case LK_SPIRALPIERCE:
case ML_SPIRALPIERCE:
@@ -2995,8 +2988,17 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
if (sc)
{
if (sc->data[SC_SACRIFICE])
+ {
+ int skilllv = sc->data[SC_SACRIFICE]->val1;
+
+ if( --sc->data[SC_SACRIFICE]->val2 <= 0 )
+ status_change_end(src, SC_SACRIFICE,-1);
+
+ status_zap(src, sstatus->max_hp*9/100, 0);//Damage to self is always 9%
+
//FIXME: invalid return type!
- return (damage_lv)skill_attack(BF_WEAPON,src,src,target,PA_SACRIFICE,sc->data[SC_SACRIFICE]->val1,tick,0);
+ return (damage_lv)skill_attack(BF_WEAPON,src,src,target,PA_SACRIFICE,skilllv,tick,0);
+ }
if (sc->data[SC_MAGICALATTACK])
//FIXME: invalid return type!
return (damage_lv)skill_attack(BF_MAGIC,src,src,target,NPC_MAGICALATTACK,sc->data[SC_MAGICALATTACK]->val1,tick,0);