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/beinghandler.cpp | |
parent | bc22bc4da27d80627fa966660670219b3652e9ec (diff) | |
download | plus-64309d7a7dc6380d62fa11363073d4243cbfa665.tar.gz plus-64309d7a7dc6380d62fa11363073d4243cbfa665.tar.bz2 plus-64309d7a7dc6380d62fa11363073d4243cbfa665.tar.xz plus-64309d7a7dc6380d62fa11363073d4243cbfa665.zip |
Convert player look variable format from 8 bit to 16 bit.
Diffstat (limited to 'src/net/tmwa/beinghandler.cpp')
-rw-r--r-- | src/net/tmwa/beinghandler.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index 94580279c..05e60b43f 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -333,7 +333,7 @@ void BeingHandler::processBeingChangeLookContinue(Being *const dstBeing, break; case 1: // eAthena LOOK_HAIR { - const uint8_t look = static_cast<uint8_t>(id / 256); + const uint16_t look = static_cast<uint16_t>(id / 256); const int hair = id % 256; dstBeing->setHairStyle(SPRITE_HAIR_COLOR, hair * -1); dstBeing->setLook(look); @@ -410,7 +410,7 @@ void BeingHandler::processBeingChangeLookContinue(Being *const dstBeing, localPlayer->imitateOutfit(dstBeing, SPRITE_EVOL2); break; case 16: - dstBeing->setLook(static_cast<uint8_t>(id)); + dstBeing->setLook(static_cast<uint16_t>(id)); break; default: logger->log("QQQ3 CHANGE_LOOKS: unsupported type: " @@ -482,7 +482,7 @@ void BeingHandler::processPlayerUpdate1(Net::MessageIn &msg) dstBeing->setWalkSpeed(Vector(speed, speed, 0)); const uint8_t hairStyle = msg.readUInt8("hair style"); - const uint8_t look = msg.readUInt8("look"); + const uint16_t look = msg.readUInt8("look"); dstBeing->setSubtype(job, look); const uint16_t weapon = msg.readInt16("weapon"); const uint16_t shield = msg.readInt16("shield"); @@ -635,7 +635,7 @@ void BeingHandler::processPlayerUpdate2(Net::MessageIn &msg) dstBeing->setWalkSpeed(Vector(speed, speed, 0)); const uint8_t hairStyle = msg.readUInt8("hair style"); - const uint8_t look = msg.readUInt8("look"); + const uint16_t look = msg.readUInt8("look"); dstBeing->setSubtype(job, look); const uint16_t weapon = msg.readInt16("weapon"); const uint16_t shield = msg.readInt16("shield"); @@ -784,7 +784,7 @@ void BeingHandler::processPlayerMove(Net::MessageIn &msg) dstBeing->setWalkSpeed(Vector(speed, speed, 0)); const uint8_t hairStyle = msg.readUInt8("hair style"); - const uint8_t look = msg.readUInt8("look"); + const uint16_t look = msg.readUInt8("look"); dstBeing->setSubtype(job, look); const uint16_t weapon = msg.readInt16("weapon"); const uint16_t shield = msg.readInt16("shield"); @@ -995,7 +995,7 @@ void BeingHandler::processBeingVisible(Net::MessageIn &msg) speed = 150; const uint8_t hairStyle = msg.readUInt8("hair style"); - const uint8_t look = msg.readUInt8("look"); + const uint16_t look = msg.readUInt8("look"); dstBeing->setSubtype(job, look); if (dstBeing->getType() == ActorType::Monster && localPlayer) localPlayer->checkNewName(dstBeing); @@ -1198,7 +1198,7 @@ void BeingHandler::processBeingMove(Net::MessageIn &msg) speed = 150; const uint8_t hairStyle = msg.readUInt8("hair style"); - const uint8_t look = msg.readUInt8("look"); + const uint16_t look = msg.readUInt8("look"); dstBeing->setSubtype(job, look); if (dstBeing->getType() == ActorType::Monster && localPlayer) localPlayer->checkNewName(dstBeing); |