summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/clif.c6
-rw-r--r--src/map/packets_struct.h11
2 files changed, 13 insertions, 4 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index e9d2cbffa..a5f0e3933 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -20615,9 +20615,10 @@ static void clif_rodex_read_mail(struct map_session_data *sd, int8 opentype, str
size += body_len;
for (i = 0; i < RODEX_MAX_ITEM; ++i) {
struct item *it = &msg->items[i].item;
+ struct item_data* data = itemdb->search(it->nameid);
int j, k;
- if (it->nameid == 0) {
+ if (it->nameid == 0 || data == NULL) {
continue;
}
@@ -20629,6 +20630,9 @@ static void clif_rodex_read_mail(struct map_session_data *sd, int8 opentype, str
item->IsIdentified = it->identify ? 1 : 0;
item->IsDamaged = (it->attribute & ATTR_BROKEN) != 0 ? 1 : 0;
item->refiningLevel = it->refine;
+ item->location = pc->item_equippoint(sd, data);
+ item->viewSprite = data->view_sprite;
+ item->bindOnEquip = it->bound ? 2 : data->flag.bindonequip ? 1 : 0;
for (k = 0; k < MAX_SLOTS; ++k) {
item->slot.card[k] = it->card[k];
}
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index b15dabad2..c5061a72d 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -1443,14 +1443,19 @@ struct PACKET_ZC_ADD_ITEM_TO_MAIL {
struct mail_item {
int16 count;
+#if PACKETVER_RE_NUM >= 20180704
+ uint32 ITID;
+#else
uint16 ITID;
+#endif
int8 IsIdentified;
int8 IsDamaged;
int8 refiningLevel;
struct EQUIPSLOTINFO slot;
- int8 unknow1[4];
- int8 type;
- int8 unknown[4];
+ uint32 location;
+ uint8 type;
+ uint16 viewSprite;
+ uint16 bindOnEquip;
struct ItemOptions optionData[MAX_ITEM_OPTIONS];
} __attribute__((packed));