summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-25 14:46:53 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-25 14:47:37 +0300
commit0f6b7350ad0305d518fb75a8aa07f0616178ede5 (patch)
tree2e12990ad04106660fbe31547480d8976d1215d7 /src/being.cpp
parent5da20a82b1a4d1a4bab77fad0aa73244a53073b1 (diff)
downloadmv-0f6b7350ad0305d518fb75a8aa07f0616178ede5.tar.gz
mv-0f6b7350ad0305d518fb75a8aa07f0616178ede5.tar.bz2
mv-0f6b7350ad0305d518fb75a8aa07f0616178ede5.tar.xz
mv-0f6b7350ad0305d518fb75a8aa07f0616178ede5.zip
fix previous/next race button in char creation dialog.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/being.cpp b/src/being.cpp
index d65686805..1f92030ab 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -171,6 +171,7 @@ class BeingCacheEntry final
int Being::mNumberOfHairstyles = 1;
+int Being::mNumberOfRaces = 1;
int Being::mUpdateConfigTime = 0;
unsigned int Being::mConfLineLim = 0;
@@ -1867,14 +1868,20 @@ void Being::load()
// Hairstyles are encoded as negative numbers. Count how far negative
// we can go.
int hairstyles = 1;
-
while (ItemDB::get(-hairstyles).getSprite(GENDER_MALE, 0) !=
paths.getStringValue("spriteErrorFile"))
{
hairstyles ++;
}
-
mNumberOfHairstyles = hairstyles;
+
+ int races = 100;
+ while (ItemDB::get(-races).getSprite(GENDER_MALE, 0) !=
+ paths.getStringValue("spriteErrorFile"))
+ {
+ races ++;
+ }
+ mNumberOfRaces = races - 100;
}
void Being::updateName()