From ad958235cfc56b86da89bdc2aa1e5155b0c006a1 Mon Sep 17 00:00:00 2001 From: Haru Date: Thu, 23 Jan 2014 19:35:01 +0100 Subject: Replaced some of the hardcoded values with constants (map) - Replaced several hardcoded values with the appropriate enums. - Added documentation for some hardcoded values that haven't been replaced by enums (yet) - Minor code legibility improvements. Signed-off-by: Haru --- src/map/mail.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/map/mail.c') diff --git a/src/map/mail.c b/src/map/mail.c index 7ba7d7470..d7ce9c830 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -14,6 +14,7 @@ #include "itemdb.h" #include "log.h" #include "pc.h" +#include "storage.h" #include "../common/nullpo.h" #include "../common/showmsg.h" @@ -36,7 +37,7 @@ int mail_removeitem(struct map_session_data *sd, short flag) if( sd->mail.amount ) { if (flag) // Item send - pc->delitem(sd, sd->mail.index, sd->mail.amount, 1, 0, LOG_TYPE_MAIL); + pc->delitem(sd, sd->mail.index, sd->mail.amount, 1, DELITEM_NORMAL, LOG_TYPE_MAIL); else clif->additem(sd, sd->mail.index, sd->mail.amount, 0); } @@ -151,7 +152,7 @@ int mail_openmail(struct map_session_data *sd) { nullpo_ret(sd); - if( sd->state.storage_flag || sd->state.vending || sd->state.buyingstore || sd->state.trading ) + if (sd->state.storage_flag != STORAGE_FLAG_CLOSED || sd->state.vending || sd->state.buyingstore || sd->state.trading) return 0; clif->mail_window(sd->fd, 0); -- cgit v1.2.3-60-g2f50