summaryrefslogtreecommitdiff
path: root/src/gui/charcreatedialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/charcreatedialog.cpp')
-rw-r--r--src/gui/charcreatedialog.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp
index 33806753d..8315bed02 100644
--- a/src/gui/charcreatedialog.cpp
+++ b/src/gui/charcreatedialog.cpp
@@ -538,17 +538,10 @@ void CharCreateDialog::updateRace()
{
int id;
if (mRace < 0)
- {
+ mRace = Being::getNumOfRaces() - 1;
+ else if (mRace >= Being::getNumOfRaces())
mRace = 0;
- id = -100;
- }
- else
- {
- id = -100 - mRace;
- while (id < -100 && !ItemDB::exists(id))
- id ++;
- mRace = -100 - id;
- }
+ id = -100 - mRace;
mPlayer->setSubtype(static_cast<uint16_t>(mRace));
const ItemInfo &item = ItemDB::get(id);