diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-01-18 14:06:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-01-18 14:06:44 +0300 |
commit | 64309d7a7dc6380d62fa11363073d4243cbfa665 (patch) | |
tree | e9ac37f294e2a612391be6afa199b689e90defe8 /src/net/tmwa/charserverhandler.cpp | |
parent | bc22bc4da27d80627fa966660670219b3652e9ec (diff) | |
download | manaplus-64309d7a7dc6380d62fa11363073d4243cbfa665.tar.gz manaplus-64309d7a7dc6380d62fa11363073d4243cbfa665.tar.bz2 manaplus-64309d7a7dc6380d62fa11363073d4243cbfa665.tar.xz manaplus-64309d7a7dc6380d62fa11363073d4243cbfa665.zip |
Convert player look variable format from 8 bit to 16 bit.
Diffstat (limited to 'src/net/tmwa/charserverhandler.cpp')
-rw-r--r-- | src/net/tmwa/charserverhandler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index a8815da5b..1b77b950d 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -173,7 +173,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, msg.readInt16("speed"); const uint16_t race = msg.readInt16("class"); const uint8_t hairStyle = msg.readUInt8("hair style"); - const uint8_t look = msg.readUInt8("look"); + const uint16_t look = msg.readUInt8("look"); tempPlayer->setSubtype(race, look); const uint16_t weapon = msg.readInt16("weapon"); tempPlayer->setSprite(SPRITE_BODY, weapon, "", 1, true); @@ -272,7 +272,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 uint16_t look, const std::vector<int> &stats) const { createOutPacket(CMSG_CHAR_CREATE); @@ -285,7 +285,7 @@ void CharServerHandler::newCharacter(const std::string &name, const int slot, outMsg.writeInt8(0, "unused"); outMsg.writeInt8(static_cast<int8_t>(hairstyle), "hair style"); if (serverFeatures->haveLookSelection()) - outMsg.writeInt8(look, "look"); + outMsg.writeInt8(static_cast<int8_t>(look), "look"); else outMsg.writeInt8(0, "unused"); if (serverFeatures->haveRaceSelection()) |