- 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://svn.code.sf.net/p/rathena/svn/trunk@8129 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
f029f7bc6e
commit
8c98388bc5
@ -3,6 +3,15 @@ Date Added
|
||||
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
|
||||
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||
2006/08/04
|
||||
* 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. [Skotlex]
|
||||
* Changed name of the setting log_pick to log_filter since that's what it
|
||||
does now. [Skotlex]
|
||||
* 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. [Skotlex]
|
||||
* Cleaned a bit the contents of log_athena.conf
|
||||
* Hide/Chasewalk will again stop screaming skill name. [Skotlex]
|
||||
* Soul Breaker will no longer receive Mastery damage. [Skotlex]
|
||||
* Fixed warning:'type' might be used uninitialized in this function [Toms]
|
||||
|
@ -1,6 +1,20 @@
|
||||
// eAthena - Log Configuration File
|
||||
|
||||
// Enable Logs?
|
||||
// 1 - Log all events.
|
||||
// Or, determine what to log by adding up the different events:
|
||||
// 0002 - Log trades
|
||||
// 0004 - Log vending transactions
|
||||
// 0008 - Log items drop/picked by players
|
||||
// 0016 - Log items drop/looted by monsters
|
||||
// 0032 - Log NPC transactions (buy/sell)
|
||||
// 0064 - Log Script generated transactions (items deleted/acquired through quests)
|
||||
// 0128 - Log items stolen from mobs (Steal/Gank)
|
||||
// 0256 - Log player-used items.
|
||||
// 0512 - Log MVP prize items
|
||||
// 1024 - Log player created/deleted items (through @/# commands)
|
||||
// Example: Log trades+vending+script items+created items: 2+4+64+1024:
|
||||
// enable_logs: 1094
|
||||
enable_logs: 1
|
||||
|
||||
// Use MySQL Logs? (SQL Version Only)
|
||||
@ -11,27 +25,28 @@ sql_logs: 0
|
||||
//if any condition is true then the item will be logged
|
||||
//0 = Don't log at all
|
||||
//1 = Log any item
|
||||
//Advanced Filter Bits: ||
|
||||
//2 - Healing items (0)
|
||||
//3 - Etc Items(3) + Arrows (10)
|
||||
//4 - Usable Items(2) + Lures,Scrolls(11)
|
||||
//5 - Weapon(4)
|
||||
//6 - Shields,Armor,Headgears,Accessories,etc(5)
|
||||
//7 - Cards(6)
|
||||
//8 - Pet Accessories(8) + Eggs(7) (well, monsters don't drop 'em but we'll use the same system for ALL logs)
|
||||
//9 - Log expensive items ( >= price_items_log)
|
||||
//10 - Log big amount of items ( >= amount_items_log)
|
||||
//11 - Log refined items (if their refine >= refine_items_log )
|
||||
//12 - Log rare items (if their drop chance <= rare_items_log )
|
||||
//Advanced Filter Bits by item type: ||
|
||||
//0002 - Healing items (0)
|
||||
//0004 - Etc Items(3) + Arrows (10)
|
||||
//0008 - Usable Items(2) + Lures,Scrolls(11)
|
||||
//0016 - Weapon(4)
|
||||
//0032 - Shields,Armor,Headgears,Accessories,etc(5)
|
||||
//0064 - Cards(6)
|
||||
//0128 - Pet Accessories(8) + Eggs(7) (well, monsters don't drop 'em but we'll use the same system for ALL logs)
|
||||
//0256 - Log expensive items ( >= price_items_log)
|
||||
//0512 - Log big amount of items ( >= amount_items_log)
|
||||
//1024 - Log refined items (if their refine >= refine_items_log )
|
||||
//2048 - Log rare items (if their drop chance <= rare_items_log )
|
||||
|
||||
//Examples: (log filters)
|
||||
//log_drop: 1 = logs ANY items
|
||||
//log_drop: 2 = logs only HEALING items
|
||||
//log_drop: 4 = logs only Etc Items and Arrows
|
||||
//log_drop: 64 = logs only Cards
|
||||
//log_drop: 322 = logs only Healing items, Cards and those items which price is >= price_items_log
|
||||
//log_drop: 4080 = logs all items (including all rare, big amount) exept healing, etc, arrows and useble ones
|
||||
//log_filter: 1 = logs ANY items
|
||||
//log_filter: 2 = logs only HEALING items
|
||||
//log_filter: 4 = logs only Etc Items and Arrows
|
||||
//log_filter: 64 = logs only Cards
|
||||
//log_filter: 322 = logs only Healing items, Cards and those items which price is >= price_items_log
|
||||
//log_filter: 4080 = logs all items (including all rare, big amount) exept healing, etc, arrows and useble ones
|
||||
//etc
|
||||
log_filter: 1
|
||||
|
||||
// Log Items which Refine >= refine_items_log
|
||||
refine_items_log: 5
|
||||
@ -47,11 +62,6 @@ amount_items_log: 100
|
||||
// Log Dead Branch Usage
|
||||
log_branch: 0
|
||||
|
||||
// The main item tracking log [Lupus]
|
||||
// Log Players/Monster Drops and Players Pickups (You can use a filter)
|
||||
// It also logs all the item movements: Trade / Vending / NPC / Shops / Admin Create/Delete
|
||||
log_pick: 0
|
||||
|
||||
// Track Zeny Changes
|
||||
// Filter settings
|
||||
// 0 - don't log; 1 - log any zeny changes; 2.....1000000 - minimal absolut logging zeny value
|
||||
@ -130,4 +140,4 @@ log_npc_file: log/npclog.log
|
||||
log_chat_file: log/chatlog.log
|
||||
|
||||
|
||||
import: conf/import/log_conf.txt
|
||||
import: conf/import/log_conf.txt
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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 {
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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){
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user