summaryrefslogtreecommitdiff
path: root/src/net/tmwa/beinghandler.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/beinghandler.cpp
parentfa21c1b65dbe91a1e6ac880db977416162f268df (diff)
downloadmanaplus-ebecb0cf42f2066943908fa158ac91527e0e6629.tar.gz
manaplus-ebecb0cf42f2066943908fa158ac91527e0e6629.tar.bz2
manaplus-ebecb0cf42f2066943908fa158ac91527e0e6629.tar.xz
manaplus-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/beinghandler.cpp')
-rw-r--r--src/net/tmwa/beinghandler.cpp6
1 files changed, 3 insertions, 3 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);