diff options
author | Andreas Habel <mail@exceptionfault.de> | 2008-12-01 18:27:14 +0100 |
---|---|---|
committer | Andreas Habel <mail@exceptionfault.de> | 2008-12-01 18:27:14 +0100 |
commit | b3d6d3889390843374fe0b9184dd77c5fcb84e8b (patch) | |
tree | 1601f16d933b8c77b2021b44d659de5a23fd8f3f /src/game-server/accountconnection.cpp | |
parent | 82b412fa1d77c50689327d949029ff7f5d45fb6b (diff) | |
download | manaserv-b3d6d3889390843374fe0b9184dd77c5fcb84e8b.tar.gz manaserv-b3d6d3889390843374fe0b9184dd77c5fcb84e8b.tar.xz manaserv-b3d6d3889390843374fe0b9184dd77c5fcb84e8b.zip |
Added new table to store online users. See mantis #553
This upgrade will be the first, we provide database installation scripts
and update scripts to upgrade from the previous version. For more details
about database upgrades see
http://wiki.themanaworld.org/index.php/Upgrade_Database and feel free to
comment.
Diffstat (limited to 'src/game-server/accountconnection.cpp')
-rw-r--r-- | src/game-server/accountconnection.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/game-server/accountconnection.cpp b/src/game-server/accountconnection.cpp index bbdcdd1..6d6276d 100644 --- a/src/game-server/accountconnection.cpp +++ b/src/game-server/accountconnection.cpp @@ -362,3 +362,19 @@ void AccountConnection::updateExperience(const int CharId, const int SkillId, mSyncBuffer->writeLong(SkillValue); syncChanges(); } + +void AccountConnection::updateOnlineStatus(const int CharId, const bool Online) +{ + mSyncMessages++; + mSyncBuffer->writeByte(SYNC_ONLINE_STATUS); + mSyncBuffer->writeLong(CharId); + if (Online) + { + mSyncBuffer->writeByte(0x01); + } + else + { + mSyncBuffer->writeByte(0x00); + } + syncChanges(); +} |