diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-18 16:43:20 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-18 16:43:20 +0000 |
commit | aff8dade6593463301abee054981a4ea21fff273 (patch) | |
tree | caacd036116e75a315e95302871e2f23718e5c03 /src/map/clif.c | |
parent | 39292f6f6a30287d2a4ffdd035f80616a8e6e8a4 (diff) | |
download | hercules-aff8dade6593463301abee054981a4ea21fff273.tar.gz hercules-aff8dade6593463301abee054981a4ea21fff273.tar.bz2 hercules-aff8dade6593463301abee054981a4ea21fff273.tar.xz hercules-aff8dade6593463301abee054981a4ea21fff273.zip |
- Made HLIF_HEAL a self skill that auto-selects target to caster's master.
- Implemented SC_BLOODLUST and SC_CHANGE, cleaned up HLIF_CHANGE
- Applied a correction to HVAN_EXPLOSION
- Fixed Homun ASPD calculation being able to underflow and give you min speed.
- Added monster_ai&128 to make aggressive mobs ignore that behaviour of always picking Homun targets above player targets regardless of who is closer.
- Fixed homun info packet being unable to display HP/SP correctly once the values are above 32k.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8349 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 0a2b995b9..4537deb26 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1466,14 +1466,14 @@ int clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag) memset(buf,0,packet_len_table[0x22e]);
WBUFW(buf,0)=0x22e;
memcpy(WBUFP(buf,2),sd->homunculus.name,NAME_LENGTH);
- WBUFB(buf,26)=sd->homunculus.rename_flag * 2;
+// WBUFB(buf,26)=sd->homunculus.rename_flag * 2;
// Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true)
WBUFB(buf,26)=sd->homunculus.rename_flag | (sd->homunculus.vaporize << 1) | (sd->homunculus.hp?0:4);
WBUFW(buf,27)=sd->homunculus.level;
WBUFW(buf,29)=sd->homunculus.hunger;
WBUFW(buf,31)=(unsigned short) (sd->homunculus.intimacy / 100) ;
WBUFW(buf,33)=0; // equip id
- WBUFW(buf,35)=status->rhw.atk2;
+ WBUFW(buf,35)=status->rhw.atk2+status->batk;
WBUFW(buf,37)=status->matk_max;
WBUFW(buf,39)=status->hit;
WBUFW(buf,41)=status->cri/10; //crit is a +1 decimal value!
@@ -1481,10 +1481,20 @@ int clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag) WBUFW(buf,45)=status->mdef;
WBUFW(buf,47)=status->flee;
WBUFW(buf,49)=(flag)?0:status->amotion;
- WBUFW(buf,51)=status->hp;
- WBUFW(buf,53)=status->max_hp;
- WBUFW(buf,55)=status->sp;
- WBUFW(buf,57)=status->max_sp;
+ if (status->max_hp > SHRT_MAX) {
+ WBUFW(buf,51) = status->hp/(status->max_hp/100);
+ WBUFW(buf,53) = 100;
+ } else {
+ WBUFW(buf,51)=status->hp;
+ WBUFW(buf,53)=status->max_hp;
+ }
+ if (status->max_sp > SHRT_MAX) {
+ WBUFW(buf,55) = status->sp/(status->max_sp/100);
+ WBUFW(buf,57) = 100;
+ } else {
+ WBUFW(buf,55)=status->sp;
+ WBUFW(buf,57)=status->max_sp;
+ }
WBUFL(buf,59)=sd->homunculus.exp;
WBUFL(buf,63)=hd->exp_next;
WBUFW(buf,67)=sd->homunculus.skillpts;
|