diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-09-08 18:10:41 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-09-08 18:10:41 +0000 |
commit | 09c1b74588b24ba0fd53b2f2727ffcc75a452713 (patch) | |
tree | 075c51593f3db581c6df7931e011166602310c47 /src/map | |
parent | 2543395e5cfd21d7a1c7d4e337272ccfeb08fd1c (diff) | |
download | hercules-09c1b74588b24ba0fd53b2f2727ffcc75a452713.tar.gz hercules-09c1b74588b24ba0fd53b2f2727ffcc75a452713.tar.bz2 hercules-09c1b74588b24ba0fd53b2f2727ffcc75a452713.tar.xz hercules-09c1b74588b24ba0fd53b2f2727ffcc75a452713.zip |
Fixed bugreport:6651 restart_sp_rate is only applied if user current sp is smaller than restart_sp_rate setting.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16763 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/pc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index f07d4583c..89263ba5f 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -405,7 +405,8 @@ int pc_setrestartvalue(struct map_session_data *sd,int type) { if (type&1) { //Normal resurrection status->hp = 1; //Otherwise status_heal may fail if dead. status_heal(&sd->bl, b_status->hp, 0, 1); - status_set_sp(&sd->bl, b_status->sp, 1); + if( status->sp < b_status->sp ) + status_set_sp(&sd->bl, b_status->sp, 1); } else { //Just for saving on the char-server (with values as if respawned) sd->status.hp = b_status->hp; sd->status.sp = (status->sp < b_status->sp)?b_status->sp:status->sp; |