diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-03 01:25:21 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-03 01:25:21 +0200 |
commit | 22f79fd0d623c8e11994905534f53da267e22935 (patch) | |
tree | 04403929ca80f47253f8dd523a29489c0fd30162 /src/net | |
parent | 582428edf9e40db0d1ed7b78222562a7a5031fe4 (diff) | |
download | plus-22f79fd0d623c8e11994905534f53da267e22935.tar.gz plus-22f79fd0d623c8e11994905534f53da267e22935.tar.bz2 plus-22f79fd0d623c8e11994905534f53da267e22935.tar.xz plus-22f79fd0d623c8e11994905534f53da267e22935.zip |
Dehardcode item colors. Now reading all from configs.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/manaserv/beinghandler.cpp | 4 | ||||
-rw-r--r-- | src/net/manaserv/charhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/beinghandler.cpp | 6 | ||||
-rw-r--r-- | src/net/tmwa/charserverhandler.cpp | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/net/manaserv/beinghandler.cpp b/src/net/manaserv/beinghandler.cpp index 8ba2e5967..b726bc52e 100644 --- a/src/net/manaserv/beinghandler.cpp +++ b/src/net/manaserv/beinghandler.cpp @@ -185,7 +185,7 @@ void BeingHandler::handleBeingEnterMessage(Net::MessageIn &msg) being->setName(name); } int hs = msg.readInt8(), hc = msg.readInt8(); - being->setSprite(SPRITE_HAIR, hs * -1, ColorDB::get(hc)); + being->setSprite(SPRITE_HAIR, hs * -1, ColorDB::getHairColor(hc)); being->setGender(msg.readInt8() == GENDER_MALE ? GENDER_MALE : GENDER_FEMALE); handleLooks(being, msg); @@ -350,7 +350,7 @@ void BeingHandler::handleBeingLooksChangeMessage(Net::MessageIn &msg) { int style = msg.readInt16(); int color = msg.readInt16(); - being->setSprite(SPRITE_HAIR, style * -1, ColorDB::get(color)); + being->setSprite(SPRITE_HAIR, style * -1, ColorDB::getHairColor(color)); } } diff --git a/src/net/manaserv/charhandler.cpp b/src/net/manaserv/charhandler.cpp index 20dda5b70..163aad988 100644 --- a/src/net/manaserv/charhandler.cpp +++ b/src/net/manaserv/charhandler.cpp @@ -377,7 +377,7 @@ void CharHandler::updateCharacters() player->setName(info.name); player->setGender(info.gender); player->setSprite(SPRITE_HAIR, info.hairStyle * -1, - ColorDB::get(info.hairColor)); + ColorDB::getHairColor(info.hairColor)); character->data.mAttributes[LEVEL] = info.level; character->data.mAttributes[CHAR_POINTS] = info.characterPoints; character->data.mAttributes[CORR_POINTS] = info.correctionPoints; diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index 0548a2715..b1c173df6 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -290,7 +290,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) ? GENDER_FEMALE : GENDER_MALE); // Set these after the gender, as the sprites may be gender-specific dstBeing->setSprite(SPRITE_HAIR, hairStyle * -1, - ColorDB::get(hairColor)); + ColorDB::getHairColor(hairColor)); dstBeing->setSprite(SPRITE_BOTTOMCLOTHES, headBottom); dstBeing->setSprite(SPRITE_TOPCLOTHES, headMid); dstBeing->setSprite(SPRITE_HAT, headTop); @@ -671,7 +671,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) player_node->imitateOutfit(dstBeing, SPRITE_TOPCLOTHES); break; case 6: // eAthena LOOK_HAIR_COLOR - dstBeing->setSpriteColor(SPRITE_HAIR, ColorDB::get(id)); + dstBeing->setSpriteColor(SPRITE_HAIR, ColorDB::getHairColor(id)); break; case 8: // eAthena LOOK_SHIELD if (!config.getBoolValue("hideShield")) @@ -927,7 +927,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) //dstBeing->setSprite(SPRITE_MISC1, misc1); //dstBeing->setSprite(SPRITE_MISC2, misc2); dstBeing->setSprite(SPRITE_HAIR, hairStyle * -1, - ColorDB::get(hairColor)); + ColorDB::getHairColor(hairColor)); player_node->imitateOutfit(dstBeing); diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index 35cca6f07..daf531f04 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -309,7 +309,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, int topClothes = msg.readInt16(); tempPlayer->setSprite(SPRITE_HAIR, hairStyle * -1, - ColorDB::get(msg.readInt16())); + ColorDB::getHairColor(msg.readInt16())); int misc2 = msg.readInt16(); tempPlayer->setName(msg.readString(24)); |