summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-04 16:38:54 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-04 16:38:54 +0000
commitdca477622e54f10689d47969153121734a411a2d (patch)
tree1a7affc325c8e5faac6dfa678dcf86c5c2b57127 /src/map/script.c
parent57286000fb15cc498f1bcd240afee63102eadf45 (diff)
downloadhercules-dca477622e54f10689d47969153121734a411a2d.tar.gz
hercules-dca477622e54f10689d47969153121734a411a2d.tar.bz2
hercules-dca477622e54f10689d47969153121734a411a2d.tar.xz
hercules-dca477622e54f10689d47969153121734a411a2d.zip
- Enabled Mastery damage on Soul Breaker again, moved adv katar mastery out of the mastery function so that it may apply to all skills except Soul Breaker.
- Changed name of the setting log_pick to log_filter since that's what it does now. - Modified enable_logs so that instead of a 0/1 setting, you can specify which kind of events to log (so you can use a combination), see log_athena for the bitmask configuration. - Cleaned a bit the contents of log_athena.conf git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8129 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c78
1 files changed, 20 insertions, 58 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 50ea3963a..ff5795939 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -5134,10 +5134,8 @@ int buildin_getitem(struct script_state *st)
}
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x40)
log_pick(sd, "N", 0, nameid, amount, NULL);
- }
- //Logs
return 0;
}
@@ -5220,10 +5218,8 @@ int buildin_getitem2(struct script_state *st)
}
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x40)
log_pick(sd, "N", 0, nameid, amount, &item_tmp);
- }
- //Logs
}
return 0;
@@ -5297,10 +5293,8 @@ int buildin_getnameditem(struct script_state *st)
}
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x40)
log_pick(sd, "N", 0, item_tmp.nameid, item_tmp.amount, &item_tmp);
- }
- //Logs
push_val(st->stack,C_INT,1);
return 0;
@@ -5433,10 +5427,8 @@ int buildin_delitem(struct script_state *st)
if(sd->status.inventory[i].amount>=amount){
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x40)
log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -amount, &sd->status.inventory[i]);
- }
- //Logs
pc_delitem(sd,i,amount,0);
return 0; //we deleted exact amount of items. now exit
@@ -5444,7 +5436,7 @@ int buildin_delitem(struct script_state *st)
amount-=sd->status.inventory[i].amount;
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ 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]);
}
//Logs
@@ -5464,10 +5456,8 @@ int buildin_delitem(struct script_state *st)
if(sd->status.inventory[i].amount>=amount){
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x40)
log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -amount, &sd->status.inventory[i]);
- }
- //Logs
pc_delitem(sd,i,amount,0);
return 0; //we deleted exact amount of items. now exit
@@ -5475,10 +5465,8 @@ int buildin_delitem(struct script_state *st)
amount-=sd->status.inventory[i].amount;
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ 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]);
- }
- //Logs
pc_delitem(sd,i,sd->status.inventory[i].amount,0);
}
@@ -5544,10 +5532,8 @@ int buildin_delitem2(struct script_state *st)
if(sd->status.inventory[i].amount>=amount){
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x40)
log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -amount, &sd->status.inventory[i]);
- }
- //Logs
pc_delitem(sd,i,amount,0);
return 0; //we deleted exact amount of items. now exit
@@ -5555,10 +5541,8 @@ int buildin_delitem2(struct script_state *st)
amount-=sd->status.inventory[i].amount;
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ 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]);
- }
- //Logs
pc_delitem(sd,i,sd->status.inventory[i].amount,0);
}
@@ -6091,10 +6075,8 @@ int buildin_successrefitem(struct script_state *st)
ep=sd->status.inventory[i].equip;
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x40)
log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
- }
- //Logs
sd->status.inventory[i].refine++;
pc_unequipitem(sd,i,2);
@@ -6103,10 +6085,8 @@ int buildin_successrefitem(struct script_state *st)
clif_delitem(sd,i,1);
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x40)
log_pick(sd, "N", 0, sd->status.inventory[i].nameid, 1, &sd->status.inventory[i]);
- }
- //Logs
clif_additem(sd,i,1,0);
pc_equipitem(sd,i,ep);
@@ -6146,10 +6126,8 @@ int buildin_failedrefitem(struct script_state *st)
i=pc_checkequip(sd,equip[num-1]);
if(i >= 0) {
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x40)
log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
- }
- //Logs
sd->status.inventory[i].refine = 0;
pc_unequipitem(sd,i,3);
@@ -8808,10 +8786,8 @@ int buildin_successremovecards(struct script_state *st)
item_tmp.card[j]=0;
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x40)
log_pick(sd, "N", 0, item_tmp.nameid, 1, NULL);
- }
- //Logs
if((flag=pc_additem(sd,&item_tmp,1))){ // 持てないならドロップ
clif_additem(sd,0,0,flag);
@@ -8827,20 +8803,16 @@ int buildin_successremovecards(struct script_state *st)
item_tmp.attribute=sd->status.inventory[i].attribute;
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x40)
log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
- }
- //Logs
for (j = 0; j < MAX_SLOTS; j++)
item_tmp.card[j]=0;
pc_delitem(sd,i,1,0);
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x40)
log_pick(sd, "N", 0, item_tmp.nameid, 1, &item_tmp);
- }
- //Logs
if((flag=pc_additem(sd,&item_tmp,1))){ // もてないならドロップ
clif_additem(sd,0,0,flag);
@@ -8885,10 +8857,8 @@ int buildin_failedremovecards(struct script_state *st)
item_tmp.card[j]=0;
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x40)
log_pick(sd, "N", 0, item_tmp.nameid, 1, NULL);
- }
- //Logs
if((flag=pc_additem(sd,&item_tmp,1))){
clif_additem(sd,0,0,flag);
@@ -8902,10 +8872,8 @@ int buildin_failedremovecards(struct script_state *st)
if(typefail == 0 || typefail == 2){ // 武具損失
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x40)
log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
- }
- //Logs
pc_delitem(sd,i,1,0);
clif_misceffect(&sd->bl,2);
@@ -8918,20 +8886,16 @@ int buildin_failedremovecards(struct script_state *st)
item_tmp.attribute=sd->status.inventory[i].attribute;
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x40)
log_pick(sd, "N", 0, sd->status.inventory[i].nameid, -1, &sd->status.inventory[i]);
- }
- //Logs
for (j = 0; j < MAX_SLOTS; j++)
item_tmp.card[j]=0;
pc_delitem(sd,i,1,0);
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x40)
log_pick(sd, "N", 0, item_tmp.nameid, 1, &item_tmp);
- }
- //Logs
if((flag=pc_additem(sd,&item_tmp,1))){
clif_additem(sd,0,0,flag);
@@ -9494,10 +9458,8 @@ int buildin_clearitem(struct script_state *st)
if (sd->status.inventory[i].amount) {
//Logs items, got from (N)PC scripts [Lupus]
- if(log_config.pick > 0 ) {
+ 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]);
- }
- //Logs
pc_delitem(sd, i, sd->status.inventory[i].amount, 0);
}