summaryrefslogtreecommitdiff
path: root/src/net/eathena/beinghandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/beinghandler.cpp')
-rw-r--r--src/net/eathena/beinghandler.cpp31
1 files changed, 21 insertions, 10 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index 71a098510..633dfff56 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -438,6 +438,9 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
statusEffects |= (static_cast<uint32_t>(msg.readInt16()))
<< 16; // status.options; Aethyra uses this as misc2
const int16_t job = msg.readInt16();
+ int disguiseId = 0;
+ if (id < 110000000 && job >= 1000)
+ disguiseId = job;
Being *dstBeing = actorSpriteManager->findBeing(id);
@@ -451,6 +454,12 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
if (!dstBeing)
return;
}
+ else if (disguiseId)
+ {
+ actorSpriteManager->undelete(dstBeing);
+ if (serverVersion < 1)
+ requestNameById(id);
+ }
uint8_t dir = dstBeing->getDirectionDelayed();
if (dir)
@@ -502,16 +511,18 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
// reserving bit for future usage
dstBeing->setGender(Being::intToGender(msg.readInt8() & 3));
- // Set these after the gender, as the sprites may be gender-specific
- dstBeing->setSprite(SPRITE_WEAPON, weapon, "", 1, true);
- if (!mHideShield)
- dstBeing->setSprite(SPRITE_SHIELD, shield);
- dstBeing->setSprite(SPRITE_BOTTOMCLOTHES, headBottom);
- dstBeing->setSprite(SPRITE_TOPCLOTHES, headMid);
- dstBeing->setSprite(SPRITE_HAT, headTop);
- dstBeing->setSprite(SPRITE_HAIR, hairStyle * -1,
- ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
-
+ if (!disguiseId)
+ {
+ // Set these after the gender, as the sprites may be gender-specific
+ dstBeing->setSprite(SPRITE_WEAPON, weapon, "", 1, true);
+ if (!mHideShield)
+ dstBeing->setSprite(SPRITE_SHIELD, shield);
+ dstBeing->setSprite(SPRITE_BOTTOMCLOTHES, headBottom);
+ dstBeing->setSprite(SPRITE_TOPCLOTHES, headMid);
+ dstBeing->setSprite(SPRITE_HAT, headTop);
+ dstBeing->setSprite(SPRITE_HAIR, hairStyle * -1,
+ ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
+ }
player_node->imitateOutfit(dstBeing);
if (msgType == 3)