diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-04 16:38:54 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-04 16:38:54 +0000 |
commit | dca477622e54f10689d47969153121734a411a2d (patch) | |
tree | 1a7affc325c8e5faac6dfa678dcf86c5c2b57127 /src/map | |
parent | 57286000fb15cc498f1bcd240afee63102eadf45 (diff) | |
download | hercules-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')
-rw-r--r-- | src/map/atcommand.c | 23 | ||||
-rw-r--r-- | src/map/battle.c | 16 | ||||
-rw-r--r-- | src/map/charcommand.c | 8 | ||||
-rw-r--r-- | src/map/log.c | 14 | ||||
-rw-r--r-- | src/map/log.h | 4 | ||||
-rw-r--r-- | src/map/mob.c | 6 | ||||
-rw-r--r-- | src/map/npc.c | 4 | ||||
-rw-r--r-- | src/map/party.c | 2 | ||||
-rw-r--r-- | src/map/pc.c | 6 | ||||
-rw-r--r-- | src/map/script.c | 78 | ||||
-rw-r--r-- | src/map/status.c | 2 | ||||
-rw-r--r-- | src/map/trade.c | 4 | ||||
-rw-r--r-- | src/map/vending.c | 2 |
13 files changed, 60 insertions, 109 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 7117a8265..695cdf416 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2642,9 +2642,8 @@ int atcommand_item( }
//Logs (A)dmins items [Lupus]
- if(log_config.pick > 0 )
+ if(log_config.enable_logs&0x400)
log_pick(sd, "A", 0, item_id, number, NULL);
- //Logs
clif_displaymessage(fd, msg_table[18]); // Item created.
return 0;
@@ -2718,10 +2717,8 @@ int atcommand_item2( }
//Logs (A)dmins items [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x400)
log_pick(sd, "A", 0, item_tmp.nameid, number, &item_tmp);
- }
- //Logs
clif_displaymessage(fd, msg_table[18]); // Item created.
} else {
@@ -2747,10 +2744,8 @@ int atcommand_itemreset( if (sd->status.inventory[i].amount && sd->status.inventory[i].equip == 0) {
//Logs (A)dmins items [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x400)
log_pick(sd, "A", 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);
}
@@ -3913,10 +3908,8 @@ int atcommand_produce( clif_misceffect(&sd->bl, 3);
//Logs (A)dmins items [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x400)
log_pick(sd, "A", 0, tmp_item.nameid, 1, &tmp_item);
- }
- //Logs
if ((flag = pc_additem(sd, &tmp_item, 1)))
clif_additem(sd, 0, 0, flag);
@@ -6377,10 +6370,8 @@ int atcommand_chardelitem(const int fd, struct map_session_data* sd, for(i = 0; i < number && item_position >= 0; i++) {
//Logs (A)dmins items [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x400)
log_pick(pl_sd, "A", 0, pl_sd->status.inventory[item_position].nameid, -1, &pl_sd->status.inventory[item_position]);
- }
- //Logs
pc_delitem(pl_sd, item_position, 1, 0);
count++;
@@ -7678,10 +7669,8 @@ void getring (struct map_session_data *sd) item_tmp.card[3]=sd->status.partner_id >> 16;
//Logs (A)dmins items [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x400)
log_pick(sd, "A", 0, item_id, 1, &item_tmp);
- }
- //Logs
if((flag = pc_additem(sd,&item_tmp,1))) {
clif_additem(sd,0,0,flag);
diff --git a/src/map/battle.c b/src/map/battle.c index e4521d6ed..a2a5147bc 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -627,9 +627,6 @@ int battle_addmastery(struct map_session_data *sd,struct block_list *target,int damage += (skill * 3); break; case W_KATAR: - if((skill = pc_checkskill(sd,ASC_KATAR)) > 0) - //Advanced Katar Research by zanetheinsane - damage += damage*(10 +skill * 2)/100; if((skill = pc_checkskill(sd,AS_KATAR)) > 0) damage += (skill * 3); break; @@ -1756,12 +1753,19 @@ static struct Damage battle_calc_weapon_attack( if (sd && flag.weapon && skill_num != MO_INVESTIGATE && skill_num != MO_EXTREMITYFIST && - skill_num != CR_GRANDCROSS && - skill_num != ASC_BREAKER) + skill_num != CR_GRANDCROSS) { //Add mastery damage + if(skill_num != ASC_BREAKER && sd->status.weapon == W_KATAR && + (skill=pc_checkskill(sd,ASC_KATAR)) > 0) + { //Adv Katar Mastery is does not applies to ASC_BREAKER, + // but other masteries DO apply >_> + ATK_ADDRATE(10+ 2*skill); + } + wd.damage = battle_addmastery(sd,target,wd.damage,0); if (flag.lh) wd.damage2 = battle_addmastery(sd,target,wd.damage2,1); - + + if((skill=pc_checkskill(sd,SG_STAR_ANGER)) >0 && (t_class == sd->hate_mob[2] || (sc && sc->data[SC_MIRACLE].timer!=-1))) { skillratio = (sd->status.base_level + sstatus->str + sstatus->dex + sstatus->luk)/(skill<4?12-3*skill:1); diff --git a/src/map/charcommand.c b/src/map/charcommand.c index 771fef36b..50f44988a 100644 --- a/src/map/charcommand.c +++ b/src/map/charcommand.c @@ -1004,10 +1004,8 @@ charcommand_giveitem_sub(struct map_session_data *sd,struct item_data *item_data clif_additem((struct map_session_data*)sd, 0, 0, flag);
}
//Logs (A)dmins items [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x400)
log_pick(sd, "A", 0, item_tmp.nameid, number, &item_tmp);
- }
- //Logs
}
}
@@ -1075,10 +1073,8 @@ int charcommand_item( }
//Logs (A)dmins items [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x400)
log_pick(sd, "A", 0, item_tmp.nameid, number, &item_tmp);
- }
- //Logs
clif_displaymessage(fd, msg_table[18]); // Item created.
} else {
diff --git a/src/map/log.c b/src/map/log.c index 08a20b456..c850bab65 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -105,11 +105,9 @@ int log_pick(struct map_session_data *sd, char *type, int mob_id, int nameid, in char *mapname;
int obj_id;
- if(log_config.enable_logs <= 0)
- return 0;
nullpo_retr(0, sd);
//Should we log this item? [Lupus]
- if (!should_log_item(log_config.pick,nameid, amount))
+ if (!should_log_item(log_config.filter,nameid, amount))
return 0; //we skip logging this items set - they doesn't met our logging conditions [Lupus]
//either PLAYER or MOB (here we get map name and objects ID)
@@ -396,6 +394,8 @@ int log_config_read(char *cfgName) {
if(strcmpi(w1,"enable_logs") == 0) {
log_config.enable_logs = (atoi(w2));
+ if (log_config.enable_logs&1) //Log everything.
+ log_config.enable_logs=0xFFFFFFFF;
} else if(strcmpi(w1,"sql_logs") == 0) {
log_config.sql_logs = (atoi(w2));
//start of common filter settings
@@ -410,8 +410,8 @@ int log_config_read(char *cfgName) //end of common filter settings
} else if(strcmpi(w1,"log_branch") == 0) {
log_config.branch = (atoi(w2));
- } else if(strcmpi(w1,"log_pick") == 0) {
- log_config.pick = (atoi(w2));
+ } else if(strcmpi(w1,"log_filter") == 0) {
+ log_config.filter = (atoi(w2));
} else if(strcmpi(w1,"log_zeny") == 0) {
log_config.zeny = (atoi(w2));
} else if(strcmpi(w1,"log_gm") == 0) {
@@ -431,7 +431,7 @@ int log_config_read(char *cfgName) ShowNotice("Logging Dead Branch Usage to table `%s`\n", w2);
} else if(strcmpi(w1, "log_pick_db") == 0) {
strcpy(log_config.log_pick_db, w2);
- if(log_config.pick == 1)
+ if(log_config.filter)
ShowNotice("Logging Item Picks to table `%s`\n", w2);
} else if(strcmpi(w1, "log_zeny_db") == 0) {
strcpy(log_config.log_zeny_db, w2);
@@ -462,7 +462,7 @@ int log_config_read(char *cfgName) ShowNotice("Logging Dead Branch Usage to file `%s`.txt\n", w2);
} else if(strcmpi(w1, "log_pick_file") == 0) {
strcpy(log_config.log_pick, w2);
- if(log_config.pick > 0 && log_config.sql_logs < 1)
+ if(log_config.filter > 0 && log_config.sql_logs < 1)
ShowNotice("Logging Item Picks to file `%s`.txt\n", w2);
} else if(strcmpi(w1, "log_zeny_file") == 0) {
strcpy(log_config.log_zeny, w2);
diff --git a/src/map/log.h b/src/map/log.h index 0fb171d5b..05de892f4 100644 --- a/src/map/log.h +++ b/src/map/log.h @@ -29,10 +29,10 @@ int log_config_read(char *cfgName); int should_log_item(int filter, int nameid, int amount); //log filter check
extern struct Log_Config {
- int enable_logs;
+ int enable_logs, filter;
int sql_logs;
int rare_items_log,refine_items_log,price_items_log,amount_items_log; //for filter
- int branch, pick, drop, mvpdrop, zeny, gm, npc, chat;
+ int branch, drop, mvpdrop, zeny, gm, npc, chat;
char log_branch[32], log_pick[32], log_zeny[32], log_mvpdrop[32], log_gm[32], log_npc[32], log_chat[32];
char log_branch_db[32], log_pick_db[32], log_zeny_db[32], log_mvpdrop_db[32], log_gm_db[32], log_npc_db[32], log_chat_db[32];
int uptime;
diff --git a/src/map/mob.c b/src/map/mob.c index 70b0b0f0c..bbdf65bfe 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1265,7 +1265,7 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap) fitem = (struct flooritem_data *)tbl; if (md->lootitem_count < LOOTITEM_SIZE) { memcpy (&md->lootitem[md->lootitem_count++], &fitem->item_data, sizeof(md->lootitem[0])); - if(log_config.pick > 0) //Logs items, taken by (L)ooter Mobs [Lupus] + if(log_config.enable_logs&0x10) //Logs items, taken by (L)ooter Mobs [Lupus] log_pick((struct map_session_data*)md, "L", md->class_, md->lootitem[md->lootitem_count-1].nameid, md->lootitem[md->lootitem_count-1].amount, &md->lootitem[md->lootitem_count-1]); } else { //Destroy first looted item... if (md->lootitem[0].card[0] == (short)0xff00) @@ -1470,7 +1470,7 @@ static int mob_delay_item_drop(int tid,unsigned int tick,int id,int data) */ static void mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct item_drop *ditem, int loot, int drop_rate) { - if(log_config.pick > 0) + if(log_config.enable_logs&0x10) { //Logs items, dropped by mobs [Lupus] if (loot) log_pick((struct map_session_data*)md, "L", md->class_, ditem->item_data.nameid, -ditem->item_data.amount, &ditem->item_data); @@ -2102,7 +2102,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,second_sd,third_sd,1); } - if(log_config.pick > 0) {//Logs items, MVP prizes [Lupus] + if(log_config.enable_logs&0x200) {//Logs items, MVP prizes [Lupus] log_pick((struct map_session_data*)md, "M", md->class_, item.nameid, -1, NULL); log_pick(mvp_sd, "P", 0, item.nameid, 1, NULL); } diff --git a/src/map/npc.c b/src/map/npc.c index 2aee1c58c..af22a84de 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1240,7 +1240,7 @@ int npc_buylist(struct map_session_data *sd,int n,unsigned short *item_list) pc_additem(sd,&item_tmp,item_list[i*2]);
//Logs items, Bought in NPC (S)hop [Lupus]
- if(sd && log_config.pick > 0 )
+ if(log_config.enable_logs&0x20)
log_pick(sd, "S", 0, item_tmp.nameid, item_list[i*2], NULL);
//Logs
}
@@ -1301,7 +1301,7 @@ int npc_selllist(struct map_session_data *sd,int n,unsigned short *item_list) intif_delete_petdata(MakeDWord(sd->status.inventory[idx].card[1],sd->status.inventory[idx].card[2]));
}
- if(log_config.pick) //Logs items, Sold to NPC (S)hop [Lupus]
+ if(log_config.enable_logs&0x20) //Logs items, Sold to NPC (S)hop [Lupus]
log_pick(sd, "S", 0, nameid, -qty, &sd->status.inventory[idx]);
if(nd) {
diff --git a/src/map/party.c b/src/map/party.c index 58de89038..9ed5e3e0d 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -800,7 +800,7 @@ int party_share_loot(struct party_data *p, TBL_PC *sd, struct item *item_data, i return i;
}
- if(log_config.pick) //Logs items, taken by (P)layers [Lupus]
+ if(log_config.enable_logs&0x8) //Logs items, taken by (P)layers [Lupus]
log_pick(target, "P", 0, item_data->nameid, item_data->amount, item_data);
//Logs
if(battle_config.party_show_share_picker && target != sd){
diff --git a/src/map/pc.c b/src/map/pc.c index 674b63973..2b931ba23 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2700,7 +2700,7 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount) } //Logs items, dropped by (P)layers [Lupus] - if(log_config.pick > 0 ) + if(log_config.enable_logs&0x8) log_pick(sd, "P", 0, sd->status.inventory[n].nameid, -amount, (struct item*)&sd->status.inventory[n]); //Logs @@ -2900,7 +2900,7 @@ int pc_useitem(struct map_session_data *sd,int n) else { clif_useitemack(sd,n,amount-1,1); //Logs (C)onsumable items [Lupus] - if(log_config.pick > 0 ) + if(log_config.enable_logs&0x100) log_pick(sd, "C", 0, sd->status.inventory[n].nameid, -1, &sd->status.inventory[n]); //Logs pc_delitem(sd,n,1,1); @@ -3170,7 +3170,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl) else { //Only invoke logs if item was successfully added (otherwise logs lie about actual item transaction) //Logs items, Stolen from mobs [Lupus] - if(log_config.pick > 0 ) { + if(log_config.enable_logs&0x80) { log_pick((struct map_session_data*)md, "M", md->class_, itemid, -1, NULL); log_pick(sd, "P", 0, itemid, 1, NULL); } 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); } diff --git a/src/map/status.c b/src/map/status.c index 306dc9c4c..ce2d11f54 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1695,12 +1695,12 @@ int status_calc_pc(struct map_session_data* sd,int first) if(sd->equip_index[EQI_AMMO] >= 0){ index = sd->equip_index[EQI_AMMO]; if(sd->inventory_data[index]){ // Arrows + sd->arrow_atk += sd->inventory_data[index]->atk; sd->state.lr_flag = 2; run_script(sd->inventory_data[index]->script,0,sd->bl.id,0); sd->state.lr_flag = 0; if (!calculating) //Abort, run_script retriggered status_calc_pc. [Skotlex] return 1; - sd->arrow_atk += sd->inventory_data[index]->atk; } } diff --git a/src/map/trade.c b/src/map/trade.c index 6cf7fe293..3bbf4385b 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -488,7 +488,7 @@ void trade_tradecommit(struct map_session_data *sd) { flag = pc_additem(tsd, &sd->status.inventory[n], sd->deal.item[trade_i].amount);
if (flag == 0) {
//Logs (T)rade [Lupus]
- if(log_config.pick > 0 )
+ if(log_config.enable_logs&0x2)
log_pick(sd, "T", 0, sd->status.inventory[n].nameid, -(sd->deal.item[trade_i].amount), &sd->status.inventory[n]);
log_pick(tsd, "T", 0, sd->status.inventory[n].nameid, sd->deal.item[trade_i].amount, &sd->status.inventory[n]);
//Logs
@@ -504,7 +504,7 @@ void trade_tradecommit(struct map_session_data *sd) { flag = pc_additem(sd, &tsd->status.inventory[n], tsd->deal.item[trade_i].amount);
if (flag == 0) {
//Logs (T)rade [Lupus]
- if(log_config.pick > 0 )
+ if(log_config.enable_logs&0x2)
log_pick(tsd, "T", 0, tsd->status.inventory[n].nameid, -(tsd->deal.item[trade_i].amount), &tsd->status.inventory[n]);
log_pick(sd, "T", 0, tsd->status.inventory[n].nameid, tsd->deal.item[trade_i].amount, &tsd->status.inventory[n]);
//Logs
diff --git a/src/map/vending.c b/src/map/vending.c index 073a21303..bb518babf 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -159,7 +159,7 @@ void vending_purchasereq(struct map_session_data *sd,int len,int id,unsigned cha //if (amount < 0) break; // tested at start of the function
//Logs sold (V)ending items [Lupus]
- if(log_config.pick > 0 ) {
+ if(log_config.enable_logs&0x4) {
log_pick(vsd, "V", 0, vsd->status.cart[idx].nameid, -amount, (struct item*)&vsd->status.cart[idx]);
log_pick( sd, "V", 0, vsd->status.cart[idx].nameid, amount, (struct item*)&vsd->status.cart[idx]);
}
|