summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/ea/charserverhandler.cpp5
-rw-r--r--src/net/ea/charserverhandler.h3
-rw-r--r--src/net/ea/eaprotocol.h4
-rw-r--r--src/net/eathena/charserverhandler.cpp5
-rw-r--r--src/net/tmwa/charserverhandler.cpp5
5 files changed, 8 insertions, 14 deletions
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: