summaryrefslogtreecommitdiff
path: root/src/map/trade.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/trade.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/trade.c')
-rw-r--r--src/map/trade.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/map/trade.c b/src/map/trade.c
index 53b884cef..3b882307d 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -554,11 +554,8 @@ void trade_tradecommit(struct map_session_data *sd)
if (flag == 0)
{
//Logs (T)rade [Lupus]
- if(log_config.enable_logs & LOG_TRADES)
- {
- log_pick_pc(sd, "T", sd->status.inventory[n].nameid, -(sd->deal.item[trade_i].amount), &sd->status.inventory[n]);
- log_pick_pc(tsd, "T", sd->status.inventory[n].nameid, sd->deal.item[trade_i].amount, &sd->status.inventory[n]);
- }
+ 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
clif_additem(sd, n, sd->deal.item[trade_i].amount, 0);
@@ -573,11 +570,8 @@ void trade_tradecommit(struct map_session_data *sd)
if (flag == 0)
{
//Logs (T)rade [Lupus]
- if(log_config.enable_logs & LOG_TRADES)
- {
- log_pick_pc(tsd, "T", tsd->status.inventory[n].nameid, -(tsd->deal.item[trade_i].amount), &tsd->status.inventory[n]);
- log_pick_pc(sd, "T", tsd->status.inventory[n].nameid, tsd->deal.item[trade_i].amount, &tsd->status.inventory[n]);
- }
+ 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
clif_additem(tsd, n, tsd->deal.item[trade_i].amount, 0);
@@ -592,10 +586,10 @@ void trade_tradecommit(struct map_session_data *sd)
tsd->status.zeny += sd->deal.zeny - tsd->deal.zeny;
//Logs Zeny (T)rade [Lupus]
- if( sd->deal.zeny && log_config.zeny )
- log_zeny(tsd, "T", sd, sd->deal.zeny);
- if( tsd->deal.zeny && log_config.zeny )
- log_zeny(sd, "T", tsd, tsd->deal.zeny);
+ if( sd->deal.zeny )
+ log_zeny(tsd, LOG_TYPE_TRADE, sd, sd->deal.zeny);
+ if( tsd->deal.zeny )
+ log_zeny(sd, LOG_TYPE_TRADE, tsd, tsd->deal.zeny);
sd->deal.zeny = 0;
tsd->deal.zeny = 0;