summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c53
1 files changed, 16 insertions, 37 deletions
diff --git a/src/map/script.c b/src/map/script.c
index faab3c1db..4ce9e380e 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -5699,8 +5699,7 @@ BUILDIN_FUNC(getitem)
}
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
- log_pick_pc(sd, "N", nameid, amount, NULL);
+ log_pick_pc(sd, LOG_TYPE_SCRIPT, nameid, amount, NULL);
return 0;
}
@@ -5801,8 +5800,7 @@ BUILDIN_FUNC(getitem2)
}
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
- log_pick_pc(sd, "N", nameid, amount, &item_tmp);
+ log_pick_pc(sd, LOG_TYPE_SCRIPT, nameid, amount, &item_tmp);
}
return 0;
@@ -5867,8 +5865,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 )
- log_pick_pc(sd, "N", nameid, 1, NULL);
+ log_pick_pc(sd, LOG_TYPE_SCRIPT, nameid, 1, NULL);
return 0;
}
@@ -5939,8 +5936,7 @@ BUILDIN_FUNC(getnameditem)
}
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
- log_pick_pc(sd, "N", item_tmp.nameid, item_tmp.amount, &item_tmp);
+ log_pick_pc(sd, LOG_TYPE_SCRIPT, item_tmp.nameid, item_tmp.amount, &item_tmp);
script_pushint(st,1);
return 0;
@@ -6034,10 +6030,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 & LOG_SCRIPT_TRANSACTIONS )
- {
- log_pick_pc(sd, "N", inv->nameid, -delamount, inv);
- }
+ log_pick_pc(sd, LOG_TYPE_SCRIPT, inv->nameid, -delamount, inv);
//Logs
pc_delitem(sd, idx, delamount, 0, 0);
@@ -6933,8 +6926,7 @@ BUILDIN_FUNC(successrefitem)
ep=sd->status.inventory[i].equip;
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
- log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
+ log_pick_pc(sd, LOG_TYPE_SCRIPT, sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
sd->status.inventory[i].refine++;
pc_unequipitem(sd,i,2); // status calc will happen in pc_equipitem() below
@@ -6943,8 +6935,7 @@ BUILDIN_FUNC(successrefitem)
clif_delitem(sd,i,1,3);
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
- log_pick_pc(sd, "N", sd->status.inventory[i].nameid, 1, &sd->status.inventory[i]);
+ log_pick_pc(sd, LOG_TYPE_SCRIPT, sd->status.inventory[i].nameid, 1, &sd->status.inventory[i]);
clif_additem(sd,i,1,0);
pc_equipitem(sd,i,ep);
@@ -6987,8 +6978,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 & LOG_SCRIPT_TRANSACTIONS)
- log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
+ log_pick_pc(sd, LOG_TYPE_SCRIPT, sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
sd->status.inventory[i].refine = 0;
pc_unequipitem(sd,i,3);
@@ -10341,8 +10331,7 @@ BUILDIN_FUNC(successremovecards)
item_tmp.card[j]=0;
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
- log_pick_pc(sd, "N", item_tmp.nameid, 1, NULL);
+ log_pick_pc(sd, LOG_TYPE_SCRIPT, item_tmp.nameid, 1, NULL);
if((flag=pc_additem(sd,&item_tmp,1))){ // 持てないならドロップ
clif_additem(sd,0,0,flag);
@@ -10364,14 +10353,12 @@ 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 & LOG_SCRIPT_TRANSACTIONS)
- log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
+ log_pick_pc(sd, LOG_TYPE_SCRIPT, 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 & LOG_SCRIPT_TRANSACTIONS)
- log_pick_pc(sd, "N", item_tmp.nameid, 1, &item_tmp);
+ log_pick_pc(sd, LOG_TYPE_SCRIPT, item_tmp.nameid, 1, &item_tmp);
if((flag=pc_additem(sd,&item_tmp,1))){ // もてないならドロップ
clif_additem(sd,0,0,flag);
@@ -10423,8 +10410,7 @@ BUILDIN_FUNC(failedremovecards)
item_tmp.card[j]=0;
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
- log_pick_pc(sd, "N", item_tmp.nameid, 1, NULL);
+ log_pick_pc(sd, LOG_TYPE_SCRIPT, item_tmp.nameid, 1, NULL);
if((flag=pc_additem(sd,&item_tmp,1))){
clif_additem(sd,0,0,flag);
@@ -10438,8 +10424,7 @@ BUILDIN_FUNC(failedremovecards)
{
if(typefail == 0 || typefail == 2){ // 武具損失
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
- log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
+ log_pick_pc(sd, LOG_TYPE_SCRIPT, sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
pc_delitem(sd,i,1,0,2);
}
@@ -10451,8 +10436,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 & LOG_SCRIPT_TRANSACTIONS)
- log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
+ log_pick_pc(sd, LOG_TYPE_SCRIPT, sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
for (j = 0; j < sd->inventory_data[i]->slot; j++)
item_tmp.card[j]=0;
@@ -10461,8 +10445,7 @@ BUILDIN_FUNC(failedremovecards)
pc_delitem(sd,i,1,0,2);
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs & LOG_SCRIPT_TRANSACTIONS)
- log_pick_pc(sd, "N", item_tmp.nameid, 1, &item_tmp);
+ log_pick_pc(sd, LOG_TYPE_SCRIPT, item_tmp.nameid, 1, &item_tmp);
if((flag=pc_additem(sd,&item_tmp,1))){
clif_additem(sd,0,0,flag);
@@ -11131,8 +11114,7 @@ BUILDIN_FUNC(clearitem)
if (sd->status.inventory[i].amount) {
//Logs items, got from (N)PC scripts [Lupus]
- 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]);
+ log_pick_pc(sd, LOG_TYPE_SCRIPT, 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);
}
@@ -12264,9 +12246,6 @@ BUILDIN_FUNC(logmes)
const char *str;
TBL_PC* sd;
- if( log_config.npc <= 0 )
- return 0;
-
sd = script_rid2sd(st);
if( sd == NULL )
return 1;