summaryrefslogtreecommitdiff
path: root/src/map/mail.c
diff options
context:
space:
mode:
authorMatheus Macabu <mkbu95@gmail.com>2013-06-15 03:42:23 -0300
committerMatheus Macabu <mkbu95@gmail.com>2013-06-15 03:42:23 -0300
commitde3f4423058405636c76e05cd87a6eae0bfa7707 (patch)
tree3f296f3651a670a9cec07c3ef2c57fce30b5ca67 /src/map/mail.c
parentb745cb176a16e771bf5bbae43a7445cf160d1342 (diff)
downloadhercules-de3f4423058405636c76e05cd87a6eae0bfa7707.tar.gz
hercules-de3f4423058405636c76e05cd87a6eae0bfa7707.tar.bz2
hercules-de3f4423058405636c76e05cd87a6eae0bfa7707.tar.xz
hercules-de3f4423058405636c76e05cd87a6eae0bfa7707.zip
Forgot to change something.
Also added mail interface for HPM. Signed-off-by: Matheus Macabu <mkbu95@gmail.com>
Diffstat (limited to 'src/map/mail.c')
-rw-r--r--src/map/mail.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/map/mail.c b/src/map/mail.c
index 299fb5117..24af018ad 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -72,7 +72,7 @@ unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount) {
return 0;
} else { // Item Transfer
idx -= 2;
- mail_removeitem(sd, 0);
+ mail->removeitem(sd, 0);
if( idx < 0 || idx >= MAX_INVENTORY )
return 1;
@@ -121,8 +121,8 @@ bool mail_setattachment(struct map_session_data *sd, struct mail_message *msg)
msg->zeny = sd->mail.zeny;
// Removes the attachment from sender
- mail_removeitem(sd,1);
- mail_removezeny(sd,1);
+ mail->removeitem(sd,1);
+ mail->removezeny(sd,1);
return true;
}
@@ -183,3 +183,18 @@ bool mail_invalid_operation(struct map_session_data *sd)
return false;
}
+
+void mail_defaults(void)
+{
+ mail = &mail_s;
+
+ mail->clear = mail_clear;
+ mail->removeitem = mail_removeitem;
+ mail->removezeny = mail_removezeny;
+ mail->setitem = mail_setitem;
+ mail->setattachment = mail_setattachment;
+ mail->getattachment = mail_getattachment;
+ mail->openmail = mail_openmail;
+ mail->deliveryfail = mail_deliveryfail;
+ mail->invalid_operation = mail_invalid_operation;
+} \ No newline at end of file