summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-28 21:23:27 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-28 21:23:27 +0000
commit0c3055fdbf06b7ca736edaa63e9a414081cd847b (patch)
tree87a98d029f4e40bf38cca2011a7daec66255e708 /src/map/pc.c
parent2a97fa2a68d6b57c0674681452d41c0691c7763b (diff)
downloadhercules-0c3055fdbf06b7ca736edaa63e9a414081cd847b.tar.gz
hercules-0c3055fdbf06b7ca736edaa63e9a414081cd847b.tar.bz2
hercules-0c3055fdbf06b7ca736edaa63e9a414081cd847b.tar.xz
hercules-0c3055fdbf06b7ca736edaa63e9a414081cd847b.zip
- Fixed (?) the Family recall warp skills.
- Fixed pc_percentheal giving life when the rates are negative. - Fixed resetting stats losing the +52 bonus on high classes. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5793 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index d2eee308d..57f4b8d50 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4430,7 +4430,8 @@ int pc_resetstate(struct map_session_data* sd)
int stat;
stat = statp[sd->status.base_level];
if (sd->class_&JOBL_UPPER)
- sd->status.status_point+=52; // extra 52+48=100 stat points
+ stat+=52; // extra 52+48=100 stat points
+
if (stat > USHRT_MAX)
sd->status.status_point = USHRT_MAX;
else
@@ -5374,11 +5375,11 @@ int pc_percentheal(struct map_session_data *sd,int hp,int sp)
}
else { //hp < 0
hp = sd->status.max_hp*hp/100;
- if (sd->status.hp <= hp) {
+ if (sd->status.hp <= -hp) {
sd->status.hp = 0;
pc_damage(NULL,sd,1);
} else
- sd->status.hp -= hp;
+ sd->status.hp += hp;
}
}
if(sp) {
@@ -5394,10 +5395,10 @@ int pc_percentheal(struct map_session_data *sd,int hp,int sp)
sd->status.sp += sp;
} else { //sp < 0
sp = sd->status.max_sp*sp/100;
- if (sd->status.sp <= sp)
+ if (sd->status.sp <= -sp)
sd->status.sp = 0;
else
- sd->status.sp -= sp;
+ sd->status.sp += sp;
}
}
if(hp)