From cf2a41b8a691e3ecfeef8289cb0a21989ceac882 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 20 Jun 2015 18:18:03 +0300 Subject: Remove from tmwa namespace checks for haveItemColors. --- src/net/tmwa/beinghandler.cpp | 53 ++++++++----------------------------------- 1 file changed, 10 insertions(+), 43 deletions(-) (limited to 'src/net/tmwa/beinghandler.cpp') diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index 95eb9c111..f5ebfd2f7 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -293,7 +293,7 @@ void BeingHandler::processBeingChangeLook2(Net::MessageIn &msg) int id2 = 0; const int16_t id = msg.readInt16("id1"); - if (type == 2 || serverFeatures->haveItemColors()) + if (type == 2) { id2 = msg.readInt16("id2"); } @@ -514,20 +514,9 @@ void BeingHandler::processPlayerUpdate1(Net::MessageIn &msg) // Set these after the gender, as the sprites may be gender-specific dstBeing->updateSprite(SPRITE_BODY, weapon, "", 1, true); dstBeing->updateSprite(SPRITE_FLOOR, shield); - if (serverFeatures->haveItemColors()) - { - dstBeing->updateSprite(SPRITE_WEAPON, headBottom, - "", colors[0]); - dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid, "", colors[2]); - dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, - "", colors[1]); - } - else - { - dstBeing->updateSprite(SPRITE_WEAPON, headBottom); - dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid); - dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop); - } + dstBeing->updateSprite(SPRITE_WEAPON, headBottom); + dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid); + dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop); dstBeing->updateSprite(SPRITE_HAIR_COLOR, hairStyle * -1, ItemDB::get(-hairStyle).getDyeColorsString(hairColor)); dstBeing->setHairColor(hairColor); @@ -665,20 +654,9 @@ void BeingHandler::processPlayerUpdate2(Net::MessageIn &msg) // Set these after the gender, as the sprites may be gender-specific dstBeing->updateSprite(SPRITE_BODY, weapon, "", 1, true); dstBeing->updateSprite(SPRITE_FLOOR, shield); - if (serverFeatures->haveItemColors()) - { - dstBeing->updateSprite(SPRITE_WEAPON, headBottom, - "", colors[0]); - dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid, "", colors[2]); - dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, - "", colors[1]); - } - else - { - dstBeing->updateSprite(SPRITE_WEAPON, headBottom); - dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid); - dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop); - } + dstBeing->updateSprite(SPRITE_WEAPON, headBottom); + dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid); + dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop); dstBeing->updateSprite(SPRITE_HAIR_COLOR, hairStyle * -1, ItemDB::get(-hairStyle).getDyeColorsString(hairColor)); dstBeing->setHairColor(hairColor); @@ -816,20 +794,9 @@ void BeingHandler::processPlayerMove(Net::MessageIn &msg) // Set these after the gender, as the sprites may be gender-specific dstBeing->updateSprite(SPRITE_BODY, weapon, "", 1, true); dstBeing->updateSprite(SPRITE_FLOOR, shield); - if (serverFeatures->haveItemColors()) - { - dstBeing->updateSprite(SPRITE_WEAPON, headBottom, - "", colors[0]); - dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid, "", colors[2]); - dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, - "", colors[1]); - } - else - { - dstBeing->updateSprite(SPRITE_WEAPON, headBottom); - dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid); - dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop); - } + dstBeing->updateSprite(SPRITE_WEAPON, headBottom); + dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid); + dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop); dstBeing->updateSprite(SPRITE_HAIR_COLOR, hairStyle * -1, ItemDB::get(-hairStyle).getDyeColorsString(hairColor)); dstBeing->setHairColor(hairColor); -- cgit v1.2.3-70-g09d2