From 7298dd6e6f12729de1571628781c3945ae86f31e Mon Sep 17 00:00:00 2001 From: momacabu Date: Fri, 23 Nov 2012 15:59:06 +0000 Subject: Fixed bugreport:2307, if you get an mail attachment with the char-server offline it wouldn't be saved to your inventory and therefore the item would be lost. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16953 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/map/clif.c b/src/map/clif.c index 746a12a75..75cc51a24 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -13780,6 +13780,8 @@ void clif_parse_Mail_getattach(int fd, struct map_session_data *sd) int i; bool fail = false; + if( !chrif_isconnected() ) + return; if( mail_id <= 0 ) return; if( mail_invalid_operation(sd) ) @@ -13844,6 +13846,8 @@ void clif_parse_Mail_delete(int fd, struct map_session_data *sd) int mail_id = RFIFOL(fd,2); int i; + if( !chrif_isconnected() ) + return; if( mail_id <= 0 ) return; if( mail_invalid_operation(sd) ) @@ -13893,6 +13897,8 @@ void clif_parse_Mail_setattach(int fd, struct map_session_data *sd) int amount = RFIFOL(fd,4); unsigned char flag; + if( !chrif_isconnected() ) + return; if (idx < 0 || amount < 0) return; @@ -13925,6 +13931,8 @@ void clif_parse_Mail_send(int fd, struct map_session_data *sd) struct mail_message msg; int body_len; + if( !chrif_isconnected() ) + return; if( sd->state.trading ) return; -- cgit v1.2.3-60-g2f50