|
@@ -15820,6 +15820,10 @@ void clif_Mail_refreshinbox(struct map_session_data *sd,enum mail_inbox_type typ
|
|
/// 0ac0 <mail id>.Q <unknown>.16B (CZ_OPEN_MAILBOX2)
|
|
/// 0ac0 <mail id>.Q <unknown>.16B (CZ_OPEN_MAILBOX2)
|
|
/// 0ac1 <mail id>.Q <unknown>.16B (CZ_REQ_REFRESH_MAIL_LIST2)
|
|
/// 0ac1 <mail id>.Q <unknown>.16B (CZ_REQ_REFRESH_MAIL_LIST2)
|
|
void clif_parse_Mail_refreshinbox(int fd, struct map_session_data *sd){
|
|
void clif_parse_Mail_refreshinbox(int fd, struct map_session_data *sd){
|
|
|
|
+ if( mail_invalid_operation( sd ) ){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
#if PACKETVER < 20150513
|
|
#if PACKETVER < 20150513
|
|
struct mail_data* md = &sd->mail.inbox;
|
|
struct mail_data* md = &sd->mail.inbox;
|
|
|
|
|
|
@@ -16034,6 +16038,10 @@ void clif_parse_Mail_beginwrite( int fd, struct map_session_data *sd ){
|
|
|
|
|
|
safestrncpy(name, RFIFOCP(fd, 2), NAME_LENGTH);
|
|
safestrncpy(name, RFIFOCP(fd, 2), NAME_LENGTH);
|
|
|
|
|
|
|
|
+ if( mail_invalid_operation( sd ) ){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
if( sd->state.storage_flag || sd->state.mail_writing || sd->trade_partner ){
|
|
if( sd->state.storage_flag || sd->state.mail_writing || sd->trade_partner ){
|
|
clif_send_Mail_beginwrite_ack(sd, name, false);
|
|
clif_send_Mail_beginwrite_ack(sd, name, false);
|
|
return;
|
|
return;
|
|
@@ -16072,6 +16080,10 @@ void clif_Mail_Receiver_Ack( struct map_session_data* sd, uint32 char_id, short
|
|
void clif_parse_Mail_Receiver_Check(int fd, struct map_session_data *sd) {
|
|
void clif_parse_Mail_Receiver_Check(int fd, struct map_session_data *sd) {
|
|
static char name[NAME_LENGTH];
|
|
static char name[NAME_LENGTH];
|
|
|
|
|
|
|
|
+ if( mail_invalid_operation( sd ) ){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
safestrncpy(name, RFIFOCP(fd, 2), NAME_LENGTH);
|
|
safestrncpy(name, RFIFOCP(fd, 2), NAME_LENGTH);
|
|
|
|
|
|
intif_mail_checkreceiver(sd, name);
|
|
intif_mail_checkreceiver(sd, name);
|
|
@@ -16270,6 +16282,10 @@ void clif_parse_Mail_setattach(int fd, struct map_session_data *sd){
|
|
if (sd->inventory_data[server_index(idx)] == nullptr)
|
|
if (sd->inventory_data[server_index(idx)] == nullptr)
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
+ if( mail_invalid_operation( sd ) ){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
flag = mail_setitem(sd, idx, amount);
|
|
flag = mail_setitem(sd, idx, amount);
|
|
|
|
|
|
if( flag == MAIL_ATTACH_EQUIPSWITCH ){
|
|
if( flag == MAIL_ATTACH_EQUIPSWITCH ){
|
|
@@ -16352,6 +16368,10 @@ void clif_parse_Mail_send(int fd, struct map_session_data *sd){
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if( mail_invalid_operation( sd ) ){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
// Forged request without a begin writing packet?
|
|
// Forged request without a begin writing packet?
|
|
if( !sd->state.mail_writing ){
|
|
if( !sd->state.mail_writing ){
|
|
return; // Ignore it
|
|
return; // Ignore it
|