summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-21 16:03:12 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-21 16:03:12 +0000
commit6c6cfb325ea28e5bf8d137e057eb0716b0b8a4d0 (patch)
tree3cfbd2bc33d5d447e7bd26a4fb73b590c849909e /src/map/clif.c
parenteb3546a33a9689a745e6497fc9e781f4e7f9b3c1 (diff)
downloadhercules-6c6cfb325ea28e5bf8d137e057eb0716b0b8a4d0.tar.gz
hercules-6c6cfb325ea28e5bf8d137e057eb0716b0b8a4d0.tar.bz2
hercules-6c6cfb325ea28e5bf8d137e057eb0716b0b8a4d0.tar.xz
hercules-6c6cfb325ea28e5bf8d137e057eb0716b0b8a4d0.zip
- Cleaned up some the code of pc_equipitem and clif_parse_EquipItem
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10045 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index bfb6d5500..d95f78c87 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -9237,20 +9237,24 @@ void clif_parse_EquipItem(int fd,struct map_session_data *sd)
if(sd->sc.data[SC_BLADESTOP].timer!=-1 || sd->sc.data[SC_BERSERK].timer!=-1 )
return;
- if(!sd->status.inventory[index].identify) { // 未鑑定
+ if(!sd->status.inventory[index].identify) {
clif_equipitemack(sd,index,0,0); // fail
return;
}
- //ペット用装備であるかないか
- if(sd->inventory_data[index]) {
- if(sd->inventory_data[index]->type != IT_PETARMOR){
- if(sd->inventory_data[index]->type == IT_AMMO)
- pc_equipitem(sd,index,EQP_AMMO); //Client doesn't sends the position.
- else
- pc_equipitem(sd,index,RFIFOW(fd,4));
- } else
- pet_equipitem(sd,index);
+
+ if(!sd->inventory_data[index])
+ return;
+
+ if(sd->inventory_data[index]->type == IT_PETARMOR){
+ pet_equipitem(sd,index);
+ return;
}
+
+ //Client doesn't sends the position for ammo.
+ if(sd->inventory_data[index]->type == IT_AMMO)
+ pc_equipitem(sd,index,EQP_AMMO);
+ else
+ pc_equipitem(sd,index,RFIFOW(fd,4));
}
/*==========================================