diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-08-19 12:25:38 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-08-19 12:25:38 +0000 |
commit | 01f8804d4eebaae80443a1613fc3ebc92adf1de0 (patch) | |
tree | 54fd69620d3320369d4f43d9ae089c7efab06e4f /src/map/pc.c | |
parent | be5ec4390952c7b7cb2fef5975318af228bdf992 (diff) | |
download | hercules-01f8804d4eebaae80443a1613fc3ebc92adf1de0.tar.gz hercules-01f8804d4eebaae80443a1613fc3ebc92adf1de0.tar.bz2 hercules-01f8804d4eebaae80443a1613fc3ebc92adf1de0.tar.xz hercules-01f8804d4eebaae80443a1613fc3ebc92adf1de0.zip |
Fixed bugreport:6498 sp respawn restart_sp_rate setting is now fully respected.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16668 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 82e650111..8ccccb46c 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -395,18 +395,17 @@ unsigned char pc_famerank(int char_id, int job) return 0; } -int pc_setrestartvalue(struct map_session_data *sd,int type) -{ +int pc_setrestartvalue(struct map_session_data *sd,int type) { struct status_data *status, *b_status; nullpo_ret(sd); b_status = &sd->base_status; status = &sd->battle_status; - if (type&1) - { //Normal resurrection + if (type&1) { //Normal resurrection status->hp = 1; //Otherwise status_heal may fail if dead. - status_heal(&sd->bl, b_status->hp, b_status->sp>status->sp?b_status->sp-status->sp:0, 1); + status_heal(&sd->bl, b_status->hp, 0, 1); + 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; |