summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorgepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-11 17:35:28 +0000
committergepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-11 17:35:28 +0000
commite782bd5f2f7cd73634dfd8616a351a1b97c2109c (patch)
tree319366658d419bed37df23fc67b1c80957a141f4 /src/map/npc.c
parente18603bb1985d5628f1213999e92eaed8d008eb1 (diff)
downloadhercules-e782bd5f2f7cd73634dfd8616a351a1b97c2109c.tar.gz
hercules-e782bd5f2f7cd73634dfd8616a351a1b97c2109c.tar.bz2
hercules-e782bd5f2f7cd73634dfd8616a351a1b97c2109c.tar.xz
hercules-e782bd5f2f7cd73634dfd8616a351a1b97c2109c.zip
Picklog improvements:
- now it is finally possible to log every item players gain or lose - added 3 log types: `I` for auctioned items, `B` for buying shop transactions and `X` for all other items transactions that don't fall into another category (for detailed explanation on all log types read `conf/log_athena.conf`) - it also fixes items being logged as picked up/gained by player when in fact they were dropped on the ground due to full inventory git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15420 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index eb99d8243..a17f83df7 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1271,10 +1271,8 @@ int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, uns
{
item_tmp.nameid = nameid;
item_tmp.identify = 1;
- pc_additem(sd,&item_tmp,amount);
+ pc_additem(sd,&item_tmp,amount,LOG_TYPE_NPC);
}
-
- log_pick_pc(sd, LOG_TYPE_NPC, nameid, amount, NULL);
}
return 0;
@@ -1378,11 +1376,9 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po
item_tmp.nameid = nameid;
item_tmp.identify = 1;
- pc_additem(sd,&item_tmp, amount);
+ pc_additem(sd,&item_tmp, amount, LOG_TYPE_NPC);
}
- log_pick_pc(sd, LOG_TYPE_NPC, nameid, amount, NULL);
-
return 0;
}
@@ -1486,11 +1482,7 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list)
item_tmp.nameid = nameid;
item_tmp.identify = 1;
- pc_additem(sd,&item_tmp,amount);
-
- //Logs items, Bought in NPC (S)hop [Lupus]
- log_pick_pc(sd, LOG_TYPE_NPC, item_tmp.nameid, amount, NULL);
- //Logs
+ pc_additem(sd,&item_tmp,amount,LOG_TYPE_NPC);
}
// custom merchant shop exp bonus
@@ -1631,10 +1623,6 @@ int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list)
amount = item_list[i*2+1];
nameid = sd->status.inventory[idx].nameid;
- //Logs items, Sold to NPC (S)hop [Lupus]
- log_pick_pc(sd, LOG_TYPE_NPC, nameid, -amount, &sd->status.inventory[idx]);
- //Logs
-
if( sd->inventory_data[idx]->type == IT_PETEGG && sd->status.inventory[idx].card[0] == CARD0_PET )
{
if( search_petDB_index(sd->status.inventory[idx].nameid, PET_EGG) >= 0 )
@@ -1643,7 +1631,7 @@ int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list)
}
}
- pc_delitem(sd, idx, amount, 0, 6);
+ pc_delitem(sd, idx, amount, 0, 6, LOG_TYPE_NPC);
}
if( z > MAX_ZENY )