summaryrefslogtreecommitdiff
path: root/src/net/eathena/beinghandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-04 14:44:05 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-04 14:44:05 +0300
commit905bfd0ad38d7101f99f38b00044d9f192cc664d (patch)
tree51a6c2a64c03381ec07d27f30175a497a47836c0 /src/net/eathena/beinghandler.cpp
parent84a3ce662567b6b1e79475442bddb1f29d4bc83c (diff)
downloadplus-905bfd0ad38d7101f99f38b00044d9f192cc664d.tar.gz
plus-905bfd0ad38d7101f99f38b00044d9f192cc664d.tar.bz2
plus-905bfd0ad38d7101f99f38b00044d9f192cc664d.tar.xz
plus-905bfd0ad38d7101f99f38b00044d9f192cc664d.zip
eathena: fix hair color afrer reordering sprites.
Diffstat (limited to 'src/net/eathena/beinghandler.cpp')
-rw-r--r--src/net/eathena/beinghandler.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index fbf3fc78b..f61847022 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -426,7 +426,8 @@ void BeingHandler::processBeingChangeLookContinue(Being *const dstBeing,
dstBeing->getLook());
break;
case 1: // eAthena LOOK_HAIR
- dstBeing->setSpriteID(SPRITE_HAIR_COLOR, id *-1);
+ dstBeing->setHairColor(id);
+ dstBeing->setSpriteID(SPRITE_HAIR_COLOR, id * -1);
break;
case 2: // LOOK_WEAPON Weapon ID in id, Shield ID in id2
dstBeing->setSprite(SPRITE_BODY, id, "", 1, true);
@@ -451,6 +452,7 @@ void BeingHandler::processBeingChangeLookContinue(Being *const dstBeing,
localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_BOTTOM);
break;
case 6: // eAthena LOOK_HAIR_COLOR
+ dstBeing->setHairColor(id);
dstBeing->setSpriteColor(SPRITE_HAIR_COLOR,
ItemDB::get(dstBeing->getSpriteID(
SPRITE_HAIR_COLOR)).getDyeColorsString(id));
@@ -619,6 +621,7 @@ void BeingHandler::processBeingVisible(Net::MessageIn &msg)
if (dstBeing->getType() == ActorType::Player)
{
dstBeing->setGender(Being::intToGender(gender));
+ dstBeing->setHairColor(hairColor);
// Set these after the gender, as the sprites may be gender-specific
setSprite(dstBeing, SPRITE_HAIR_COLOR, hairStyle * -1,
ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
@@ -781,6 +784,7 @@ void BeingHandler::processBeingMove(Net::MessageIn &msg)
if (dstBeing->getType() == ActorType::Player)
{
dstBeing->setGender(Being::intToGender(gender));
+ dstBeing->setHairColor(hairColor);
// Set these after the gender, as the sprites may be gender-specific
setSprite(dstBeing, SPRITE_HAIR_COLOR, hairStyle * -1,
ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
@@ -948,6 +952,7 @@ void BeingHandler::processBeingSpawn(Net::MessageIn &msg)
if (dstBeing->getType() == ActorType::Player)
{
dstBeing->setGender(Being::intToGender(gender));
+ dstBeing->setHairColor(hairColor);
// Set these after the gender, as the sprites may be gender-specific
setSprite(dstBeing, SPRITE_HAIR_COLOR, hairStyle * -1,
ItemDB::get(-hairStyle).getDyeColorsString(hairColor));