summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-19 14:31:01 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-19 14:31:01 +0000
commit5971c8892d819545607ea75edf79996460f71c46 (patch)
tree84e25aeee5a3fdb40466dcc29d894a8570be97e2 /src/map/clif.c
parent54620fe548004a87a9fdf3066a8f353061a6d8ee (diff)
downloadhercules-5971c8892d819545607ea75edf79996460f71c46.tar.gz
hercules-5971c8892d819545607ea75edf79996460f71c46.tar.bz2
hercules-5971c8892d819545607ea75edf79996460f71c46.tar.xz
hercules-5971c8892d819545607ea75edf79996460f71c46.zip
- Corrected Trim chars to block 'enter', as explained by the Ultra mage.
- When the client passes account version 0, the login server will set it to 1 now. - Corrected the HP bar scaling when HP is above Short Max. It should display fine for any HP value now. - Added a check when the mob's adelay is shorter than the amotion, in which case the adelay will be changed to the amotion value. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7742 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 3953b356c..2d925bfdc 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -6121,8 +6121,8 @@ int clif_party_hp(struct map_session_data *sd)
WBUFW(buf,0)=0x106;
WBUFL(buf,2)=sd->status.account_id;
if (sd->battle_status.max_hp > SHRT_MAX) { //To correctly display the %hp bar. [Skotlex]
- WBUFW(buf,6) = 10000*sd->battle_status.hp/sd->battle_status.max_hp;
- WBUFW(buf,8) = 10000;
+ WBUFW(buf,6) = sd->battle_status.hp/(sd->battle_status.max_hp/100);
+ WBUFW(buf,8) = 100;
} else {
WBUFW(buf,6) = sd->battle_status.hp;
WBUFW(buf,8) = sd->battle_status.max_hp;
@@ -6141,8 +6141,8 @@ static void clif_hpmeter_single(int fd, struct map_session_data *sd)
WFIFOW(fd,0) = 0x106;
WFIFOL(fd,2) = sd->status.account_id;
if (sd->battle_status.max_hp > SHRT_MAX) { //To correctly display the %hp bar. [Skotlex]
- WFIFOW(fd,6) = 10000*sd->battle_status.hp/sd->battle_status.max_hp;
- WFIFOW(fd,8) = 10000;
+ WFIFOW(fd,6) = 100*sd->battle_status.hp/(sd->battle_status.max_hp/100);
+ WFIFOW(fd,8) = 100;
} else {
WFIFOW(fd,6) = sd->battle_status.hp;
WFIFOW(fd,8) = sd->battle_status.max_hp;
@@ -6171,8 +6171,8 @@ int clif_hpmeter(struct map_session_data *sd)
WBUFW(buf,0) = 0x106;
WBUFL(buf,2) = sd->status.account_id;
if (sd->battle_status.max_hp > SHRT_MAX) { //To correctly display the %hp bar. [Skotlex]
- WBUFW(buf,6) = 10000*sd->battle_status.hp/sd->battle_status.max_hp;
- WBUFW(buf,8) = 10000;
+ WBUFW(buf,6) = 100*sd->battle_status.hp/(sd->battle_status.max_hp/100);
+ WBUFW(buf,8) = 100;
} else {
WBUFW(buf,6) = sd->battle_status.hp;
WBUFW(buf,8) = sd->battle_status.max_hp;