summaryrefslogtreecommitdiff
path: root/src/map/mail.c
diff options
context:
space:
mode:
authoreathenabot <eathenabot@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-24 14:13:39 +0000
committereathenabot <eathenabot@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-24 14:13:39 +0000
commit373cfe9bee3f297540d09cb0616e2b5da17463f3 (patch)
tree7c525ce072d2ac917fe63ff0ad5805d28acbfd3c /src/map/mail.c
parent4b787eb878c4410512ceffb9f92b6f3cd7975bce (diff)
downloadhercules-373cfe9bee3f297540d09cb0616e2b5da17463f3.tar.gz
hercules-373cfe9bee3f297540d09cb0616e2b5da17463f3.tar.bz2
hercules-373cfe9bee3f297540d09cb0616e2b5da17463f3.tar.xz
hercules-373cfe9bee3f297540d09cb0616e2b5da17463f3.zip
* Merged changes up to eAthena 15040.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15245 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mail.c')
-rw-r--r--src/map/mail.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/map/mail.c b/src/map/mail.c
index 873788433..3f72fc435 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -35,8 +35,7 @@ int mail_removeitem(struct map_session_data *sd, short flag)
{
if (flag)
{ // Item send
- if(log_config.enable_logs & LOG_MAILS)
- log_pick_pc(sd, "E", sd->mail.nameid, -sd->mail.amount, &sd->status.inventory[sd->mail.index]);
+ log_pick_pc(sd, LOG_TYPE_MAIL, sd->mail.nameid, -sd->mail.amount, &sd->status.inventory[sd->mail.index]);
pc_delitem(sd, sd->mail.index, sd->mail.amount, 1, 0);
}
@@ -56,8 +55,7 @@ int mail_removezeny(struct map_session_data *sd, short flag)
if (flag && sd->mail.zeny > 0)
{ //Zeny send
- if(log_config.zeny)
- log_zeny(sd, "E", sd, -sd->mail.zeny);
+ log_zeny(sd, LOG_TYPE_MAIL, sd, -sd->mail.zeny);
sd->status.zeny -= sd->mail.zeny;
}
@@ -144,16 +142,14 @@ void mail_getattachment(struct map_session_data* sd, int zeny, struct item* item
{
pc_additem(sd, item, item->amount);
- if(log_config.enable_logs & LOG_MAILS)
- log_pick_pc(sd, "E", item->nameid, item->amount, item);
+ log_pick_pc(sd, LOG_TYPE_MAIL, item->nameid, item->amount, item);
clif_Mail_getattachment(sd->fd, 0);
}
if( zeny > 0 )
{ //Zeny recieve
- if(log_config.zeny)
- log_zeny(sd, "E", sd, zeny);
+ log_zeny(sd, LOG_TYPE_MAIL, sd, zeny);
pc_getzeny(sd, zeny);
}
}
@@ -178,8 +174,7 @@ void mail_deliveryfail(struct map_session_data *sd, struct mail_message *msg)
if( msg->item.amount > 0 )
{
// Item recieve (due to failure)
- if(log_config.enable_logs & LOG_MAILS)
- log_pick_pc(sd, "E", msg->item.nameid, msg->item.amount, &msg->item);
+ log_pick_pc(sd, LOG_TYPE_MAIL, msg->item.nameid, msg->item.amount, &msg->item);
pc_additem(sd, &msg->item, msg->item.amount);
}
@@ -187,8 +182,7 @@ void mail_deliveryfail(struct map_session_data *sd, struct mail_message *msg)
if( msg->zeny > 0 )
{
//Zeny recieve (due to failure)
- if(log_config.zeny)
- log_zeny(sd, "E", sd, msg->zeny);
+ log_zeny(sd, LOG_TYPE_MAIL, sd, msg->zeny);
sd->status.zeny += msg->zeny;
clif_updatestatus(sd, SP_ZENY);