diff options
author | shennetsind <ind@henn.et> | 2013-06-25 11:26:53 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-06-25 11:26:53 -0300 |
commit | 5d467dd19d1756e42d3c95f553054177be6b5290 (patch) | |
tree | 592bd3764a69489a33f22a275e0fa8d535fef141 /src/map | |
parent | 5b40d0c2937c2fe4f8e133271d05602543d86277 (diff) | |
download | hercules-5d467dd19d1756e42d3c95f553054177be6b5290.tar.gz hercules-5d467dd19d1756e42d3c95f553054177be6b5290.tar.bz2 hercules-5d467dd19d1756e42d3c95f553054177be6b5290.tar.xz hercules-5d467dd19d1756e42d3c95f553054177be6b5290.zip |
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 <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 12 | ||||
-rw-r--r-- | src/map/packets_struct.h | 3 |
2 files changed, 9 insertions, 6 deletions
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)); |