summaryrefslogtreecommitdiff
path: root/src/map/chrif.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-01-11 14:02:59 -0200
committershennetsind <ind@henn.et>2014-01-11 14:02:59 -0200
commit82b583b5ef4e729ad2c3c74b26adce16a145605a (patch)
tree5bb20b90edd899b06abe9853dba06383a9379c06 /src/map/chrif.c
parent56649bda4b2f62cf42847830546b5856234b3178 (diff)
downloadhercules-82b583b5ef4e729ad2c3c74b26adce16a145605a.tar.gz
hercules-82b583b5ef4e729ad2c3c74b26adce16a145605a.tar.bz2
hercules-82b583b5ef4e729ad2c3c74b26adce16a145605a.tar.xz
hercules-82b583b5ef4e729ad2c3c74b26adce16a145605a.zip
Hercules 1st 2014 MegaPatch
http://hercules.ws/board/topic/3886-hercules-1st-2014-megapatch/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r--src/map/chrif.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 7b5cbbe59..d66ec1d85 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -265,12 +265,8 @@ int chrif_save(struct map_session_data *sd, int flag) {
sd->state.storage_flag = 0; //Force close it.
//Saving of registry values.
- if (sd->state.reg_dirty&4)
- intif->saveregistry(sd, 3); //Save char regs
- if (sd->state.reg_dirty&2)
- intif->saveregistry(sd, 2); //Save account regs
- if (sd->state.reg_dirty&1)
- intif->saveregistry(sd, 1); //Save account2 regs
+ if (sd->vars_dirty)
+ intif->saveregistry(sd);
WFIFOHEAD(chrif->fd, sizeof(sd->status) + 13);
WFIFOW(chrif->fd,0) = 0x2b01;
@@ -603,7 +599,7 @@ void chrif_authok(int fd) {
//Causes problems if the currently connected player tries to quit or this data belongs to an already connected player which is trying to re-auth.
if ( ( sd = map->id2sd(account_id) ) != NULL )
return;
-
+
if ( ( node = chrif->search(account_id) ) == NULL )
return; // should not happen