diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-28 16:09:13 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-28 16:09:13 +0000 |
commit | e07b2da8d90f955dbe01737e9bfdb73ddaa3bd83 (patch) | |
tree | 2b7773b750e46c8356556a11944f166f3fbbe627 /src/map/vending.c | |
parent | 7ab2575a4a3499c642e315d860c82fed60e3d9bb (diff) | |
download | hercules-e07b2da8d90f955dbe01737e9bfdb73ddaa3bd83.tar.gz hercules-e07b2da8d90f955dbe01737e9bfdb73ddaa3bd83.tar.bz2 hercules-e07b2da8d90f955dbe01737e9bfdb73ddaa3bd83.tar.xz hercules-e07b2da8d90f955dbe01737e9bfdb73ddaa3bd83.zip |
- 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
Diffstat (limited to 'src/map/vending.c')
-rw-r--r-- | src/map/vending.c | 6 |
1 files changed, 4 insertions, 2 deletions
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)
{
|