summaryrefslogtreecommitdiff
path: root/src/net/tmwa/charserverhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-03 03:18:21 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-04 03:02:23 +0300
commitebecb0cf42f2066943908fa158ac91527e0e6629 (patch)
tree83dfe4650746e6b31803f7876ab3c0a50179a794 /src/net/tmwa/charserverhandler.cpp
parentfa21c1b65dbe91a1e6ac880db977416162f268df (diff)
downloadmanaverse-ebecb0cf42f2066943908fa158ac91527e0e6629.tar.gz
manaverse-ebecb0cf42f2066943908fa158ac91527e0e6629.tar.bz2
manaverse-ebecb0cf42f2066943908fa158ac91527e0e6629.tar.xz
manaverse-ebecb0cf42f2066943908fa158ac91527e0e6629.zip
Fix hair colors color if old and new hair using different paletes.
Also fix hair replace logic between hairs with different paletes.
Diffstat (limited to 'src/net/tmwa/charserverhandler.cpp')
-rw-r--r--src/net/tmwa/charserverhandler.cpp4
1 files changed, 3 insertions, 1 deletions
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));