From 0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 29 May 2015 14:30:20 +0300 Subject: Add strong typed int type BeingId. --- src/net/tmwa/charserverhandler.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/net/tmwa/charserverhandler.cpp') diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index 970d6a9c6..f3a8ab0c6 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -141,7 +141,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, static_cast(loginHandler)->getToken(); LocalPlayer *const tempPlayer = new LocalPlayer( - msg.readInt32("account id"), 0); + msg.readBeingId("account id"), 0); tempPlayer->setGender(token.sex); PlayerInfoBackend &data = character->data; @@ -288,7 +288,7 @@ void CharServerHandler::deleteCharacter(Net::Character *const character, mSelectedCharacter = character; createOutPacket(CMSG_CHAR_DELETE); - outMsg.writeInt32(mSelectedCharacter->dummy->getId(), "id?"); + outMsg.writeBeingId(mSelectedCharacter->dummy->getId(), "id?"); outMsg.writeString("a@a.com", 40, "email"); } @@ -310,7 +310,7 @@ void CharServerHandler::connect() mNetwork->disconnect(); mNetwork->connect(charServer); createOutPacket(CMSG_CHAR_SERVER_CONNECT); - outMsg.writeInt32(token.account_ID, "account id"); + outMsg.writeBeingId(token.account_ID, "account id"); outMsg.writeInt32(token.session_ID1, "session id1"); outMsg.writeInt32(token.session_ID2, "session id2"); // [Fate] The next word is unused by the old char server, so we squeeze in @@ -502,7 +502,7 @@ void CharServerHandler::processCharCreate2(Net::MessageIn &msg) BLOCK_END("CharServerHandler::processCharCreate2") } -void CharServerHandler::renameCharacter(const int id A_UNUSED, +void CharServerHandler::renameCharacter(const BeingId id A_UNUSED, const std::string &newName A_UNUSED) { } -- cgit v1.2.3-60-g2f50