summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-30 01:11:55 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-30 16:37:02 +0300
commit509c746b147458bcc94c2d66932b5bb89175c732 (patch)
tree4125913e5d96a1c0c8bb2ae6e5c5ea83d3677d8f /src
parenta39600b2ec8c71c74f2dad3569aba0fc0e8a9be4 (diff)
downloadmanaplus-509c746b147458bcc94c2d66932b5bb89175c732.tar.gz
manaplus-509c746b147458bcc94c2d66932b5bb89175c732.tar.bz2
manaplus-509c746b147458bcc94c2d66932b5bb89175c732.tar.xz
manaplus-509c746b147458bcc94c2d66932b5bb89175c732.zip
Remove additional parameters from processCharCreate function.
Diffstat (limited to 'src')
-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: