From f5de9ae444f1bca1f6ba6969214e9a8cacb15f68 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Wed, 18 Jan 2012 19:20:34 +0100 Subject: Fix to the hair colors and styles handling. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - I made the charCreatedialog handle a possible max permitted color Id and a minimum hair style id for tA. - Added a foundation to later load the styles and colors from the same file, to handle the Mana-issue #224 for manaserv. - Support for non-contiguous hair color and style ids has also been added. - I also replaced the < and > arrow signs with images. Reviewed-by: Ben Longbons, Thorbjørn Lindeijer --- src/net/manaserv/beinghandler.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/net/manaserv/beinghandler.cpp') diff --git a/src/net/manaserv/beinghandler.cpp b/src/net/manaserv/beinghandler.cpp index be4daa49..fb3a3644 100644 --- a/src/net/manaserv/beinghandler.cpp +++ b/src/net/manaserv/beinghandler.cpp @@ -144,7 +144,8 @@ void BeingHandler::handleBeingEnterMessage(Net::MessageIn &msg) being->setName(name); } int hs = msg.readInt8(), hc = msg.readInt8(); - being->setSprite(SPRITE_LAYER_HAIR, hs * -1, HairDB::get(hc)); + being->setSprite(SPRITE_LAYER_HAIR, hs * -1, + hairDB.getHairColor(hc)); being->setGender(msg.readInt8() == ManaServ::GENDER_MALE ? ::GENDER_MALE : ::GENDER_FEMALE); handleLooks(being, msg); @@ -334,7 +335,8 @@ void BeingHandler::handleBeingLooksChangeMessage(Net::MessageIn &msg) { int style = msg.readInt16(); int color = msg.readInt16(); - being->setSprite(SPRITE_LAYER_HAIR, style * -1, HairDB::get(color)); + being->setSprite(SPRITE_LAYER_HAIR, style * -1, + hairDB.getHairColor(color)); } } -- cgit v1.2.3-70-g09d2