diff options
Diffstat (limited to 'src/net/tmwa')
-rw-r--r-- | src/net/tmwa/beingrecv.cpp | 50 |
1 files changed, 18 insertions, 32 deletions
diff --git a/src/net/tmwa/beingrecv.cpp b/src/net/tmwa/beingrecv.cpp index 78d40dc1d..a489d4179 100644 --- a/src/net/tmwa/beingrecv.cpp +++ b/src/net/tmwa/beingrecv.cpp @@ -837,30 +837,23 @@ void BeingRecv::processBeingVisible(Net::MessageIn &msg) // Set these after the gender, as the sprites may be gender-specific if (hairStyle == 0) { - Ea::BeingRecv::setSprite(dstBeing, - SPRITE_HAIR_COLOR, - 0, - std::string()); + dstBeing->updateSprite(SPRITE_HAIR_COLOR, 0); } else { - Ea::BeingRecv::setSprite(dstBeing, - SPRITE_HAIR_COLOR, + dstBeing->updateSprite(SPRITE_HAIR_COLOR, hairStyle * -1, ItemDB::get(-hairStyle).getDyeColorsString(hairColor)); } dstBeing->setHairColor(hairColor); - Ea::BeingRecv::setSprite(dstBeing, SPRITE_WEAPON, headBottom); - Ea::BeingRecv::setSprite(dstBeing, SPRITE_HEAD_BOTTOM, headMid); - Ea::BeingRecv::setSprite(dstBeing, SPRITE_CLOTHES_COLOR, headTop); - Ea::BeingRecv::setSprite(dstBeing, SPRITE_HAIR, shoes); - Ea::BeingRecv::setSprite(dstBeing, SPRITE_SHOES, gloves); - Ea::BeingRecv::setSprite(dstBeing, - SPRITE_BODY, - weapon, - std::string()); + dstBeing->updateSprite(SPRITE_WEAPON, headBottom); + dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid); + dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop); + dstBeing->updateSprite(SPRITE_HAIR, shoes); + dstBeing->updateSprite(SPRITE_SHOES, gloves); + dstBeing->updateSprite(SPRITE_BODY, weapon); dstBeing->setWeaponId(weapon); - Ea::BeingRecv::setSprite(dstBeing, SPRITE_FLOOR, shield); + dstBeing->updateSprite(SPRITE_FLOOR, shield); } else if (dstBeing->getType() == ActorType::Npc && serverFeatures->haveNpcGender()) @@ -1053,30 +1046,23 @@ void BeingRecv::processBeingMove(Net::MessageIn &msg) // Set these after the gender, as the sprites may be gender-specific if (hairStyle == 0) { - Ea::BeingRecv::setSprite(dstBeing, - SPRITE_HAIR_COLOR, - 0, - std::string()); + dstBeing->updateSprite(SPRITE_HAIR_COLOR, 0); } else { - Ea::BeingRecv::setSprite(dstBeing, - SPRITE_HAIR_COLOR, + dstBeing->updateSprite(SPRITE_HAIR_COLOR, hairStyle * -1, ItemDB::get(-hairStyle).getDyeColorsString(hairColor)); } dstBeing->setHairColor(hairColor); - Ea::BeingRecv::setSprite(dstBeing, SPRITE_WEAPON, headBottom); - Ea::BeingRecv::setSprite(dstBeing, SPRITE_HEAD_BOTTOM, headMid); - Ea::BeingRecv::setSprite(dstBeing, SPRITE_CLOTHES_COLOR, headTop); - Ea::BeingRecv::setSprite(dstBeing, SPRITE_HAIR, shoes); - Ea::BeingRecv::setSprite(dstBeing, SPRITE_SHOES, gloves); - Ea::BeingRecv::setSprite(dstBeing, - SPRITE_BODY, - weapon, - std::string()); + dstBeing->updateSprite(SPRITE_WEAPON, headBottom); + dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid); + dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop); + dstBeing->updateSprite(SPRITE_HAIR, shoes); + dstBeing->updateSprite(SPRITE_SHOES, gloves); + dstBeing->updateSprite(SPRITE_BODY, weapon); dstBeing->setWeaponId(weapon); - Ea::BeingRecv::setSprite(dstBeing, SPRITE_FLOOR, shield); + dstBeing->updateSprite(SPRITE_FLOOR, shield); } else if (dstBeing->getType() == ActorType::Npc && serverFeatures->haveNpcGender()) |