summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/beinghandler.cpp6
-rw-r--r--src/net/tmwa/charserverhandler.cpp4
2 files changed, 6 insertions, 4 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 2eac3c4a2..f816c9e04 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -299,7 +299,7 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg, bool look2)
dstBeing->setSubtype(static_cast<uint16_t>(id));
break;
case 1: // eAthena LOOK_HAIR
- dstBeing->setSpriteID(SPRITE_HAIR, id *-1);
+ dstBeing->setHairStyle(SPRITE_HAIR, id * -1);
break;
case 2: // Weapon ID in id, Shield ID in id2
dstBeing->setSprite(SPRITE_WEAPON, id, "", 1, true);
@@ -323,8 +323,7 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg, bool look2)
player_node->imitateOutfit(dstBeing, SPRITE_TOPCLOTHES);
break;
case 6: // eAthena LOOK_HAIR_COLOR
- dstBeing->setSpriteColor(SPRITE_HAIR, ItemDB::get(
- dstBeing->getSpriteID(SPRITE_HAIR)).getDyeColorsString(id));
+ dstBeing->setHairColor(SPRITE_HAIR, id);
break;
case 7: // Clothes color
// ignoring it
@@ -541,6 +540,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg, int msgType)
//dstBeing->setSprite(SPRITE_MISC2, misc2);
dstBeing->setSprite(SPRITE_HAIR, hairStyle * -1,
ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
+ dstBeing->setHairColor(hairColor);
player_node->imitateOutfit(dstBeing);
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index 235028f71..4261887fb 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -215,8 +215,10 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg,
const int hat = msg.readInt16(); // head option top
const int topClothes = msg.readInt16();
+ const int hairColor = msg.readInt16();
tempPlayer->setSprite(SPRITE_HAIR, hairStyle * -1,
- ItemDB::get(-hairStyle).getDyeColorsString(msg.readInt16()));
+ ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
+ tempPlayer->setHairColor(hairColor);
const int misc2 = msg.readInt16();
tempPlayer->setName(msg.readString(24));