diff options
author | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-02-13 17:55:32 +0000 |
---|---|---|
committer | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-02-13 17:55:32 +0000 |
commit | 3c8b17a9300d36cf6241edb6751f26af3b262c1e (patch) | |
tree | 7c3abb9e7bc239b367a9baf5876c133754b4faf4 /src/map/mail.c | |
parent | 71d75dcb2b25a8df05fdf04eadecca560960fd90 (diff) | |
download | hercules-3c8b17a9300d36cf6241edb6751f26af3b262c1e.tar.gz hercules-3c8b17a9300d36cf6241edb6751f26af3b262c1e.tar.bz2 hercules-3c8b17a9300d36cf6241edb6751f26af3b262c1e.tar.xz hercules-3c8b17a9300d36cf6241edb6751f26af3b262c1e.zip |
- Some fixes to mail system.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12199 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mail.c')
-rw-r--r-- | src/map/mail.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/map/mail.c b/src/map/mail.c index 8c80412a9..5fef604c0 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -135,12 +135,6 @@ bool mail_setattachment(struct map_session_data *sd, struct mail_message *msg) void mail_getattachment(struct map_session_data* sd, int zeny, struct item* item) { - if( zeny > 0 ) - { - sd->status.zeny += zeny; - clif_updatestatus(sd, SP_ZENY); - } - if( item->nameid > 0 && item->amount > 0 ) { pc_additem(sd, item, item->amount); @@ -150,6 +144,9 @@ void mail_getattachment(struct map_session_data* sd, int zeny, struct item* item clif_Mail_getattachment(sd->fd, 0); } + + if( zeny > 0 ) + pc_getzeny(sd, zeny); } int mail_openmail(struct map_session_data *sd) @@ -159,9 +156,9 @@ int mail_openmail(struct map_session_data *sd) if( sd->state.finalsave == 1 || sd->state.storage_flag || sd->vender_id || sd->state.trading ) return 0; - clif_Mail_openmail(sd->fd); + clif_Mail_window(sd->fd, 0); - return 0; + return 1; } void mail_deliveryfail(struct map_session_data *sd, struct mail_message *msg) |