Index: clif.c
===================================================================
--- clif.c (revision 17303)
+++ clif.c (working copy)
@@ -3267,6 +3267,8 @@
/// Notifies the client about the result of a request to equip an item (ZC_REQ_WEAR_EQUIP_ACK).
/// 00aa <index>.W <equip location>.W <result>.B
/// 00aa <index>.W <equip location>.W <view id>.W <result>.B (PACKETVER >= 20100629)
+/// 08d0 <index>.W <equip location>.W <view id>.W <result>.B
+/// 0999 <index>.W <equip location>.L <view id>.W <result>.B
/// result:
/// 0 = failure
/// 1 = success
@@ -3274,45 +3276,71 @@
void clif_equipitemack(struct map_session_data *sd,int n,int pos,int ok)
{
int fd;
+ int header,offs=0;
+#if PACKETVER < 20110824
+ header = 0xaa;
+#elseif PACKETVER < 20120925
+ header = 0x8d0;
+#else
+ header = 0x999;
nullpo_retv(sd);
fd=sd->fd;
- WFIFOHEAD(fd,packet_len(0xaa));
- WFIFOW(fd,0)=0xaa;
- WFIFOW(fd,2)=n+2;
- WFIFOW(fd,4)=pos;
+ WFIFOHEAD(fd,packet_len(header));
+ WFIFOW(fd,offs+0)=header;
+ WFIFOW(fd,offs+2)=n+2;
+#if PACKETVER >= 20120925
+ WFIFOL(fd,offs+4)=(long)pos;
+ offs+=2;
+#else
+ WFIFOW(fd,offs+4)=pos;
#if PACKETVER < 20100629
- WFIFOB(fd,6)=ok;
+ WFIFOB(fd,offs+6)=ok;
#else
if (ok && sd->inventory_data[n]->equip&EQP_VISIBLE)
- WFIFOW(fd,6)=sd->inventory_data[n]->look;
+ WFIFOW(fd,offs+6)=sd->inventory_data[n]->look;
else
- WFIFOW(fd,6)=0;
- WFIFOB(fd,8)=ok;
+ WFIFOW(fd,offs+6)=0;
+ WFIFOB(fd,offs+8)=ok;
#endif
- WFIFOSET(fd,packet_len(0xaa));
+ WFIFOSET(fd,packet_len(header));
}
/// Notifies the client about the result of a request to take off an item (ZC_REQ_TAKEOFF_EQUIP_ACK).
/// 00ac <index>.W <equip location>.W <result>.B
+/// 08d1 <index>.W <equip location>.W <result>.B
+/// 099a <index>.W <equip location>.L <result>.B
/// result:
/// 0 = failure
/// 1 = success
void clif_unequipitemack(struct map_session_data *sd,int n,int pos,int ok)
{
int fd;
-
+ int fd,header,offs=0;
+#if PACKETVER < 20110824
+ header = 0xac;
+#elseif PACKETVER < 20120925
+ header = 0x8d1;
+#else
+ header = 0x99a;
+#endif
nullpo_retv(sd);
fd=sd->fd;
- WFIFOHEAD(fd,packet_len(0xac));
- WFIFOW(fd,0)=0xac;
- WFIFOW(fd,2)=n+2;
- WFIFOW(fd,4)=pos;
- WFIFOB(fd,6)=ok;
- WFIFOSET(fd,packet_len(0xac));
+
+ WFIFOHEAD(fd,packet_len(header));
+ WFIFOW(fd,offs+0)=0xac;
+ WFIFOW(fd,offs+2)=n+2;
+#if PACKETVER >= 20120925
+ WFIFOL(fd,offs+4)=(long)pos;
+ offs +=2;
+#else
+ WFIFOW(fd,offs+4)=pos;
+#endif
+ WFIFOB(fd,offs+6)=ok;
+ WFIFOSET(fd,packet_len(header));
}
@@ -10183,9 +10231,15 @@
/// Request to equip an item (CZ_REQ_WEAR_EQUIP).
/// 00a9 <index>.W <position>.W
+/// 0998 <index>.W <position>.L
void clif_parse_EquipItem(int fd,struct map_session_data *sd)
{
- int index;
+ int index, req_pos;
+#if PACKETVER >= 20120925
+ req_pos = RFIFOL(fd,4);
+#else
+ req_pos = RFIFOW(fd,4);
+#endif
if(pc_isdead(sd)) {
clif_clearunit_area(&sd->bl,CLR_DEAD);
@@ -10220,7 +10274,8 @@
if(sd->inventory_data[index]->type == IT_AMMO)
pc_equipitem(sd,index,EQP_AMMO);
else
- pc_equipitem(sd,index,RFIFOW(fd,4));
+ pc_equipitem(sd,index,req_pos);
+
}
@@ -16727,7 +16839,7 @@
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
//#0x08C0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,
- 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 7, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
//#0x0900
@@ -16742,7 +16854,7 @@
0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0,
//#0x0980
0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0,
+ 31, 0, 0, 0, 0, 0, 0, 0, 8, 11, 9, 8, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0,