diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2013-04-15 22:15:31 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2013-04-15 22:15:31 +0200 |
commit | c53bc90dbaa876a86f762a3d864b1f920e2b8071 (patch) | |
tree | 1a8174f4d1745a4799210db970aa2230df622d34 /src/account-server/serverhandler.cpp | |
parent | b89e404f85358f2e3ff87d7731376dbeacdf9778 (diff) | |
parent | 81be8dc99ba7558c8915310eed095df43e3bdbf7 (diff) | |
download | manaserv-c53bc90dbaa876a86f762a3d864b1f920e2b8071.tar.gz manaserv-c53bc90dbaa876a86f762a3d864b1f920e2b8071.tar.bz2 manaserv-c53bc90dbaa876a86f762a3d864b1f920e2b8071.tar.xz manaserv-c53bc90dbaa876a86f762a3d864b1f920e2b8071.zip |
Merge branch 'master' into lpc2012
Conflicts:
src/account-server/accounthandler.cpp
src/game-server/character.cpp
Diffstat (limited to 'src/account-server/serverhandler.cpp')
-rw-r--r-- | src/account-server/serverhandler.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/account-server/serverhandler.cpp b/src/account-server/serverhandler.cpp index 024266bb..9ed317eb 100644 --- a/src/account-server/serverhandler.cpp +++ b/src/account-server/serverhandler.cpp @@ -156,7 +156,7 @@ bool GameServerHandler::getGameServerFromMap(int mapId, } static void registerGameClient(GameServer *s, const std::string &token, - Character *ptr) + CharacterData *ptr) { MessageOut msg(AGMSG_PLAYER_ENTER); msg.writeString(token, MAGIC_TOKEN_LENGTH); @@ -167,7 +167,7 @@ static void registerGameClient(GameServer *s, const std::string &token, } void GameServerHandler::registerClient(const std::string &token, - Character *ptr) + CharacterData *ptr) { GameServer *s = ::getGameServerFromMap(ptr->getMapId()); assert(s); @@ -292,7 +292,7 @@ void ServerHandler::processMessage(NetComputer *comp, MessageIn &msg) { LOG_DEBUG("GAMSG_PLAYER_DATA"); int id = msg.readInt32(); - if (Character *ptr = storage->getCharacter(id, NULL)) + if (CharacterData *ptr = storage->getCharacter(id, nullptr)) { deserializeCharacterData(*ptr, msg); if (!storage->updateCharacter(ptr)) @@ -320,7 +320,7 @@ void ServerHandler::processMessage(NetComputer *comp, MessageIn &msg) LOG_DEBUG("GAMSG_REDIRECT"); int id = msg.readInt32(); std::string magic_token(utils::getMagicToken()); - if (Character *ptr = storage->getCharacter(id, NULL)) + if (CharacterData *ptr = storage->getCharacter(id, nullptr)) { int mapId = ptr->getMapId(); if (GameServer *s = getGameServerFromMap(mapId)) @@ -353,7 +353,7 @@ void ServerHandler::processMessage(NetComputer *comp, MessageIn &msg) int id = msg.readInt32(); std::string magic_token = msg.readString(MAGIC_TOKEN_LENGTH); - if (Character *ptr = storage->getCharacter(id, NULL)) + if (CharacterData *ptr = storage->getCharacter(id, nullptr)) { int accountID = ptr->getAccountID(); AccountClientHandler::prepareReconnect(magic_token, accountID); @@ -432,7 +432,7 @@ void ServerHandler::processMessage(NetComputer *comp, MessageIn &msg) int level = msg.readInt16(); // get the character so we can get the account id - Character *c = storage->getCharacter(id, NULL); + CharacterData *c = storage->getCharacter(id, NULL); if (c) { storage->setAccountLevel(c->getAccountID(), level); @@ -478,7 +478,7 @@ void ServerHandler::processMessage(NetComputer *comp, MessageIn &msg) result.writeInt32(characterId); // get the character based on the id - Character *ptr = storage->getCharacter(characterId, NULL); + CharacterData *ptr = storage->getCharacter(characterId, nullptr); if (!ptr) { // Invalid character @@ -528,8 +528,8 @@ void ServerHandler::processMessage(NetComputer *comp, MessageIn &msg) result.writeInt32(senderId); // get their characters - Character *sender = storage->getCharacter(senderId, NULL); - Character *receiver = storage->getCharacter(receiverName); + CharacterData *sender = storage->getCharacter(senderId, NULL); + CharacterData *receiver = storage->getCharacter(receiverName); if (!sender || !receiver) { // Invalid character @@ -657,7 +657,7 @@ void GameServerHandler::dumpStatistics(std::ostream &os) } } -void GameServerHandler::sendPartyChange(Character *ptr, int partyId) +void GameServerHandler::sendPartyChange(CharacterData *ptr, int partyId) { GameServer *s = ::getGameServerFromMap(ptr->getMapId()); if (s) |