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 | |
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
-rw-r--r-- | Changelog-Trunk.txt | 2 | ||||
-rw-r--r-- | src/map/clif.c | 4 | ||||
-rw-r--r-- | src/map/clif.h | 2 | ||||
-rw-r--r-- | src/map/pet.c | 14 |
4 files changed, 13 insertions, 9 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 2597bc998..a0f578139 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/07/07
+ * Corrected the pet-armor field of the pet not being updated on
+ equip/unequip of accessories, making them not show up inmediately. [Skotlex]
* Status_calc_bl will no longer stop you from attacking/walking when the
mode is changed unless the new mode no longer includes
"can-attack"/"can-move" respectively. [Skotlex]
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;
|