From 63b4658868a7fec265ab1c46d86fe72bfa2a3549 Mon Sep 17 00:00:00 2001 From: skotlex Date: Thu, 27 Apr 2006 12:18:18 +0000 Subject: - Fixed base-level up @ command giving stat points instead of taking them away when leveling down. - Some small change in pc_heal which would let you have negative SP if you were killed on the same pc_heal invocation. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6307 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/atcommand.c | 2 +- src/map/pc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index d09db40b9..af87efa99 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2727,7 +2727,7 @@ int atcommand_baselevelup( level = sd->status.base_level-1; if (sd->status.status_point > 0) { for (i = 0; i > -level; i--) - status_point -= (sd->status.base_level + i + 14) / 5; + status_point += (sd->status.base_level + i + 14) / 5; if (sd->status.status_point < status_point) sd->status.status_point = 0; else diff --git a/src/map/pc.c b/src/map/pc.c index b39bd4a73..90fc5dfe9 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5126,14 +5126,14 @@ int pc_heal(struct map_session_data *sd,int hp,int sp) sp = sd->status.max_sp - sd->status.sp; sd->status.sp+=sp; + if(sd->status.sp <= 0) + sd->status.sp = 0; if(sd->status.hp <= 0) { sd->status.hp = 0; pc_damage(NULL,sd,1); hp = 0; } - if(sd->status.sp <= 0) - sd->status.sp = 0; if(hp) clif_updatestatus(sd,SP_HP); -- cgit v1.2.3-70-g09d2