summaryrefslogtreecommitdiff
path: root/src/char_sql
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-07 16:28:41 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-07 16:28:41 +0000
commit959387743887e9a57cf31b950f23be9bd34b919f (patch)
tree8a472ad961a9d3df5dea73f84ae597735b02e52e /src/char_sql
parentae287ef89682be736bf1281d758e5cd3bad56895 (diff)
downloadhercules-959387743887e9a57cf31b950f23be9bd34b919f.tar.gz
hercules-959387743887e9a57cf31b950f23be9bd34b919f.tar.bz2
hercules-959387743887e9a57cf31b950f23be9bd34b919f.tar.xz
hercules-959387743887e9a57cf31b950f23be9bd34b919f.zip
- Okay, added a chrif_save_ack packet to the char-server so now the map server will know once a character was "final saved", and only then the character will be removed from memory. On char-server reconnection, all chars that are in final-save state are resent to save (if they are still in memory, it's because the ack hasn't gotten here from the char-server). This should effectively block all dupe problems due to heavy inter-server lag, however as it's untested, it currently prints some debug messages when people are saved and then removed from memory. Need testers so this can be debugged and merged to stable!
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7568 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql')
-rw-r--r--src/char_sql/char.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index fb024a4ea..98b6534c3 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -2615,8 +2615,14 @@ int parse_frommap(int fd) {
mmo_char_tosql(cid, &char_dat);
}
- if (RFIFOB(fd,12)) //Flag? Set character offline after saving [Skotlex]
+ if (RFIFOB(fd,12))
+ { //Flag? Set character offline after saving [Skotlex]
set_char_offline(cid, aid);
+ WFIFOW(fd, 0) = 0x2b21; //Save ack only needed on final save.
+ WFIFOL(fd, 2) = aid;
+ WFIFOL(fd, 6) = cid;
+ WFIFOSET(fd, 10);
+ }
RFIFOSKIP(fd,size);
break;
}