summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authormomacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-23 15:59:06 +0000
committermomacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-23 15:59:06 +0000
commit7298dd6e6f12729de1571628781c3945ae86f31e (patch)
treef1b9154421c90c5ccd05b541374946d2371d9811 /src/map/clif.c
parent5c776e41bf6c13498e9575ee88aa2b2d47185f9e (diff)
downloadhercules-7298dd6e6f12729de1571628781c3945ae86f31e.tar.gz
hercules-7298dd6e6f12729de1571628781c3945ae86f31e.tar.bz2
hercules-7298dd6e6f12729de1571628781c3945ae86f31e.tar.xz
hercules-7298dd6e6f12729de1571628781c3945ae86f31e.zip
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
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c8
1 files changed, 8 insertions, 0 deletions
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;