summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-30 15:29:17 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-30 15:29:17 +0000
commita1fddcf716995eddf1c26e1395c8cc24ce6b3eba (patch)
tree81c5947a93a0b58b2d684a2d9589cec4c68f1673 /src/map/clif.c
parent6f704b3e087d36513e4c5b190da10141231fb187 (diff)
downloadhercules-a1fddcf716995eddf1c26e1395c8cc24ce6b3eba.tar.gz
hercules-a1fddcf716995eddf1c26e1395c8cc24ce6b3eba.tar.bz2
hercules-a1fddcf716995eddf1c26e1395c8cc24ce6b3eba.tar.xz
hercules-a1fddcf716995eddf1c26e1395c8cc24ce6b3eba.zip
- Small optimization in battle_check_target
- Disabled ontouch npcs triggering on hidden/chase-walk characters. - Added the SC* code blocks relevant to SC_AVOID, SC_CHANGE, SC_BLOODLUST, SC_FLEET - Added structure status_data to homun_data - Added handling of BL_HOMUNCULUS in status_heal, status_damage. - Cleaned up the homun-submitted code, moved the relevant code to status_calc_homunculus. - Updated map-server Makefile to compile mercenary.* files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6847 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 7dda64347..3f26df905 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1392,29 +1392,29 @@ int clif_homunack(struct map_session_data *sd)
int clif_homuninfo(struct map_session_data *sd)
{
struct homun_data *hd = sd->hd;
+ struct status_data *status;
unsigned char buf[128];
- nullpo_retr(0, sd);
- nullpo_retr(0, sd->hd);
-
+ nullpo_retr(0, hd);
+ status = &hd->battle_status;
memset(buf,0,71); //packet_len_table[0x22e]);
WBUFW(buf,0)=0x22e;
memcpy(WBUFP(buf,2),hd->name,NAME_LENGTH);
WBUFW(buf,27)=hd->level;
WBUFW(buf,29)=hd->hunger_rate;
WBUFL(buf,31)=0xFF; //intimacy, leave it as is
- WBUFW(buf,35)=hd->atk;
- WBUFW(buf,37)=hd->matk;
- WBUFW(buf,39)=hd->hit;
- WBUFW(buf,41)=hd->crit/10; //crit is a +1 decimal value!
- WBUFW(buf,43)=hd->def;
- WBUFW(buf,45)=hd->mdef;
- WBUFW(buf,47)=hd->flee;
- WBUFW(buf,49)=status_get_amotion(&hd->bl)+200; //credits to jA for this field.
- WBUFW(buf,51)=hd->hp;
- WBUFW(buf,53)=hd->max_hp;
- WBUFW(buf,55)=hd->sp;
- WBUFW(buf,57)=hd->max_sp;
+ WBUFW(buf,35)=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!
+ WBUFW(buf,43)=status->def;
+ WBUFW(buf,45)=status->mdef;
+ WBUFW(buf,47)=status->flee;
+ WBUFW(buf,49)=status->amotion;
+ WBUFW(buf,51)=status->hp;
+ WBUFW(buf,53)=status->max_hp;
+ WBUFW(buf,55)=status->sp;
+ WBUFW(buf,57)=status->max_sp;
WBUFL(buf,59)=hd->exp;
WBUFL(buf,63)=hd->exp_next;
WBUFW(buf,67)=hd->skillpts;
@@ -8294,7 +8294,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
}
//homunculus [blackhole89]
- if(sd->hd && sd->hd->alive) {
+ if(sd->hd && sd->hd->battle_status.hp) {
map_addblock(&sd->hd->bl);
clif_spawn(&sd->hd->bl);
clif_homunack(sd);