diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-21 15:46:36 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-21 15:46:36 +0000 |
commit | b8e86044ea41feb23de00bd36b45b80d9837425f (patch) | |
tree | 43f4f14680f5245c68fb64ac4083983feef0d566 /src | |
parent | 3fc3bc499c203c6cb17d10709bf1f589a44d0642 (diff) | |
download | hercules-b8e86044ea41feb23de00bd36b45b80d9837425f.tar.gz hercules-b8e86044ea41feb23de00bd36b45b80d9837425f.tar.bz2 hercules-b8e86044ea41feb23de00bd36b45b80d9837425f.tar.xz hercules-b8e86044ea41feb23de00bd36b45b80d9837425f.zip |
- Small bug fixes found during merging to stable process, includes correct HP scaling when hp-meter is enabled and max hp is above SHRT_MAX
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7802 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/atcommand.c | 2 | ||||
-rw-r--r-- | src/map/clif.c | 4 | ||||
-rw-r--r-- | src/map/pc.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index a08023dc1..54d2949f6 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2571,7 +2571,7 @@ int atcommand_item( item_id = item_data->nameid;
get_count = number;
//Check if it's stackable.
- if (itemdb_isstackable2(item_data))
+ if (!itemdb_isstackable2(item_data))
get_count = 1;
for (i = 0; i < number; i += get_count) {
diff --git a/src/map/clif.c b/src/map/clif.c index 9e29301d8..016629098 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -6144,7 +6144,7 @@ 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) = 100*sd->battle_status.hp/(sd->battle_status.max_hp/100);
+ WFIFOW(fd,6) = sd->battle_status.hp/(sd->battle_status.max_hp/100);
WFIFOW(fd,8) = 100;
} else {
WFIFOW(fd,6) = sd->battle_status.hp;
@@ -6174,7 +6174,7 @@ 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) = 100*sd->battle_status.hp/(sd->battle_status.max_hp/100);
+ 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;
diff --git a/src/map/pc.c b/src/map/pc.c index 75fc34b7e..dd8d15f09 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4151,7 +4151,7 @@ int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int else sd->status.job_exp += job_exp; - while(pc_checkjoblevelup(sd)) ; + pc_checkjoblevelup(sd); clif_updatestatus(sd,SP_JOBEXP); |