summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-19 21:25:56 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-19 21:25:56 +0000
commit0a98391b9dba8f27a0c285fcdafc564d93a37e23 (patch)
tree06157117643325a15f5fd570767897856184e96b /src/map/script.c
parentebed223aec7badf0b6ca7cf6e3341a5c81e7174d (diff)
downloadhercules-0a98391b9dba8f27a0c285fcdafc564d93a37e23.tar.gz
hercules-0a98391b9dba8f27a0c285fcdafc564d93a37e23.tar.bz2
hercules-0a98391b9dba8f27a0c285fcdafc564d93a37e23.tar.xz
hercules-0a98391b9dba8f27a0c285fcdafc564d93a37e23.zip
- Cleaned up the log.c file.
- Splitted log_pick into log_pick_pc and log_pick_mob to avoid ugly type-casting. - Fixed log_chat not recording anything if the server is compiled in SQL mode and sql_logs is turned off (it should then record to a plain txt file) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9017 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/map/script.c b/src/map/script.c
index c8319fb4b..a8fbf454c 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -5165,7 +5165,7 @@ int buildin_getitem(struct script_state *st)
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
- log_pick(sd, "N", 0, nameid, amount, NULL);
+ log_pick_pc(sd, "N", nameid, amount, NULL);
return 0;
}
@@ -5249,7 +5249,7 @@ int buildin_getitem2(struct script_state *st)
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
- log_pick(sd, "N", 0, nameid, amount, &item_tmp);
+ log_pick_pc(sd, "N", nameid, amount, &item_tmp);
}
return 0;
@@ -5323,7 +5323,7 @@ int buildin_getnameditem(struct script_state *st)
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
- log_pick(sd, "N", 0, item_tmp.nameid, item_tmp.amount, &item_tmp);
+ log_pick_pc(sd, "N", item_tmp.nameid, item_tmp.amount, &item_tmp);
push_val(st->stack,C_INT,1);
return 0;
@@ -5455,7 +5455,7 @@ int buildin_delitem(struct script_state *st)
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
- log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -amount, &sd->status.inventory[i]);
+ log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -amount, &sd->status.inventory[i]);
pc_delitem(sd,i,amount,0);
return 0; //we deleted exact amount of items. now exit
@@ -5464,7 +5464,7 @@ int buildin_delitem(struct script_state *st)
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40) {
- log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -sd->status.inventory[i].amount, &sd->status.inventory[i]);
+ log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -sd->status.inventory[i].amount, &sd->status.inventory[i]);
}
//Logs
@@ -5484,7 +5484,7 @@ int buildin_delitem(struct script_state *st)
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
- log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -amount, &sd->status.inventory[i]);
+ log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -amount, &sd->status.inventory[i]);
pc_delitem(sd,i,amount,0);
return 0; //we deleted exact amount of items. now exit
@@ -5493,7 +5493,7 @@ int buildin_delitem(struct script_state *st)
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
- log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -sd->status.inventory[i].amount, &sd->status.inventory[i]);
+ 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);
}
@@ -5560,7 +5560,7 @@ int buildin_delitem2(struct script_state *st)
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
- log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -amount, &sd->status.inventory[i]);
+ log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -amount, &sd->status.inventory[i]);
pc_delitem(sd,i,amount,0);
return 0; //we deleted exact amount of items. now exit
@@ -5569,7 +5569,7 @@ int buildin_delitem2(struct script_state *st)
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
- log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -sd->status.inventory[i].amount, &sd->status.inventory[i]);
+ 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);
}
@@ -6154,7 +6154,7 @@ int buildin_successrefitem(struct script_state *st)
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
- log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
+ log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
sd->status.inventory[i].refine++;
pc_unequipitem(sd,i,2);
@@ -6164,7 +6164,7 @@ int buildin_successrefitem(struct script_state *st)
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
- log_pick(sd, "N", 0, sd->status.inventory[i].nameid, 1, &sd->status.inventory[i]);
+ log_pick_pc(sd, "N", sd->status.inventory[i].nameid, 1, &sd->status.inventory[i]);
clif_additem(sd,i,1,0);
pc_equipitem(sd,i,ep);
@@ -6205,7 +6205,7 @@ int buildin_failedrefitem(struct script_state *st)
if(i >= 0) {
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
- log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
+ log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
sd->status.inventory[i].refine = 0;
pc_unequipitem(sd,i,3);
@@ -8931,7 +8931,7 @@ int buildin_successremovecards(struct script_state *st)
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
- log_pick(sd, "N", 0, item_tmp.nameid, 1, NULL);
+ log_pick_pc(sd, "N", item_tmp.nameid, 1, NULL);
if((flag=pc_additem(sd,&item_tmp,1))){ // 持てないならドロップ
clif_additem(sd,0,0,flag);
@@ -8948,7 +8948,7 @@ int buildin_successremovecards(struct script_state *st)
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
- log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
+ log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
for (j = 0; j < MAX_SLOTS; j++)
item_tmp.card[j]=0;
@@ -8956,7 +8956,7 @@ int buildin_successremovecards(struct script_state *st)
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
- log_pick(sd, "N", 0, item_tmp.nameid, 1, &item_tmp);
+ log_pick_pc(sd, "N", item_tmp.nameid, 1, &item_tmp);
if((flag=pc_additem(sd,&item_tmp,1))){ // もてないならドロップ
clif_additem(sd,0,0,flag);
@@ -9002,7 +9002,7 @@ int buildin_failedremovecards(struct script_state *st)
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
- log_pick(sd, "N", 0, item_tmp.nameid, 1, NULL);
+ log_pick_pc(sd, "N", item_tmp.nameid, 1, NULL);
if((flag=pc_additem(sd,&item_tmp,1))){
clif_additem(sd,0,0,flag);
@@ -9017,7 +9017,7 @@ int buildin_failedremovecards(struct script_state *st)
if(typefail == 0 || typefail == 2){ // 武具損失
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
- log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
+ log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
pc_delitem(sd,i,1,0);
clif_misceffect(&sd->bl,2);
@@ -9031,7 +9031,7 @@ int buildin_failedremovecards(struct script_state *st)
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
- log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
+ log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
for (j = 0; j < MAX_SLOTS; j++)
item_tmp.card[j]=0;
@@ -9039,7 +9039,7 @@ int buildin_failedremovecards(struct script_state *st)
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
- log_pick(sd, "N", 0, item_tmp.nameid, 1, &item_tmp);
+ log_pick_pc(sd, "N", item_tmp.nameid, 1, &item_tmp);
if((flag=pc_additem(sd,&item_tmp,1))){
clif_additem(sd,0,0,flag);
@@ -9600,7 +9600,7 @@ int buildin_clearitem(struct script_state *st)
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
- log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -sd->status.inventory[i].amount, &sd->status.inventory[i]);
+ 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);
}