summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 14a9b564b..6b2e4e37a 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2384,18 +2384,25 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
if(sd) {
- int sp = 0;
+ int sp = 0, hp = 0;
if (sd->state.attack_type == BF_MAGIC && (i=pc_checkskill(sd,HW_SOULDRAIN))>0){ /* ソウルドレイン */
clif_skill_nodamage(src,&md->bl,HW_SOULDRAIN,i,1);
sp += (status_get_lv(&md->bl))*(65+15*i)/100;
}
sp += sd->sp_gain_value;
+ hp += sd->hp_gain_value;
if (sp > 0) {
if(sd->status.sp + sp > sd->status.max_sp)
sp = sd->status.max_sp - sd->status.sp;
sd->status.sp += sp;
clif_heal(sd->fd,SP_SP,sp);
}
+ if (hp > 0) {
+ if(sd->status.hp + hp > sd->status.max_hp)
+ hp = sd->status.max_hp - sd->status.hp;
+ sd->status.hp += hp;
+ clif_heal(sd->fd,SP_HP,hp);
+ }
}
// map外に消えた人は計算から除くので