summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/clif.c17
-rw-r--r--src/map/packets_struct.h14
2 files changed, 24 insertions, 7 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 697faaa03..2e08cd14b 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -18985,7 +18985,7 @@ static void clif_package_item_announce(struct map_session_data *sd, unsigned sho
nullpo_retv(sd);
p.PacketType = package_item_announceType;
- p.PacketLength = 11+NAME_LENGTH;
+ p.PacketLength = 11 + NAME_LENGTH;
p.type = 0x0;
p.ItemID = nameid;
p.len = NAME_LENGTH;
@@ -19004,14 +19004,19 @@ static void clif_item_drop_announce(struct map_session_data *sd, unsigned short
nullpo_retv(sd);
p.PacketType = item_drop_announceType;
p.PacketLength = sizeof(p);
- p.type = 0x1;
p.ItemID = nameid;
+ p.monsterNameLen = NAME_LENGTH;
p.len = NAME_LENGTH;
safestrncpy(p.Name, sd->status.name, sizeof(p.Name));
- p.monsterNameLen = NAME_LENGTH;
- safestrncpy(p.monsterName, monsterName, sizeof(p.monsterName));
-
- clif->send(&p,sizeof(p), &sd->bl, ALL_CLIENT);
+ if (monsterName == NULL) {
+ // message: MSG_BROADCASTING_SPECIAL_ITEM_OBTAIN2
+ p.type = 0x2;
+ } else {
+ // message: MSG_BROADCASTING_SPECIAL_ITEM_OBTAIN
+ p.type = 0x1;
+ safestrncpy(p.monsterName, monsterName, sizeof(p.monsterName));
+ }
+ clif->send(&p, sizeof(p), &sd->bl, ALL_CLIENT);
}
/* [Ind/Hercules] special thanks to Yommy~! */
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 1114ef9c1..72354608b 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -981,11 +981,19 @@ struct packet_package_item_announce {
int16 PacketType;
int16 PacketLength;
uint8 type;
+#if PACKETVER_RE_NUM >= 20180704
+ uint32 ItemID;
+#else
uint16 ItemID;
+#endif
int8 len;
char Name[NAME_LENGTH];
- int8 unknown;
+ int8 unknown; // probably unused
+#if PACKETVER_RE_NUM >= 20180704
+ uint32 BoxItemID;
+#else
uint16 BoxItemID;
+#endif
} __attribute__((packed));
/* made possible thanks to Yommy!! */
@@ -993,7 +1001,11 @@ struct packet_item_drop_announce {
int16 PacketType;
int16 PacketLength;
uint8 type;
+#if PACKETVER_RE_NUM >= 20180704
+ uint32 ItemID;
+#else
uint16 ItemID;
+#endif
int8 len;
char Name[NAME_LENGTH];
char monsterNameLen;