summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 3c84b9df6..21e1d5e46 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11441,6 +11441,9 @@ void clif_parse_Mail_refreshinbox(int fd, struct map_session_data *sd)
{
struct mail_data* md = &sd->mail.inbox;
+ if( mail_invalid_operation(sd) )
+ return;
+
if( md->amount < MAIL_MAX_INBOX && (md->full || md->changed) )
intif_Mail_requestinbox(sd->status.char_id, 1);
else
@@ -11517,6 +11520,9 @@ void clif_Mail_read(struct map_session_data *sd, int mail_id)
void clif_parse_Mail_read(int fd, struct map_session_data *sd)
{
+ if( mail_invalid_operation(sd) )
+ return;
+
clif_Mail_read(sd, RFIFOL(fd,2));
}
@@ -11528,6 +11534,9 @@ void clif_parse_Mail_getattach(int fd, struct map_session_data *sd)
int i, mail_id = RFIFOL(fd,2);
bool fail = false;
+ if( mail_invalid_operation(sd) )
+ return;
+
ARR_FIND(0, MAIL_MAX_INBOX, i, sd->mail.inbox.msg[i].id == mail_id);
if( i == MAIL_MAX_INBOX )
return;
@@ -11580,6 +11589,9 @@ void clif_parse_Mail_delete(int fd, struct map_session_data *sd)
{
int i, mail_id = RFIFOL(fd,2);
+ if( mail_invalid_operation(sd) )
+ return;
+
ARR_FIND(0, MAIL_MAX_INBOX, i, sd->mail.inbox.msg[i].id == mail_id);
if (i < MAIL_MAX_INBOX)
{
@@ -11602,6 +11614,9 @@ void clif_parse_Mail_return(int fd, struct map_session_data *sd)
{
int i, mail_id = RFIFOL(fd,2);
+ if( mail_invalid_operation(sd) )
+ return;
+
ARR_FIND(0, MAIL_MAX_INBOX, i, sd->mail.inbox.msg[i].id == mail_id);
if (i < MAIL_MAX_INBOX)
intif_Mail_return(sd->status.char_id, mail_id);