summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-11-22 09:09:01 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-11-22 09:09:01 +0000
commit94f849cf50f244eeb6d7b13a39059a1002825c7b (patch)
tree785592f9e3251c84159b23a6e63ef5283fcf7a54
parentbf60a55c43974f0d0a56e0ea870d0a0b4824aa63 (diff)
downloadhercules-94f849cf50f244eeb6d7b13a39059a1002825c7b.tar.gz
hercules-94f849cf50f244eeb6d7b13a39059a1002825c7b.tar.bz2
hercules-94f849cf50f244eeb6d7b13a39059a1002825c7b.tar.xz
hercules-94f849cf50f244eeb6d7b13a39059a1002825c7b.zip
* mail_deliveryfail no longer attempts to log (since r12910) and give items (since r11855), when there is no item attached to the mail (bugreport:3239).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14482 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Renewal.txt2
-rw-r--r--src/map/mail.c13
2 files changed, 10 insertions, 5 deletions
diff --git a/Changelog-Renewal.txt b/Changelog-Renewal.txt
index 1fa18948f..2286d261a 100644
--- a/Changelog-Renewal.txt
+++ b/Changelog-Renewal.txt
@@ -1,5 +1,7 @@
Date Added
+2010/11/22
+ * mail_deliveryfail no longer attempts to log (since r12910) and give items (since r11855), when there is no item attached to the mail (bugreport:3239). [Ai4rei]
2010/11/21
* Added msinttypes (rev. 26, http://msinttypes.googlecode.com/svn/trunk/) portability framework for Visual C++ compilers (related bugreport:4059). [Ai4rei]
* Added 64-bit variants of the socket and buffer I/O macros. [Ai4rei]
diff --git a/src/map/mail.c b/src/map/mail.c
index c79381c66..f0869185a 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -175,12 +175,15 @@ void mail_deliveryfail(struct map_session_data *sd, struct mail_message *msg)
nullpo_retv(sd);
nullpo_retv(msg);
- // Item recieve (due to failure)
- if(log_config.enable_logs&0x2000)
- log_pick_pc(sd, "E", msg->item.nameid, msg->item.amount, &msg->item);
+ if( msg->item.amount > 0 )
+ {
+ // Item recieve (due to failure)
+ if(log_config.enable_logs&0x2000)
+ log_pick_pc(sd, "E", msg->item.nameid, msg->item.amount, &msg->item);
+
+ pc_additem(sd, &msg->item, msg->item.amount);
+ }
- pc_additem(sd, &msg->item, msg->item.amount);
-
if( msg->zeny > 0 )
{
//Zeny recieve (due to failure)