summaryrefslogtreecommitdiff
path: root/src/map/mail.c
diff options
context:
space:
mode:
authorsevenzz23 <sevenzz23@yahoo.com>2013-10-31 12:07:06 +0700
committersevenzz23 <sevenzz23@yahoo.com>2013-10-31 12:42:05 +0700
commitc47d8e4b8f9d63ab6b4e7e286e91cd50a5bdd151 (patch)
tree4df1018ccbb52543c4e97409764b4381714ba2f8 /src/map/mail.c
parent566529c819bcf9aeb1bd3a4a691c443c2b88d076 (diff)
downloadhercules-c47d8e4b8f9d63ab6b4e7e286e91cd50a5bdd151.tar.gz
hercules-c47d8e4b8f9d63ab6b4e7e286e91cd50a5bdd151.tar.bz2
hercules-c47d8e4b8f9d63ab6b4e7e286e91cd50a5bdd151.tar.xz
hercules-c47d8e4b8f9d63ab6b4e7e286e91cd50a5bdd151.zip
No error after compilation, but when logging in at map server it will crash.
Im pretty sure its on the clif.c Signed-off-by: sevenzz23 <sevenzz23@yahoo.com>
Diffstat (limited to 'src/map/mail.c')
-rw-r--r--src/map/mail.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/mail.c b/src/map/mail.c
index 2378cbe2a..6b1537d87 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -82,8 +82,9 @@ unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount) {
if( amount < 0 || amount > sd->status.inventory[idx].amount )
return 1;
if( !pc->can_give_items(sd) || sd->status.inventory[idx].expire_time ||
- !itemdb_canmail(&sd->status.inventory[idx],pc->get_group_level(sd)) )
- return 1;
+ !itemdb_canmail(&sd->status.inventory[idx],pc->get_group_level(sd)) ||
+ (sd->status.inventory[idx].bound && !pc->can_give_bounded_items(sd)) )
+ return 1;
sd->mail.index = idx;
sd->mail.nameid = sd->status.inventory[idx].nameid;