diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-27 09:48:27 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-27 09:48:27 +0000 |
commit | c5887c263b96f9a3bf128b3b53e63d68ff6b9392 (patch) | |
tree | a767807a4b7a4bf5878523bb8f196d6fb6a32d94 /src/map/mail.c | |
parent | 4ecca0e292aafef33fe168d59c1a4e013cc0cda6 (diff) | |
download | hercules-c5887c263b96f9a3bf128b3b53e63d68ff6b9392.tar.gz hercules-c5887c263b96f9a3bf128b3b53e63d68ff6b9392.tar.bz2 hercules-c5887c263b96f9a3bf128b3b53e63d68ff6b9392.tar.xz hercules-c5887c263b96f9a3bf128b3b53e63d68ff6b9392.zip |
Followup fixes to r11583:
* fixed wrong sql upgrade file name, added svn:eol-style native
* made 'status' variable directly use the mail_status enum
* replaced some hardcoded numbers in mail queries with references to the enum
* fixed a query which still used 'read_flag'
* fixed all new mails being displayed as 'already read'
* removed sd nullpo checks from parse_ functions as that can never happen
* fixed mapserver sending (and charserver saving) junk item fields when there is no item attached to a mail
* fixed wrong mail send packet interpretation saving random memory after message body ('body_len' doesn't include the terminating zero)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11584 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mail.c')
-rw-r--r-- | src/map/mail.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/map/mail.c b/src/map/mail.c index 59f7037e6..c95d6fbfa 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -55,12 +55,13 @@ unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount) if (idx == 0) { // Zeny Transfer if (amount < 0) - return 2; + return 2; //FIXME: totally wrong value if (amount > sd->status.zeny) amount = sd->status.zeny; sd->mail.zeny = amount; clif_updatestatus(sd, SP_ZENY); + return 0; } else { // Item Transfer @@ -78,11 +79,8 @@ unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount) sd->mail.nameid = sd->status.inventory[idx].nameid; sd->mail.amount = amount; clif_delitem(sd, idx, amount); - return 0; } - - return -1; } bool mail_getattach(struct map_session_data *sd, struct mail_message *msg) |