diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-08-20 00:31:25 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-08-20 00:31:25 +0000 |
commit | 14931fad97e23229b6321850bae457b6bb680c0b (patch) | |
tree | af54da777d6eb0075cfa015784bd4da7430b96ba /src | |
parent | 40f2ebde01953eff3945c9d404d851abdae98428 (diff) | |
download | manaserv-14931fad97e23229b6321850bae457b6bb680c0b.tar.gz manaserv-14931fad97e23229b6321850bae457b6bb680c0b.tar.bz2 manaserv-14931fad97e23229b6321850bae457b6bb680c0b.tar.xz manaserv-14931fad97e23229b6321850bae457b6bb680c0b.zip |
Do not send map name and send token before game and chat server information,
as per current specification.
Diffstat (limited to 'src')
-rw-r--r-- | src/accounthandler.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/accounthandler.cpp b/src/accounthandler.cpp index 8c2e43f5..c3b95724 100644 --- a/src/accounthandler.cpp +++ b/src/accounthandler.cpp @@ -329,25 +329,31 @@ void AccountHandler::processMessage(NetComputer *comp, MessageIn &message) computer.setCharacter(chars[charNum]); PlayerPtr selectedChar = computer.getCharacter(); result.writeByte(ERRMSG_OK); - std::string mapName = store.getMapNameFromId(selectedChar->getMapId()); - result.writeString(mapName); + //std::string mapName = + // store.getMapNameFromId(selectedChar->getMapId()); + //result.writeString(mapName); - selectedChar->setDestination(selectedChar->getX(), selectedChar->getY()); + selectedChar->setDestination(selectedChar->getX(), + selectedChar->getY()); selectedChar->setSpeed(10); // TODO - LOG_INFO(selectedChar->getName() << " is trying to enter the servers.", 1); + LOG_INFO(selectedChar->getName() + << " is trying to enter the servers.", 1); + std::string magic_token(32, ' '); for (int i = 0; i < 32; ++i) { magic_token[i] = 1 + (int) (127 * (rand() / (RAND_MAX + 1.0))); } + result.writeString(magic_token, 32); result.writeString("localhost"); // TODO result.writeShort(9603); result.writeString("localhost"); result.writeShort(9602); - result.writeString(magic_token, 32); + registerGameClient(magic_token, selectedChar); - registerChatClient(magic_token, selectedChar->getName(), AL_NORMAL); + registerChatClient(magic_token, selectedChar->getName(), + AL_NORMAL); } break; |