summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c4
-rw-r--r--src/map/mercenary.c3
-rw-r--r--src/map/status.c9
3 files changed, 7 insertions, 9 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index bdb989d3f..8dfe196d4 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1203,7 +1203,7 @@ int clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag)
WBUFL(buf,59)=hd->homunculus.exp;
WBUFL(buf,63)=hd->exp_next;
WBUFW(buf,67)=hd->homunculus.skillpts;
- WBUFW(buf,69)=1; // FIXME: Attackable? When exactly is a homun not attackable? [Skotlex]
+ WBUFW(buf,69)=2; // FIXME: undocumented flag, seems to be '2' all the time [ultramage]
clif_send(buf,packet_len(0x22e),&sd->bl,SELF);
return 0;
}
@@ -7832,9 +7832,9 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
if(merc_is_hom_active(sd->hd)) {
map_addblock(&sd->hd->bl);
clif_spawn(&sd->hd->bl);
+ clif_send_homdata(sd,0,0);
clif_hominfo(sd,sd->hd,1);
clif_hominfo(sd,sd->hd,0); //for some reason, at least older clients want this sent twice
- clif_send_homdata(sd,0,0);
clif_homskillinfoblock(sd);
if (battle_config.hom_setting&0x8)
status_calc_bl(&sd->hd->bl, SCB_SPEED); //Homunc mimic their master's speed on each map change
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 0a9c4aab5..9030e6e90 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -716,11 +716,10 @@ int merc_hom_recv_data(int account_id, struct s_homunculus *sh, int flag)
{
map_addblock(&hd->bl);
clif_spawn(&hd->bl);
+ clif_send_homdata(sd,SP_ACK,0);
clif_hominfo(sd,hd,1);
clif_hominfo(sd,hd,0); // send this x2. dunno why, but kRO does that [blackhole89]
clif_homskillinfoblock(sd);
- clif_hominfo(sd,hd,0);
- clif_send_homdata(sd,SP_ACK,0);
merc_hom_init_timers(hd);
}
return 1;
diff --git a/src/map/status.c b/src/map/status.c
index 68579b059..1b8ce5dbc 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2404,6 +2404,7 @@ int status_calc_homunculus(struct homun_data *hd, int first)
struct status_data b_status, *status;
struct s_homunculus *hom;
int skill;
+ int amotion;
memcpy(&b_status, &hd->base_status, sizeof(struct status_data));
hom = &hd->homunculus;
@@ -2468,17 +2469,15 @@ int status_calc_homunculus(struct homun_data *hd, int first)
status->aspd_rate = 1000;
- skill = (1000 -4*status->agi -status->dex)
- *hd->homunculusDB->baseASPD/1000;
-
- status->amotion = cap_value(skill,battle_config.max_aspd,2000);
+ amotion = (1000 -4*status->agi -status->dex) * hd->homunculusDB->baseASPD/1000;
+ status->amotion = cap_value(amotion,battle_config.max_aspd,2000);
status->adelay = status->amotion; //It seems adelay = amotion for Homunculus.
status_calc_misc(&hd->bl, status, hom->level);
status_cpy(&hd->battle_status, status);
status_calc_bl(&hd->bl, SCB_ALL); //Status related changes.
- if (memcmp(&b_status, status, sizeof(struct status_data)))
+ if( memcmp(&b_status, status, sizeof(struct status_data)) && !first )
clif_hominfo(hd->master,hd,0) ;
return 1;