summaryrefslogtreecommitdiff
path: root/src/gui/windows/charcreatedialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-09 20:44:02 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-09 20:44:02 +0300
commit7c6f3d5a9cc4e83520dc8c2ac75ec987e730d381 (patch)
treeb98490a46cb376fe4ae2237489be13619451ef1a /src/gui/windows/charcreatedialog.cpp
parent0255911fce07d79d29684f9837f96a4c824f4040 (diff)
downloadplus-7c6f3d5a9cc4e83520dc8c2ac75ec987e730d381.tar.gz
plus-7c6f3d5a9cc4e83520dc8c2ac75ec987e730d381.tar.bz2
plus-7c6f3d5a9cc4e83520dc8c2ac75ec987e730d381.tar.xz
plus-7c6f3d5a9cc4e83520dc8c2ac75ec987e730d381.zip
Add min/max race into charcreation.xml.
Diffstat (limited to 'src/gui/windows/charcreatedialog.cpp')
-rw-r--r--src/gui/windows/charcreatedialog.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index 64346eabe..fe22b0317 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -130,10 +130,12 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
mGenderStrip(nullptr),
mMaxPoints(0),
mUsedPoints(0),
- mRace(0),
+ mRace(CharDB::getMinRace()),
mLook(0),
mMinLook(CharDB::getMinLook()),
mMaxLook(CharDB::getMaxLook()),
+ mMinRace(CharDB::getMinRace()),
+ mMaxRace(CharDB::getMaxRace()),
mHairStyle(0),
mHairColor(0),
mSlot(slot),
@@ -619,10 +621,10 @@ void CharCreateDialog::updateHair()
void CharCreateDialog::updateRace()
{
- if (mRace < 0)
- mRace = Being::getNumOfRaces() - 1;
- else if (mRace >= Being::getNumOfRaces())
- mRace = 0;
+ if (mRace < mMinRace)
+ mRace = mMaxRace;
+ else if (mRace > mMaxRace)
+ mRace = mMinRace;
updateLook();
}