diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-07 20:58:32 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-07 20:58:32 +0000 |
commit | 77a227decf5603bb499ccf0e8a8a20733d16648f (patch) | |
tree | 4c41d25b8ac7994609600cdf27a13bc2ee15d2e6 /src/map/pet.c | |
parent | 79b7a40abaf1b4855cd3c828d96f61dd71750814 (diff) | |
download | hercules-77a227decf5603bb499ccf0e8a8a20733d16648f.tar.gz hercules-77a227decf5603bb499ccf0e8a8a20733d16648f.tar.bz2 hercules-77a227decf5603bb499ccf0e8a8a20733d16648f.tar.xz hercules-77a227decf5603bb499ccf0e8a8a20733d16648f.zip |
- Removed the equip id from the clif_pet_equip packet as it is not used for anything.
- Corrected the pet-armor field of the pet not being updated on equip/unequip of accessories, making them not show up inmediately.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7577 54d463be-8e91-2dee-dedb-b68131a5f0ec
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;
|