From 95100fc5191ea6e2e379ca73cd4e67bee4376ba1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 11 Jun 2013 23:40:50 +0300 Subject: add support for player look. --- src/net/tmwa/beinghandler.cpp | 3 +++ src/net/tmwa/charserverhandler.cpp | 6 +++++- src/net/tmwa/charserverhandler.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src/net/tmwa') 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(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 &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(hairColor)); outMsg.writeInt8(0); // unused outMsg.writeInt8(static_cast(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 &stats) const override; void deleteCharacter(Net::Character *const character) override; -- cgit v1.2.3-70-g09d2