summaryrefslogtreecommitdiff
path: root/src/map/intif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/intif.c')
-rw-r--r--src/map/intif.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/map/intif.c b/src/map/intif.c
index c933ceb15..f656a0df9 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -751,7 +751,7 @@ int intif_party_leaderchange(int party_id,int account_id,int char_id)
/**
* Request clan member count
- *
+ *
* @param clan_id Id of the clan to have members counted
* @param kick_interval Interval of the inactivity kick
*/
@@ -759,7 +759,7 @@ int intif_clan_membercount(int clan_id, int kick_interval)
{
if (intif->CheckForCharServer() || clan_id == 0 || kick_interval <= 0)
return 0;
-
+
WFIFOHEAD(inter_fd, 10);
WFIFOW(inter_fd, 0) = 0x3044;
WFIFOL(inter_fd, 2) = clan_id;
@@ -791,7 +791,7 @@ void intif_parse_RecvClanMemberAction(int fd)
ShowError("intif_parse_RecvClanMemberAction: Received invalid clan_id '%d'\n", clan_id);
return;
}
-
+
if (count < 0) {
ShowError("intif_parse_RecvClanMemberAction: Received invalid member count value '%d'\n", count);
return;
@@ -2516,6 +2516,9 @@ void intif_parse_RequestRodexOpenInbox(int fd)
int8 is_end = RFIFOB(fd, 10);
int is_first = RFIFOB(fd, 11);
int count = RFIFOL(fd, 12);
+#if PACKETVER >= 20170419
+ int64 mail_id = RFIFOQ(fd, 16);
+#endif
int i, j;
sd = map->charid2sd(RFIFOL(fd, 4));
@@ -2533,15 +2536,15 @@ void intif_parse_RequestRodexOpenInbox(int fd)
else
sd->rodex.total += count;
- if (RFIFOW(fd, 2) - 16 != count * sizeof(struct rodex_message)) {
- ShowError("intif_parse_RodexInboxOpenReceived: data size mismatch %d != %"PRIuS"\n", RFIFOW(fd, 2) - 16, count * sizeof(struct rodex_message));
+ if (RFIFOW(fd, 2) - 24 != count * sizeof(struct rodex_message)) {
+ ShowError("intif_parse_RodexInboxOpenReceived: data size mismatch %d != %"PRIuS"\n", RFIFOW(fd, 2) - 24, count * sizeof(struct rodex_message));
return;
}
if (flag == 0 && is_first)
VECTOR_CLEAR(sd->rodex.messages);
- for (i = 0, j = 16; i < count; ++i, j += sizeof(struct rodex_message)) {
+ for (i = 0, j = 24; i < count; ++i, j += sizeof(struct rodex_message)) {
struct rodex_message msg = { 0 };
VECTOR_ENSURE(sd->rodex.messages, 1, 1);
memcpy(&msg, RFIFOP(fd, j), sizeof(struct rodex_message));
@@ -2550,7 +2553,7 @@ void intif_parse_RequestRodexOpenInbox(int fd)
if (is_end == true) {
#if PACKETVER >= 20170419
- clif->rodex_send_mails_all(sd->fd, sd);
+ clif->rodex_send_mails_all(sd->fd, sd, mail_id);
#else
if (flag == 0)
clif->rodex_send_maillist(sd->fd, sd, opentype, VECTOR_LENGTH(sd->rodex.messages) - 1);
@@ -2599,10 +2602,11 @@ void intif_parse_RodexNotifications(int fd)
/// Updates a mail
/// flag:
-/// 0 - user Read
-/// 1 - user got Zeny
-/// 2 - user got Items
-/// 3 - delete
+/// 0 - receiver Read
+/// 1 - user got Zeny
+/// 2 - user got Items
+/// 3 - delete
+/// 4 - sender Read (returned mail)
int intif_rodex_updatemail(int64 mail_id, int8 flag)
{
if (intif->CheckForCharServer())