implemented vending log

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@954 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
Lupus 2005-01-11 20:38:42 +00:00
parent c50add18b1
commit f0a54cf1e7
2 changed files with 17 additions and 0 deletions

View File

@ -1,4 +1,7 @@
Date Added Date Added
01/12
* Implemented Vending Log [Lupus]
TODO: use log option to log only important deals (much money, rare items, etc)
01/11 01/11
* Added Shinomori's changes to npc event timers (I never realised it, thanks * Added Shinomori's changes to npc event timers (I never realised it, thanks
^^; ) [celest] ^^; ) [celest]

View File

@ -112,6 +112,13 @@ void vending_purchasereq(struct map_session_data *sd,int len,int id,unsigned cha
clif_tradecancelled(vsd); clif_tradecancelled(vsd);
return; return;
} }
//log added by Lupus
#ifndef TXT_ONLY
if(log_config.vend > 0)
log_vend(sd,vsd, 0,1, z); //n == 0, amount == 1 for Zeny log.
#endif
pc_payzeny(sd, z); pc_payzeny(sd, z);
pc_getzeny(vsd, z); pc_getzeny(vsd, z);
for(i = 0; 8 + 4 * i < len; i++) { for(i = 0; 8 + 4 * i < len; i++) {
@ -122,6 +129,13 @@ void vending_purchasereq(struct map_session_data *sd,int len,int id,unsigned cha
vsd->vending[vend_list[i]].amount -= amount; vsd->vending[vend_list[i]].amount -= amount;
pc_cart_delitem(vsd, index, amount, 0); pc_cart_delitem(vsd, index, amount, 0);
clif_vendingreport(vsd, index, amount); clif_vendingreport(vsd, index, amount);
//log added by Lupus
#ifndef TXT_ONLY
if(log_config.vend > 0)
log_vend(sd,vsd, index, amount, 0); // for Item log.
#endif
} }
} }