diff options
Diffstat (limited to 'src/map/mail.c')
-rw-r--r-- | src/map/mail.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/map/mail.c b/src/map/mail.c index 299fb5117..9a8d4e521 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena Dev Teams #include "../common/nullpo.h" #include "../common/showmsg.h" @@ -72,7 +73,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 +122,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 +184,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 |