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/gui | |
parent | 582428edf9e40db0d1ed7b78222562a7a5031fe4 (diff) | |
download | mv-22f79fd0d623c8e11994905534f53da267e22935.tar.gz mv-22f79fd0d623c8e11994905534f53da267e22935.tar.bz2 mv-22f79fd0d623c8e11994905534f53da267e22935.tar.xz mv-22f79fd0d623c8e11994905534f53da267e22935.zip |
Dehardcode item colors. Now reading all from configs.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/charcreatedialog.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp index dff591dd9..ae4401572 100644 --- a/src/gui/charcreatedialog.cpp +++ b/src/gui/charcreatedialog.cpp @@ -58,7 +58,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *parent, int slot): mPlayer = new Being(0, ActorSprite::PLAYER, 0, NULL); mPlayer->setGender(GENDER_MALE); - int numberOfHairColors = ColorDB::size(); + int numberOfHairColors = ColorDB::getHairSize(); mHairStyle = rand() % mPlayer->getNumOfHairstyles(); mHairColor = rand() % numberOfHairColors; @@ -364,10 +364,10 @@ void CharCreateDialog::updateHair() if (mHairStyle < 0) mHairStyle += Being::getNumOfHairstyles(); - mHairColor %= ColorDB::size(); + mHairColor %= ColorDB::getHairSize(); if (mHairColor < 0) - mHairColor += ColorDB::size(); + mHairColor += ColorDB::getHairSize(); mPlayer->setSprite(Net::getCharHandler()->hairSprite(), - mHairStyle * -1, ColorDB::get(mHairColor)); + mHairStyle * -1, ColorDB::getHairColor(mHairColor)); } |