summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c12
-rw-r--r--src/map/mob.c6
2 files changed, 12 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;
diff --git a/src/map/mob.c b/src/map/mob.c
index 8db078e27..8c8f59f4a 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -3225,6 +3225,9 @@ static int mob_readdb(void)
status->adelay=atoi(str[27]);
status->amotion=atoi(str[28]);
status->dmotion=atoi(str[29]);
+ //If the attack animation is longer than the delay, the client crops the attack animation!
+ if (status->adelay < status->amotion)
+ status->adelay = status->amotion;
if(battle_config.monster_damage_delay_rate != 100)
status->dmotion = status->dmotion*battle_config.monster_damage_delay_rate/100;
@@ -3904,6 +3907,9 @@ static int mob_read_sqldb(void)
status->adelay = TO_INT(27);
status->amotion = TO_INT(28);
status->dmotion = TO_INT(29);
+ //If the attack animation is longer than the delay, the client crops the attack animation!
+ if (status->adelay < status->amotion)
+ status->adelay = status->amotion;
if(battle_config.monster_damage_delay_rate != 100)
status->dmotion = status->dmotion*battle_config.monster_damage_delay_rate/100;