summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorJedzkie <jedzkie13@rocketmail.com>2016-03-21 23:55:30 +0800
committerHaru <haru@dotalux.com>2018-11-14 18:43:57 +0100
commit86b70dc7ea0a6d3aee6d99a0f802668fc9a0eb75 (patch)
tree84009e37fa3d86e91ca597c4708a7c0a7b6bd42e /src/map/clif.c
parent639af795caf86f9f30770b5d1d2e9164876deb1f (diff)
downloadhercules-86b70dc7ea0a6d3aee6d99a0f802668fc9a0eb75.tar.gz
hercules-86b70dc7ea0a6d3aee6d99a0f802668fc9a0eb75.tar.bz2
hercules-86b70dc7ea0a6d3aee6d99a0f802668fc9a0eb75.tar.xz
hercules-86b70dc7ea0a6d3aee6d99a0f802668fc9a0eb75.zip
Fixes #889 & #840
- Novice classes will never go below 50% hp when died. - Other classes will show 1 HP rather than 0 when died. - Added battle configuration. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 44cefcd7e..d1ff201ad 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -3244,7 +3244,12 @@ static void clif_updatestatus(struct map_session_data *sd, int type)
WFIFOL(fd,4)=sd->battle_status.max_sp;
break;
case SP_HP:
- WFIFOL(fd,4)=sd->battle_status.hp;
+ if (sd->battle_status.hp == 0 && battle_config.display_fake_hp_when_dead) {
+ // On official servers, the HP displayed when dead is the HP that the character will have at respawn.
+ WFIFOL(fd, 4) = status->get_restart_hp(sd, &sd->battle_status);
+ } else {
+ WFIFOL(fd, 4) = sd->battle_status.hp;
+ }
break;
case SP_SP:
WFIFOL(fd,4)=sd->battle_status.sp;