diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-02-19 08:04:33 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-02-19 08:04:33 +0000 |
commit | 48f8a39dbac7dd47104933a5c7cab30412987ecc (patch) | |
tree | d277b83b8b04a77b61bf2884f8d46d308875832e /src/map/mob.c | |
parent | 2b19bc81ba8005d28810b3180da9c6d0a58b01c8 (diff) | |
download | hercules-48f8a39dbac7dd47104933a5c7cab30412987ecc.tar.gz hercules-48f8a39dbac7dd47104933a5c7cab30412987ecc.tar.bz2 hercules-48f8a39dbac7dd47104933a5c7cab30412987ecc.tar.xz hercules-48f8a39dbac7dd47104933a5c7cab30412987ecc.zip |
* Added bSubSize, bHPGainValue, and bDamageWhenUnequip
* Updated bSPDrainValue/Rate
* Set baby class players' size to 0(small)
* Fixed item_db2.txt reading printing wrong number of entries read
* Fixed @allskill not giving the newer stalker, whitesmith and creator skills
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1139 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 9 |
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外に消えた人は計算から除くので |