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/state.cpp | |
| parent | 6d263b7550468306018934ad1dc9928b57b8f129 (diff) | |
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/state.cpp')
| -rw-r--r-- | src/game-server/state.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game-server/state.cpp b/src/game-server/state.cpp index 61829a5..3b6dd62 100644 --- a/src/game-server/state.cpp +++ b/src/game-server/state.cpp @@ -450,10 +450,16 @@ void GameState::update(int worldTime) for (CharacterIterator p(map->getWholeMapIterator()); p; ++p) { informPlayer(map, *p); + /* + sending the whole character is overhead for the database, it should + be replaced by a syncbuffer. see: game-server/accountconnection: + AccountConnection::syncChanges() + if (worldTime % 2000 == 0) { accountHandler->sendCharacterData(*p); } + */ } for (ObjectIterator i(map->getWholeMapIterator()); i; ++i) |
