From 5d467dd19d1756e42d3c95f553054177be6b5290 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Tue, 25 Jun 2013 11:26:53 -0300 Subject: Fixed item package announcer Made Possible Thanks to Yommy (<3!) Special Thanks to kyeme and Beret for bringing this issue to our attention. Signed-off-by: shennetsind --- src/map/clif.c | 12 +++++++----- src/map/packets_struct.h | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'src/map') diff --git a/src/map/clif.c b/src/map/clif.c index 3e01230b2..2bb272cd2 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -17445,18 +17445,20 @@ void clif_scriptclear(struct map_session_data *sd, int npcid) { clif->send(&p,sizeof(p), &sd->bl, SELF); } - +/* Made Possible Thanks to Yommy! */ void clif_package_item_announce(struct map_session_data *sd, unsigned short nameid, unsigned short containerid) { struct packet_package_item_announce p; p.PacketType = package_item_announceType; - p.PacketLength = 10+NAME_LENGTH; + p.PacketLength = 11+NAME_LENGTH; p.type = 0x0; - p.ItemID = containerid; + p.ItemID = nameid; p.len = NAME_LENGTH; safestrncpy(p.Name, sd->status.name, sizeof(p.Name)); - p.BoxItemID = nameid; - clif->send(&p,p.PacketLength, &sd->bl, ALL_CLIENT); + p.unknown = 0x2; // some strange byte, IDA shows.. BYTE3(BoxItemIDLength) = 2; + p.BoxItemID = containerid; + + clif->send(&p,sizeof(p), &sd->bl, ALL_CLIENT); } /* */ unsigned short clif_decrypt_cmd( int cmd, struct map_session_data *sd ) { diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 1a52040a8..d77784dc5 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -459,7 +459,7 @@ struct packet_script_clear { short PacketType; unsigned int NpcID; } __attribute__((packed)); - +/* made possible thanks to Yommy!! */ struct packet_package_item_announce { short PacketType; short PacketLength; @@ -467,6 +467,7 @@ struct packet_package_item_announce { unsigned short ItemID; char len; char Name[NAME_LENGTH]; + char unknown; unsigned short BoxItemID; } __attribute__((packed)); -- cgit v1.2.3-70-g09d2