From e07b2da8d90f955dbe01737e9bfdb73ddaa3bd83 Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 28 Jun 2006 16:09:13 +0000 Subject: - Cleaned up a bit the code for @item - Fixed character/storage being sent to be saved TWICE when you logged out while the storage is opened. - Added save_settings map config. Specifies after which events do characters get saved (defaults to all): 1 - Trade successful, 2 - Vending transaction, 4 - Closing storage/guild storage, 8 - hatching a pet. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7375 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/vending.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/map/vending.c') diff --git a/src/map/vending.c b/src/map/vending.c index 38f5c848e..4a2de7ffc 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -180,8 +180,10 @@ void vending_purchasereq(struct map_session_data *sd,int len,int id,unsigned cha } //Always save BOTH: buyer and customer - chrif_save(sd,0); - chrif_save(vsd,0); + if (save_settings&2) { + chrif_save(sd,0); + chrif_save(vsd,0); + } //check for @AUTOTRADE users [durf] if (vsd->state.autotrade) { -- cgit v1.2.3-60-g2f50