summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.c12
-rw-r--r--src/map/buyingstore.c2
-rw-r--r--src/map/log.c2
-rw-r--r--src/map/mail.c6
-rw-r--r--src/map/mob.c6
-rw-r--r--src/map/npc.c8
-rw-r--r--src/map/party.c2
-rw-r--r--src/map/pc.c6
-rw-r--r--src/map/script.c52
-rw-r--r--src/map/storage.c12
-rw-r--r--src/map/trade.c4
-rw-r--r--src/map/vending.c2
12 files changed, 57 insertions, 57 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 66be96cc4..2b2f44278 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -1725,7 +1725,7 @@ ACMD_FUNC(item)
}
//Logs (A)dmins items [Lupus]
- if(log_config.enable_logs&0x400)
+ if(log_config.enable_logs & LOG_COMMAND_ITEMS)
log_pick_pc(sd, "A", item_id, number, NULL);
clif_displaymessage(fd, msg_txt(18)); // Item created.
@@ -1800,7 +1800,7 @@ ACMD_FUNC(item2)
}
//Logs (A)dmins items [Lupus]
- if(log_config.enable_logs&0x400)
+ if(log_config.enable_logs & LOG_COMMAND_ITEMS)
log_pick_pc(sd, "A", item_tmp.nameid, number, &item_tmp);
clif_displaymessage(fd, msg_txt(18)); // Item created.
@@ -1824,7 +1824,7 @@ ACMD_FUNC(itemreset)
if (sd->status.inventory[i].amount && sd->status.inventory[i].equip == 0) {
//Logs (A)dmins items [Lupus]
- if(log_config.enable_logs&0x400)
+ if(log_config.enable_logs & LOG_COMMAND_ITEMS)
log_pick_pc(sd, "A", sd->status.inventory[i].nameid, -sd->status.inventory[i].amount, &sd->status.inventory[i]);
pc_delitem(sd, i, sd->status.inventory[i].amount, 0, 0);
@@ -2859,7 +2859,7 @@ ACMD_FUNC(produce)
clif_misceffect(&sd->bl, 3);
//Logs (A)dmins items [Lupus]
- if(log_config.enable_logs&0x400)
+ if(log_config.enable_logs & LOG_COMMAND_ITEMS)
log_pick_pc(sd, "A", tmp_item.nameid, 1, &tmp_item);
if ((flag = pc_additem(sd, &tmp_item, 1)))
@@ -5941,7 +5941,7 @@ void getring (struct map_session_data* sd)
item_tmp.card[3] = sd->status.partner_id >> 16;
//Logs (A)dmins items [Lupus]
- if(log_config.enable_logs&0x400)
+ if(log_config.enable_logs & LOG_COMMAND_ITEMS)
log_pick_pc(sd, "A", item_id, 1, &item_tmp);
if((flag = pc_additem(sd,&item_tmp,1))) {
@@ -8721,7 +8721,7 @@ ACMD_FUNC(delitem)
}
//Logs (A)dmins items [Lupus]
- if( log_config.enable_logs&0x400 )
+ if( log_config.enable_logs & LOG_COMMAND_ITEMS )
{
log_pick_pc(sd, "A", nameid, -delamount, &sd->status.inventory[idx]);
}
diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c
index 8d3179745..6d8ed9acb 100644
--- a/src/map/buyingstore.c
+++ b/src/map/buyingstore.c
@@ -367,7 +367,7 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int
zeny = amount*pl_sd->buyingstore.items[listidx].price;
// log
- if( log_config.enable_logs&LOG_BUYING_STORE )
+ if( log_config.enable_logs & LOG_BUYING_STORE )
{
log_pick_pc(sd, "B", nameid, -((int)amount), &sd->status.inventory[index]);
log_pick_pc(pl_sd, "B", nameid, amount, &sd->status.inventory[index]);
diff --git a/src/map/log.c b/src/map/log.c
index af7ae3121..53738f045 100644
--- a/src/map/log.c
+++ b/src/map/log.c
@@ -437,7 +437,7 @@ int log_config_read(char *cfgName)
{
if(strcmpi(w1,"enable_logs") == 0) {
log_config.enable_logs = (log_what)atoi(w2);
- if (log_config.enable_logs&1) //Log everything.
+ if (log_config.enable_logs & 1) //Log everything.
log_config.enable_logs = LOG_ALL;
} else if(strcmpi(w1,"sql_logs") == 0) {
log_config.sql_logs = (bool)atoi(w2);
diff --git a/src/map/mail.c b/src/map/mail.c
index 59afa0421..873788433 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -35,7 +35,7 @@ int mail_removeitem(struct map_session_data *sd, short flag)
{
if (flag)
{ // Item send
- if(log_config.enable_logs&0x2000)
+ if(log_config.enable_logs & LOG_MAILS)
log_pick_pc(sd, "E", sd->mail.nameid, -sd->mail.amount, &sd->status.inventory[sd->mail.index]);
pc_delitem(sd, sd->mail.index, sd->mail.amount, 1, 0);
@@ -144,7 +144,7 @@ void mail_getattachment(struct map_session_data* sd, int zeny, struct item* item
{
pc_additem(sd, item, item->amount);
- if(log_config.enable_logs&0x2000)
+ if(log_config.enable_logs & LOG_MAILS)
log_pick_pc(sd, "E", item->nameid, item->amount, item);
clif_Mail_getattachment(sd->fd, 0);
@@ -178,7 +178,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&0x2000)
+ if(log_config.enable_logs & LOG_MAILS)
log_pick_pc(sd, "E", msg->item.nameid, msg->item.amount, &msg->item);
pc_additem(sd, &msg->item, msg->item.amount);
diff --git a/src/map/mob.c b/src/map/mob.c
index ac8b1bd89..45a400c5b 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1470,7 +1470,7 @@ static bool mob_ai_sub_hard(struct mob_data *md, unsigned int tick)
return true; //Busy attacking?
fitem = (struct flooritem_data *)tbl;
- if(log_config.enable_logs&0x10) //Logs items, taken by (L)ooter Mobs [Lupus]
+ if(log_config.enable_logs & LOG_MONSTER_ITEMS) //Logs items, taken by (L)ooter Mobs [Lupus]
log_pick_mob(md, "L", fitem->item_data.nameid, fitem->item_data.amount, &fitem->item_data);
if (md->lootitem_count < LOOTITEM_SIZE) {
@@ -1711,7 +1711,7 @@ static void mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, str
{
TBL_PC* sd;
- if(log_config.enable_logs&0x10)
+ if(log_config.enable_logs & LOG_MONSTER_ITEMS)
{ //Logs items, dropped by mobs [Lupus]
if (loot)
log_pick_mob(md, "L", ditem->item_data.nameid, -ditem->item_data.amount, &ditem->item_data);
@@ -2389,7 +2389,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
map_addflooritem(&item,1,mvp_sd->bl.m,mvp_sd->bl.x,mvp_sd->bl.y,mvp_sd->status.char_id,(second_sd?second_sd->status.char_id:0),(third_sd?third_sd->status.char_id:0),1);
}
- if(log_config.enable_logs&0x200) {//Logs items, MVP prizes [Lupus]
+ if(log_config.enable_logs & LOG_MVP_PRIZE) {//Logs items, MVP prizes [Lupus]
log_pick_mob(md, "M", item.nameid, -1, NULL);
if (!temp)
log_pick_pc(mvp_sd, "P", item.nameid, 1, NULL);
diff --git a/src/map/npc.c b/src/map/npc.c
index 17a8e19be..0d4e886ba 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1268,7 +1268,7 @@ int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, uns
pc_additem(sd,&item_tmp,amount);
}
- if( log_config.enable_logs&0x20 )
+ if( log_config.enable_logs & LOG_NPC_TRANSACTIONS )
log_pick_pc(sd, "S", nameid, amount, NULL);
}
@@ -1376,7 +1376,7 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po
pc_additem(sd,&item_tmp, amount);
}
- if(log_config.enable_logs&0x20)
+ if(log_config.enable_logs & LOG_NPC_TRANSACTIONS)
log_pick_pc(sd, "S", nameid, amount, NULL);
return 0;
@@ -1486,7 +1486,7 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list)
pc_additem(sd,&item_tmp,amount);
//Logs items, Bought in NPC (S)hop [Lupus]
- if( log_config.enable_logs&0x20 )
+ if( log_config.enable_logs & LOG_NPC_TRANSACTIONS )
log_pick_pc(sd, "S", item_tmp.nameid, amount, NULL);
//Logs
}
@@ -1630,7 +1630,7 @@ int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list)
nameid = sd->status.inventory[idx].nameid;
//Logs items, Sold to NPC (S)hop [Lupus]
- if( log_config.enable_logs&0x20 )
+ if( log_config.enable_logs & LOG_NPC_TRANSACTIONS )
log_pick_pc(sd, "S", nameid, -amount, &sd->status.inventory[idx]);
//Logs
diff --git a/src/map/party.c b/src/map/party.c
index b3b55f93f..d85221e47 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -1072,7 +1072,7 @@ int party_share_loot(struct party_data* p, struct map_session_data* sd, struct i
return i;
}
- if(log_config.enable_logs&0x8) //Logs items, taken by (P)layers [Lupus]
+ if(log_config.enable_logs & LOG_PLAYER_ITEMS) //Logs items, taken by (P)layers [Lupus]
log_pick_pc(target, "P", item_data->nameid, item_data->amount, item_data);
if( p && battle_config.party_show_share_picker && battle_config.show_picker_item_type&(1<<itemdb_type(item_data->nameid)) )
diff --git a/src/map/pc.c b/src/map/pc.c
index 632b485b3..d06e1253d 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3512,7 +3512,7 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount)
}
//Logs items, dropped by (P)layers [Lupus]
- if(log_config.enable_logs&0x8)
+ if(log_config.enable_logs & LOG_PLAYER_ITEMS)
log_pick_pc(sd, "P", sd->status.inventory[n].nameid, -amount, (struct item*)&sd->status.inventory[n]);
//Logs
@@ -3824,7 +3824,7 @@ int pc_useitem(struct map_session_data *sd,int n)
clif_useitemack(sd,n,amount-1,1);
//Logs (C)onsumable items [Lupus]
- if( log_config.enable_logs&0x100 )
+ if( log_config.enable_logs & LOG_USED_ITEMS )
log_pick_pc(sd, "C", sd->status.inventory[n].nameid, -1, &sd->status.inventory[n]);
pc_delitem(sd,n,1,1,0); // Rental Usable Items are not deleted until expiration
@@ -4086,7 +4086,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, int lv)
party_foreachsamemap(pc_show_steal,sd,AREA_SIZE,sd,tmp_item.nameid);
//Logs items, Stolen from mobs [Lupus]
- if(log_config.enable_logs&0x80) {
+ if(log_config.enable_logs & LOG_STOLEN_ITEMS) {
log_pick_mob(md, "M", itemid, -1, NULL);
log_pick_pc(sd, "P", itemid, 1, NULL);
}
diff --git a/src/map/script.c b/src/map/script.c
index 88380af29..cdd8c6542 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -5699,7 +5699,7 @@ BUILDIN_FUNC(getitem)
}
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&LOG_SCRIPT_TRANSACTIONS)
+ if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
log_pick_pc(sd, "N", nameid, amount, NULL);
return 0;
@@ -5801,7 +5801,7 @@ BUILDIN_FUNC(getitem2)
}
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&0x40)
+ if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
log_pick_pc(sd, "N", nameid, amount, &item_tmp);
}
@@ -5867,7 +5867,7 @@ BUILDIN_FUNC(rentitem)
clif_rental_time(sd->fd, nameid, seconds);
pc_inventory_rental_add(sd, seconds);
- if( log_config.enable_logs&LOG_SCRIPT_TRANSACTIONS )
+ if( log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS )
log_pick_pc(sd, "N", nameid, 1, NULL);
return 0;
@@ -5939,7 +5939,7 @@ BUILDIN_FUNC(getnameditem)
}
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&0x40)
+ if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
log_pick_pc(sd, "N", item_tmp.nameid, item_tmp.amount, &item_tmp);
script_pushint(st,1);
@@ -6034,7 +6034,7 @@ static void buildin_delitem_delete(struct map_session_data* sd, int idx, int* am
}
//Logs items, got from (N)PC scripts [Lupus]
- if( log_config.enable_logs&0x40 )
+ if( log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS )
{
log_pick_pc(sd, "N", inv->nameid, -delamount, inv);
}
@@ -6933,7 +6933,7 @@ BUILDIN_FUNC(successrefitem)
ep=sd->status.inventory[i].equip;
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&0x40)
+ if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
sd->status.inventory[i].refine++;
@@ -6943,7 +6943,7 @@ BUILDIN_FUNC(successrefitem)
clif_delitem(sd,i,1,3);
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&0x40)
+ if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
log_pick_pc(sd, "N", sd->status.inventory[i].nameid, 1, &sd->status.inventory[i]);
clif_additem(sd,i,1,0);
@@ -6987,7 +6987,7 @@ BUILDIN_FUNC(failedrefitem)
i=pc_checkequip(sd,equip[num-1]);
if(i >= 0) {
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&0x40)
+ if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
sd->status.inventory[i].refine = 0;
@@ -10341,7 +10341,7 @@ BUILDIN_FUNC(successremovecards)
item_tmp.card[j]=0;
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&0x40)
+ if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
log_pick_pc(sd, "N", item_tmp.nameid, 1, NULL);
if((flag=pc_additem(sd,&item_tmp,1))){ // 持てないならドロップ
@@ -10364,13 +10364,13 @@ BUILDIN_FUNC(successremovecards)
item_tmp.card[j]=sd->status.inventory[i].card[j];
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&0x40)
+ if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
pc_delitem(sd,i,1,0,3);
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&0x40)
+ if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
log_pick_pc(sd, "N", item_tmp.nameid, 1, &item_tmp);
if((flag=pc_additem(sd,&item_tmp,1))){ // もてないならドロップ
@@ -10423,7 +10423,7 @@ BUILDIN_FUNC(failedremovecards)
item_tmp.card[j]=0;
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&0x40)
+ if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
log_pick_pc(sd, "N", item_tmp.nameid, 1, NULL);
if((flag=pc_additem(sd,&item_tmp,1))){
@@ -10438,7 +10438,7 @@ BUILDIN_FUNC(failedremovecards)
{
if(typefail == 0 || typefail == 2){ // 武具損失
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&0x40)
+ if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
pc_delitem(sd,i,1,0,2);
@@ -10451,7 +10451,7 @@ BUILDIN_FUNC(failedremovecards)
item_tmp.attribute=sd->status.inventory[i].attribute,item_tmp.expire_time=sd->status.inventory[i].expire_time;
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&0x40)
+ if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
for (j = 0; j < sd->inventory_data[i]->slot; j++)
@@ -10461,7 +10461,7 @@ BUILDIN_FUNC(failedremovecards)
pc_delitem(sd,i,1,0,2);
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&0x40)
+ if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
log_pick_pc(sd, "N", item_tmp.nameid, 1, &item_tmp);
if((flag=pc_additem(sd,&item_tmp,1))){
@@ -11131,7 +11131,7 @@ BUILDIN_FUNC(clearitem)
if (sd->status.inventory[i].amount) {
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&0x40)
+ if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -sd->status.inventory[i].amount, &sd->status.inventory[i]);
pc_delitem(sd, i, sd->status.inventory[i].amount, 0, 0);
@@ -15071,20 +15071,20 @@ BUILDIN_FUNC(checkquest)
BUILDIN_FUNC(showevent)
{
- TBL_PC *sd = script_rid2sd(st);
- struct npc_data *nd = map_id2nd(st->oid);
- int state, color;
+ TBL_PC *sd = script_rid2sd(st);
+ struct npc_data *nd = map_id2nd(st->oid);
+ int state, color;
- if( sd == NULL || nd == NULL )
- return 0;
- state = script_getnum(st, 2);
- color = script_getnum(st, 3);
+ if( sd == NULL || nd == NULL )
+ return 0;
+ state = script_getnum(st, 2);
+ color = script_getnum(st, 3);
if( color < 0 || color > 4 )
- color = 0; // set default color
+ color = 0; // set default color
- clif_quest_show_event(sd, &nd->bl, state, color);
- return 0;
+ clif_quest_show_event(sd, &nd->bl, state, color);
+ return 0;
}
/*==========================================
diff --git a/src/map/storage.c b/src/map/storage.c
index 4eb1beb32..c11ef0993 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -154,7 +154,7 @@ static int storage_additem(struct map_session_data* sd, struct item* item_data,
return 1;
stor->items[i].amount += amount;
clif_storageitemadded(sd,&stor->items[i],i,amount);
- if(log_config.enable_logs&0x800)
+ if(log_config.enable_logs & LOG_STORAGE_ITEMS)
log_pick_pc(sd, "R", item_data->nameid, -amount, item_data);
return 0;
}
@@ -172,7 +172,7 @@ static int storage_additem(struct map_session_data* sd, struct item* item_data,
stor->items[i].amount = amount;
clif_storageitemadded(sd,&stor->items[i],i,amount);
clif_updatestorageamount(sd,stor->storage_amount);
- if(log_config.enable_logs&0x800)
+ if(log_config.enable_logs & LOG_STORAGE_ITEMS)
log_pick_pc(sd, "R", item_data->nameid, -amount, item_data);
return 0;
@@ -188,7 +188,7 @@ int storage_delitem(struct map_session_data* sd, int n, int amount)
sd->status.storage.items[n].amount -= amount;
- if(log_config.enable_logs&0x800)
+ if(log_config.enable_logs & LOG_STORAGE_ITEMS)
log_pick_pc(sd, "R", sd->status.storage.items[n].nameid, amount, &sd->status.storage.items[n]);
if( sd->status.storage.items[n].amount == 0 )
@@ -413,7 +413,7 @@ int guild_storage_additem(struct map_session_data* sd, struct guild_storage* sto
stor->items[i].amount+=amount;
clif_storageitemadded(sd,&stor->items[i],i,amount);
stor->dirty = 1;
- if(log_config.enable_logs&0x1000)
+ if(log_config.enable_logs & LOG_GSTORAGE_ITEMS)
log_pick_pc(sd, "G", item_data->nameid, -amount, item_data);
return 0;
}
@@ -431,7 +431,7 @@ int guild_storage_additem(struct map_session_data* sd, struct guild_storage* sto
clif_storageitemadded(sd,&stor->items[i],i,amount);
clif_updateguildstorageamount(sd,stor->storage_amount);
stor->dirty = 1;
- if(log_config.enable_logs&0x1000)
+ if(log_config.enable_logs & LOG_GSTORAGE_ITEMS)
log_pick_pc(sd, "G", item_data->nameid, -amount, item_data);
return 0;
}
@@ -445,7 +445,7 @@ int guild_storage_delitem(struct map_session_data* sd, struct guild_storage* sto
return 1;
stor->items[n].amount-=amount;
- if(log_config.enable_logs&0x1000)
+ if(log_config.enable_logs & LOG_GSTORAGE_ITEMS)
log_pick_pc(sd, "G", stor->items[n].nameid, amount, &stor->items[n]);
if(stor->items[n].amount==0){
memset(&stor->items[n],0,sizeof(stor->items[0]));
diff --git a/src/map/trade.c b/src/map/trade.c
index fb9fecbac..53b884cef 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -554,7 +554,7 @@ void trade_tradecommit(struct map_session_data *sd)
if (flag == 0)
{
//Logs (T)rade [Lupus]
- if(log_config.enable_logs&0x2)
+ 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]);
@@ -573,7 +573,7 @@ void trade_tradecommit(struct map_session_data *sd)
if (flag == 0)
{
//Logs (T)rade [Lupus]
- if(log_config.enable_logs&0x2)
+ 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]);
diff --git a/src/map/vending.c b/src/map/vending.c
index c5ead6513..3bb528509 100644
--- a/src/map/vending.c
+++ b/src/map/vending.c
@@ -183,7 +183,7 @@ void vending_purchasereq(struct map_session_data* sd, int aid, int uid, const ui
idx -= 2;
//Logs sold (V)ending items [Lupus]
- if(log_config.enable_logs&0x4) {
+ if(log_config.enable_logs & LOG_VENDING) {
log_pick_pc(vsd, "V", vsd->status.cart[idx].nameid, -amount, &vsd->status.cart[idx]);
log_pick_pc( sd, "V", vsd->status.cart[idx].nameid, amount, &vsd->status.cart[idx]);
}