diff options
author | Andreas Habel <mail@exceptionfault.de> | 2008-11-30 12:08:57 +0100 |
---|---|---|
committer | Andreas Habel <mail@exceptionfault.de> | 2008-11-30 12:08:57 +0100 |
commit | 4abae69f1180ffe6a4dbd2db60dfa76b6ef41ebb (patch) | |
tree | 4b2e3eb8e5c35e65ec18996060a5daac9bff1938 /src/game-server/main-game.cpp | |
parent | 6d263b7550468306018934ad1dc9928b57b8f129 (diff) | |
download | manaserv-4abae69f1180ffe6a4dbd2db60dfa76b6ef41ebb.tar.gz manaserv-4abae69f1180ffe6a4dbd2db60dfa76b6ef41ebb.tar.xz manaserv-4abae69f1180ffe6a4dbd2db60dfa76b6ef41ebb.zip |
Add sync Buffer according to mantis #550
The game server buffers all changes made to a character in a sync buffer.
The buffer is sent to the account server if the buffer contains more then
20 message, reaches size of 1kb or at least every 10 seconds.
ATM Character attributes, corr points and attribute points and skills are
synchronized. TODO: items, location, money...
Diffstat (limited to 'src/game-server/main-game.cpp')
-rw-r--r-- | src/game-server/main-game.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/game-server/main-game.cpp b/src/game-server/main-game.cpp index a0723e3..93c2f1f 100644 --- a/src/game-server/main-game.cpp +++ b/src/game-server/main-game.cpp @@ -310,6 +310,8 @@ int main(int argc, char *argv[]) // Print world time at 10 second intervals to show we're alive if (worldTime % 100 == 0) { LOG_INFO("World time: " << worldTime); + // force sending changes to the account serber every 10 secs. + accountHandler->syncChanges(true); } if (accountHandler->isConnected()) |