From 509c746b147458bcc94c2d66932b5bb89175c732 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 30 Aug 2014 01:11:55 +0300 Subject: Remove additional parameters from processCharCreate function. --- src/net/ea/charserverhandler.cpp | 5 ++--- src/net/ea/charserverhandler.h | 3 +-- src/net/ea/eaprotocol.h | 4 +++- src/net/eathena/charserverhandler.cpp | 5 +---- src/net/tmwa/charserverhandler.cpp | 5 +---- 5 files changed, 8 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp index fa044e83a..9b747ed49 100644 --- a/src/net/ea/charserverhandler.cpp +++ b/src/net/ea/charserverhandler.cpp @@ -146,12 +146,11 @@ void CharServerHandler::processCharLoginError(Net::MessageIn &msg) const BLOCK_END("CharServerHandler::processCharLoginError") } -void CharServerHandler::processCharCreate(Net::MessageIn &msg, - const bool withColors) +void CharServerHandler::processCharCreate(Net::MessageIn &msg) { BLOCK_START("CharServerHandler::processCharCreate") Net::Character *const character = new Net::Character; - readPlayerData(msg, character, withColors); + readPlayerData(msg, character, msg.getId() == SMSG_CHAR_CREATE_SUCCEEDED2); mCharacters.push_back(character); updateCharSelectDialog(); diff --git a/src/net/ea/charserverhandler.h b/src/net/ea/charserverhandler.h index ffbb97bc8..e86965f6b 100644 --- a/src/net/ea/charserverhandler.h +++ b/src/net/ea/charserverhandler.h @@ -68,8 +68,7 @@ class CharServerHandler notfinal : public Net::CharServerHandler virtual void processCharLoginError(Net::MessageIn &msg) const; - virtual void processCharCreate(Net::MessageIn &msg, - const bool withColors); + virtual void processCharCreate(Net::MessageIn &msg); virtual void processCharCreateFailed(Net::MessageIn &msg); diff --git a/src/net/ea/eaprotocol.h b/src/net/ea/eaprotocol.h index 84fb23347..153a59a86 100644 --- a/src/net/ea/eaprotocol.h +++ b/src/net/ea/eaprotocol.h @@ -70,7 +70,9 @@ static const int STORAGE_OFFSET = 1; #define SMSG_PLAYER_CHAT 0x008e /**< Player talks */ #define SMSG_PLAYER_CHAT2 0x0224 /**< Player talks */ -#define SMSG_BEING_CHAT2 0x0223 /**< A being talks in channels */ #define SMSG_PLAYER_INVENTORY 0x01ee +#define SMSG_CHAR_CREATE_SUCCEEDED2 0x0221 +#define SMSG_BEING_CHAT2 0x0223 /**< A being talks in channels */ + #endif // NET_EA_EAPROTOCOL_H diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index a7c77f122..58b757e3f 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -88,11 +88,8 @@ void CharServerHandler::handleMessage(Net::MessageIn &msg) break; case SMSG_CHAR_CREATE_SUCCEEDED: - processCharCreate(msg, false); - break; - case SMSG_CHAR_CREATE_SUCCEEDED2: - processCharCreate(msg, true); + processCharCreate(msg); break; case SMSG_CHAR_CREATE_FAILED: diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index c01ec4666..ba90556fa 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -90,11 +90,8 @@ void CharServerHandler::handleMessage(Net::MessageIn &msg) break; case SMSG_CHAR_CREATE_SUCCEEDED: - processCharCreate(msg, false); - break; - case SMSG_CHAR_CREATE_SUCCEEDED2: - processCharCreate(msg, true); + processCharCreate(msg); break; case SMSG_CHAR_CREATE_FAILED: -- cgit v1.2.3-70-g09d2