summaryrefslogtreecommitdiff
path: root/src/map/mail.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/mail.c')
-rw-r--r--src/map/mail.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/map/mail.c b/src/map/mail.c
index 9d2f4375e..a08d04c0d 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -154,4 +154,20 @@ int mail_openmail(struct map_session_data *sd)
return 0;
}
+void mail_deliveryfail(struct map_session_data *sd, struct mail_message *msg)
+{
+ nullpo_retv(sd);
+ nullpo_retv(msg);
+
+ pc_additem(sd, &msg->item, msg->item.amount);
+
+ if( msg->zeny > 0 )
+ {
+ sd->status.zeny += msg->zeny;
+ clif_updatestatus(sd, SP_ZENY);
+ }
+
+ clif_Mail_send(sd->fd, true);
+}
+
#endif