summaryrefslogtreecommitdiff
path: root/src/map/trade.c
diff options
context:
space:
mode:
authorgepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-11 17:35:28 +0000
committergepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-11 17:35:28 +0000
commite782bd5f2f7cd73634dfd8616a351a1b97c2109c (patch)
tree319366658d419bed37df23fc67b1c80957a141f4 /src/map/trade.c
parente18603bb1985d5628f1213999e92eaed8d008eb1 (diff)
downloadhercules-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/trade.c')
-rw-r--r--src/map/trade.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/map/trade.c b/src/map/trade.c
index 3b882307d..3c398ab83 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -550,14 +550,10 @@ void trade_tradecommit(struct map_session_data *sd)
{
n = sd->deal.item[trade_i].index;
- flag = pc_additem(tsd, &sd->status.inventory[n], sd->deal.item[trade_i].amount);
+ flag = pc_additem(tsd, &sd->status.inventory[n], sd->deal.item[trade_i].amount,LOG_TYPE_TRADE);
if (flag == 0)
- {
- //Logs (T)rade [Lupus]
- log_pick_pc(sd, LOG_TYPE_TRADE, sd->status.inventory[n].nameid, -(sd->deal.item[trade_i].amount), &sd->status.inventory[n]);
- log_pick_pc(tsd, LOG_TYPE_TRADE, sd->status.inventory[n].nameid, sd->deal.item[trade_i].amount, &sd->status.inventory[n]);
- pc_delitem(sd, n, sd->deal.item[trade_i].amount, 1, 6);
- } else
+ pc_delitem(sd, n, sd->deal.item[trade_i].amount, 1, 6, LOG_TYPE_TRADE);
+ else
clif_additem(sd, n, sd->deal.item[trade_i].amount, 0);
sd->deal.item[trade_i].index = 0;
sd->deal.item[trade_i].amount = 0;
@@ -566,14 +562,10 @@ void trade_tradecommit(struct map_session_data *sd)
{
n = tsd->deal.item[trade_i].index;
- flag = pc_additem(sd, &tsd->status.inventory[n], tsd->deal.item[trade_i].amount);
+ flag = pc_additem(sd, &tsd->status.inventory[n], tsd->deal.item[trade_i].amount,LOG_TYPE_TRADE);
if (flag == 0)
- {
- //Logs (T)rade [Lupus]
- log_pick_pc(tsd, LOG_TYPE_TRADE, tsd->status.inventory[n].nameid, -(tsd->deal.item[trade_i].amount), &tsd->status.inventory[n]);
- log_pick_pc(sd, LOG_TYPE_TRADE, tsd->status.inventory[n].nameid, tsd->deal.item[trade_i].amount, &tsd->status.inventory[n]);
- pc_delitem(tsd, n, tsd->deal.item[trade_i].amount, 1, 6);
- } else
+ pc_delitem(tsd, n, tsd->deal.item[trade_i].amount, 1, 6, LOG_TYPE_TRADE);
+ else
clif_additem(tsd, n, tsd->deal.item[trade_i].amount, 0);
tsd->deal.item[trade_i].index = 0;
tsd->deal.item[trade_i].amount = 0;