diff options
author | gepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-01-11 17:35:28 +0000 |
---|---|---|
committer | gepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-01-11 17:35:28 +0000 |
commit | e782bd5f2f7cd73634dfd8616a351a1b97c2109c (patch) | |
tree | 319366658d419bed37df23fc67b1c80957a141f4 /src/map/mail.c | |
parent | e18603bb1985d5628f1213999e92eaed8d008eb1 (diff) | |
download | hercules-e782bd5f2f7cd73634dfd8616a351a1b97c2109c.tar.gz hercules-e782bd5f2f7cd73634dfd8616a351a1b97c2109c.tar.bz2 hercules-e782bd5f2f7cd73634dfd8616a351a1b97c2109c.tar.xz hercules-e782bd5f2f7cd73634dfd8616a351a1b97c2109c.zip |
Picklog improvements:
- now it is finally possible to log every item players gain or lose
- added 3 log types: `I` for auctioned items, `B` for buying shop transactions and `X` for all other items transactions that don't fall into another category (for detailed explanation on all log types read `conf/log_athena.conf`)
- it also fixes items being logged as picked up/gained by player when in fact they were dropped on the ground due to full inventory
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15420 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mail.c')
-rw-r--r-- | src/map/mail.c | 23 |
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; |