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/clif.h2
-rw-r--r--src/map/pet.c14
3 files changed, 11 insertions, 9 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 3ee121d2f..9d1e8d6dc 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -6311,7 +6311,7 @@ int clif_pet_performance(struct block_list *bl,int param)
return 0;
}
-int clif_pet_equip(struct pet_data *pd,int nameid)
+int clif_pet_equip(struct pet_data *pd)
{
unsigned char buf[16];
@@ -7727,7 +7727,7 @@ int clif_charnameack (int fd, struct block_list *bl)
WBUFW(buf, 0) = cmd = 0x195;
sprintf(mobhp, "HP: %u/%u", md->status.hp, md->status.max_hp);
//Even thought mobhp ain't a name, we send it as one so the client
- //can parse it.
+ //can parse it. [Skotlex]
memcpy(WBUFP(buf,30), mobhp, NAME_LENGTH);
WBUFB(buf,54) = 0;
memcpy(WBUFP(buf,78), mobhp, NAME_LENGTH);
diff --git a/src/map/clif.h b/src/map/clif.h
index 64c0ef2eb..472d41de6 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -315,7 +315,7 @@ int clif_send_petdata(struct map_session_data *sd,int type,int param);
int clif_send_petstatus(struct map_session_data *sd);
int clif_pet_emotion(struct pet_data *pd,int param);
int clif_pet_performance(struct block_list *bl,int param);
-int clif_pet_equip(struct pet_data *pd,int nameid);
+int clif_pet_equip(struct pet_data *pd);
int clif_pet_food(struct map_session_data *sd,int foodid,int fail);
int clif_send (unsigned char *buf, int len, struct block_list *bl, int type);
diff --git a/src/map/pet.c b/src/map/pet.c
index 4653ec814..428114dc8 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -402,7 +402,7 @@ int pet_data_init(struct map_session_data *sd)
pd->bl.subtype = MONS;
pd->bl.type = BL_PET;
pd->msd = sd;
- status_set_viewdata(&pd->bl,pd->class_);
+ status_set_viewdata(&pd->bl, pd->class_);
unit_dataset(&pd->bl);
pd->ud.dir = sd->ud.dir;
pd->last_thinktime = gettick();
@@ -457,7 +457,7 @@ int pet_birth_process(struct map_session_data *sd)
clif_spawn(&sd->pd->bl);
clif_send_petdata(sd,0,0);
clif_send_petdata(sd,5,battle_config.pet_hair_style);
- clif_pet_equip(sd->pd,sd->pet.equip);
+ clif_pet_equip(sd->pd);
clif_send_petstatus(sd);
Assert((sd->status.pet_id == 0 || sd->pd == 0) || sd->pd->msd == sd);
@@ -502,7 +502,7 @@ int pet_recv_petdata(int account_id,struct s_pet *p,int flag)
clif_spawn(&sd->pd->bl);
clif_send_petdata(sd,0,0);
clif_send_petdata(sd,5,battle_config.pet_hair_style);
-// clif_pet_equip(sd->pd,sd->pet.equip);
+// clif_pet_equip(sd->pd);
clif_send_petstatus(sd);
}
}
@@ -707,7 +707,7 @@ int pet_change_name(struct map_session_data *sd,char *name, int flag) //flag 0 =
clif_charnameack (0,&sd->pd->bl);
sd->pet.rename_flag = 1;
- clif_pet_equip(sd->pd,sd->pet.equip);
+ clif_pet_equip(sd->pd);
clif_send_petstatus(sd);
return 0;
@@ -731,7 +731,8 @@ int pet_equipitem(struct map_session_data *sd,int index)
pc_delitem(sd,index,1,0);
sd->pet.equip = pd->equip = nameid;
- clif_pet_equip(pd,nameid);
+ status_set_viewdata(&pd->bl, pd->vd.class_); //Updates view_data.
+ clif_pet_equip(pd);
if (battle_config.pet_equip_required)
{ //Skotlex: start support timers if need
unsigned int tick = gettick();
@@ -759,7 +760,8 @@ static int pet_unequipitem(struct map_session_data *sd, struct pet_data *pd)
nameid = sd->pet.equip;
sd->pet.equip = pd->equip = 0;
- clif_pet_equip(pd,0);
+ status_set_viewdata(&pd->bl, pd->vd.class_);
+ clif_pet_equip(pd);
memset(&tmp_item,0,sizeof(tmp_item));
tmp_item.nameid = nameid;
tmp_item.identify = 1;