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.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/map/mail.c b/src/map/mail.c
index f8adb5f0e..d410faf28 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -33,12 +33,8 @@ int mail_removeitem(struct map_session_data *sd, short flag)
if( sd->mail.amount )
{
- if (flag)
- { // Item send
- 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);
- }
+ if (flag) // Item send
+ pc_delitem(sd, sd->mail.index, sd->mail.amount, 1, 0, LOG_TYPE_MAIL);
else
clif_additem(sd, sd->mail.index, sd->mail.amount, 0);
}
@@ -141,15 +137,12 @@ void mail_getattachment(struct map_session_data* sd, int zeny, struct item* item
{
if( item->nameid > 0 && item->amount > 0 )
{
- pc_additem(sd, item, item->amount);
-
- log_pick_pc(sd, LOG_TYPE_MAIL, item->nameid, item->amount, item);
-
+ pc_additem(sd, item, item->amount, LOG_TYPE_MAIL);
clif_Mail_getattachment(sd->fd, 0);
}
if( zeny > 0 )
- { //Zeny recieve
+ { //Zeny receive
log_zeny(sd, LOG_TYPE_MAIL, sd, zeny);
pc_getzeny(sd, zeny);
}
@@ -174,15 +167,13 @@ void mail_deliveryfail(struct map_session_data *sd, struct mail_message *msg)
if( msg->item.amount > 0 )
{
- // Item recieve (due to failure)
- log_pick_pc(sd, LOG_TYPE_MAIL, msg->item.nameid, msg->item.amount, &msg->item);
-
- pc_additem(sd, &msg->item, msg->item.amount);
+ // Item receive (due to failure)
+ pc_additem(sd, &msg->item, msg->item.amount, LOG_TYPE_MAIL);
}
if( msg->zeny > 0 )
{
- //Zeny recieve (due to failure)
+ //Zeny receive (due to failure)
log_zeny(sd, LOG_TYPE_MAIL, sd, msg->zeny);
sd->status.zeny += msg->zeny;