diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-18 02:41:10 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-18 02:41:10 +0000 |
commit | 3117bb0eac0745a30b618099899bffd1f58badbd (patch) | |
tree | 744c31cc53ed6ae1bfa5774a1772c2a16be2769c /src/char_sql | |
parent | 4a2c67dc47ffc7c33eea340ea96e3d0ba57e359e (diff) | |
download | hercules-3117bb0eac0745a30b618099899bffd1f58badbd.tar.gz hercules-3117bb0eac0745a30b618099899bffd1f58badbd.tar.bz2 hercules-3117bb0eac0745a30b618099899bffd1f58badbd.tar.xz hercules-3117bb0eac0745a30b618099899bffd1f58badbd.zip |
- Updated mob_db.sql to current mob_db.txt data.
- Some cleaning on chrif.c
- The char-server will allow off-line character saves when said char is tagged for final-save (this is the scenario when the char-map reconnect).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7722 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql')
-rw-r--r-- | src/char_sql/char.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index 682a2c7d0..e390cd4e8 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -2613,19 +2613,16 @@ int parse_frommap(int fd) { RFIFOSKIP(fd,size);
break;
}
- //Check account
- if (
+ //Check account only if this ain't final save. Final-save goes through because of the char-map reconnect
+ if (RFIFOB(fd,12) || (
(character = idb_get(online_char_db, aid)) != NULL &&
- character->char_id == cid)
- ; //Temporary debug. Set chars online and save.
- else {
- ShowWarning("parse_from_map (save-char): Received data for non-existant/offline character (%d:%d). Setting char online.\n", aid, cid);
- set_char_online(id, cid, aid);
- }
-
+ character->char_id == cid))
{
memcpy(&char_dat, RFIFOP(fd,13), sizeof(struct mmo_charstatus));
mmo_char_tosql(cid, &char_dat);
+ } else { //This may be valid on char-server reconnection, when re-sending characters that already logged off.
+ ShowError("parse_from_map (save-char): Received data for non-existant/offline character (%d:%d).\n", aid, cid);
+ set_char_online(id, cid, aid);
}
if (RFIFOB(fd,12))
|