diff options
Diffstat (limited to 'src/map/pet.c')
-rw-r--r-- | src/map/pet.c | 14 |
1 files changed, 8 insertions, 6 deletions
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;
|