diff options
author | Haru <haru@dotalux.com> | 2018-04-22 21:02:00 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2018-11-14 18:44:19 +0100 |
commit | 8269fdcd5d036ddc3c24bc0ebb4ad958b5c19a3a (patch) | |
tree | 12f538ec393399874eedc24724281b2980c59dc8 /src/map/pc.c | |
parent | 9ae4b5ad26029f8056635a6112828d87dc671184 (diff) | |
download | hercules-8269fdcd5d036ddc3c24bc0ebb4ad958b5c19a3a.tar.gz hercules-8269fdcd5d036ddc3c24bc0ebb4ad958b5c19a3a.tar.bz2 hercules-8269fdcd5d036ddc3c24bc0ebb4ad958b5c19a3a.tar.xz hercules-8269fdcd5d036ddc3c24bc0ebb4ad958b5c19a3a.zip |
Extend status->heal() with a flag to allow reviving a dead character
This adds `STATUS_HEAL_ALLOWREVIVE` to `enum status_heal_flag`.
Fixes an issue caused by a hack in the resurrection code, that would
make characters respawn with 2 HP instead of 1.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index ba2edf0f4..78b773550 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -523,8 +523,7 @@ static int pc_setrestartvalue(struct map_session_data *sd, int type) if (type&1) { //Normal resurrection - st->hp = 1; //Otherwise status->heal may fail if dead. - status->heal(&sd->bl, bst->hp, 0, STATUS_HEAL_FORCED); + status->heal(&sd->bl, bst->hp, 0, STATUS_HEAL_FORCED | STATUS_HEAL_ALLOWREVIVE); if( st->sp < bst->sp ) status->set_sp(&sd->bl, bst->sp, STATUS_HEAL_FORCED); } else { //Just for saving on the char-server (with values as if respawned) |