summaryrefslogtreecommitdiff
path: root/src/net/tmwa/beinghandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-13 12:20:19 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-13 12:20:19 +0300
commitf0b7627b7d88c1d5bb484961377114b210c8dd53 (patch)
treea978c3b8eca88759fa71b5fc34112f4bea9bbcec /src/net/tmwa/beinghandler.cpp
parentd9be27bba8941260500066cdd43ebb016356bc67 (diff)
downloadmanaplus-f0b7627b7d88c1d5bb484961377114b210c8dd53.tar.gz
manaplus-f0b7627b7d88c1d5bb484961377114b210c8dd53.tar.bz2
manaplus-f0b7627b7d88c1d5bb484961377114b210c8dd53.tar.xz
manaplus-f0b7627b7d88c1d5bb484961377114b210c8dd53.zip
Fix code style.
Diffstat (limited to 'src/net/tmwa/beinghandler.cpp')
-rw-r--r--src/net/tmwa/beinghandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index cf2c50bf7..7a86d2bd9 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -277,7 +277,7 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg,
}
const int type = msg.readInt8();
- int id = 0;
+ int16_t id = 0;
int id2 = 0;
const std::string color;
@@ -312,7 +312,7 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg,
break;
case 1: // eAthena LOOK_HAIR
{
- const uint8_t look = static_cast<uint8_t>(id / 256U);
+ const uint8_t look = static_cast<uint8_t>(id / 256);
const int hair = id % 256;
dstBeing->setHairStyle(SPRITE_HAIR, hair * -1);
dstBeing->setLook(look);
@@ -340,7 +340,7 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg,
player_node->imitateOutfit(dstBeing, SPRITE_TOPCLOTHES);
break;
case 6: // eAthena LOOK_HAIR_COLOR
- dstBeing->setHairColor(SPRITE_HAIR, id);
+ dstBeing->setHairColor(SPRITE_HAIR, static_cast<uint8_t>(id));
break;
case 7: // Clothes color
// ignoring it
@@ -520,7 +520,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
const uint16_t headTop = msg.readInt16();
const uint16_t headMid = msg.readInt16();
- const int hairColor = msg.readInt8();
+ const uint8_t hairColor = msg.readInt8();
msg.readInt8(); // free
unsigned char colors[9];