diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-06-11 23:40:50 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-06-12 01:39:53 +0300 |
commit | 95100fc5191ea6e2e379ca73cd4e67bee4376ba1 (patch) | |
tree | 1232af2b6d9a85e28a46b126140af54d8de3b9fc /src/net | |
parent | fe01452d2448a8033dfff33a052f5a674dfc1a43 (diff) | |
download | plus-95100fc5191ea6e2e379ca73cd4e67bee4376ba1.tar.gz plus-95100fc5191ea6e2e379ca73cd4e67bee4376ba1.tar.bz2 plus-95100fc5191ea6e2e379ca73cd4e67bee4376ba1.tar.xz plus-95100fc5191ea6e2e379ca73cd4e67bee4376ba1.zip |
add support for player look.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/charserverhandler.h | 1 | ||||
-rw-r--r-- | src/net/eathena/charserverhandler.cpp | 1 | ||||
-rw-r--r-- | src/net/eathena/charserverhandler.h | 1 | ||||
-rw-r--r-- | src/net/tmwa/beinghandler.cpp | 3 | ||||
-rw-r--r-- | src/net/tmwa/charserverhandler.cpp | 6 | ||||
-rw-r--r-- | src/net/tmwa/charserverhandler.h | 1 |
6 files changed, 12 insertions, 1 deletions
diff --git a/src/net/charserverhandler.h b/src/net/charserverhandler.h index 2722d833a..2dee5c05e 100644 --- a/src/net/charserverhandler.h +++ b/src/net/charserverhandler.h @@ -83,6 +83,7 @@ class CharServerHandler const bool gender, const int hairstyle, const int hairColor, const unsigned char race, + const unsigned char look, const std::vector<int> &stats) const = 0; virtual void deleteCharacter(Net::Character *const character) = 0; diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index 8c82ed85d..1d4928bc9 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -214,6 +214,7 @@ void CharServerHandler::newCharacter(const std::string &name, const int slot, const bool gender A_UNUSED, const int hairstyle, const int hairColor, const unsigned char race A_UNUSED, + const unsigned char look A_UNUSED, const std::vector<int> &stats) const { MessageOut outMsg(CMSG_CHAR_CREATE); diff --git a/src/net/eathena/charserverhandler.h b/src/net/eathena/charserverhandler.h index 2dfdff8c1..215e14235 100644 --- a/src/net/eathena/charserverhandler.h +++ b/src/net/eathena/charserverhandler.h @@ -54,6 +54,7 @@ class CharServerHandler final : public MessageHandler, void newCharacter(const std::string &name, const int slot, const bool gender, const int hairstyle, const int hairColor, const unsigned char race, + const unsigned char look, const std::vector<int> &stats) const override; void deleteCharacter(Net::Character *const character) override; diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index e68e9f80b..70e57c9a4 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -380,6 +380,9 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg, static_cast<unsigned char>(id2)); player_node->imitateOutfit(dstBeing, SPRITE_EVOL2); break; + case 16: + dstBeing->setLook(id); + break; default: logger->log("QQQ3 CHANGE_LOOKS: unsupported type: " "%d, id: %d", type, id); diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index 68699e327..64626becb 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -248,6 +248,7 @@ void CharServerHandler::newCharacter(const std::string &name, const int slot, const int hairstyle, const int hairColor, const unsigned char race, + const unsigned char look, const std::vector<int> &stats) const { MessageOut outMsg(CMSG_CHAR_CREATE); @@ -259,7 +260,10 @@ void CharServerHandler::newCharacter(const std::string &name, const int slot, outMsg.writeInt8(static_cast<int8_t>(hairColor)); outMsg.writeInt8(0); // unused outMsg.writeInt8(static_cast<int8_t>(hairstyle)); - outMsg.writeInt8(123); // look + if (serverVersion >= 9) + outMsg.writeInt8(look); + else + outMsg.writeInt8(0); if (serverVersion >= 2) outMsg.writeInt8(race); } diff --git a/src/net/tmwa/charserverhandler.h b/src/net/tmwa/charserverhandler.h index 156302c80..412c77385 100644 --- a/src/net/tmwa/charserverhandler.h +++ b/src/net/tmwa/charserverhandler.h @@ -54,6 +54,7 @@ class CharServerHandler final : public MessageHandler, void newCharacter(const std::string &name, const int slot, const bool gender, const int hairstyle, const int hairColor, const unsigned char race, + const unsigned char look, const std::vector<int> &stats) const override; void deleteCharacter(Net::Character *const character) override; |