From 0f6b7350ad0305d518fb75a8aa07f0616178ede5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 25 Dec 2012 14:46:53 +0300 Subject: fix previous/next race button in char creation dialog. --- src/gui/charcreatedialog.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/gui/charcreatedialog.cpp') 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(mRace)); const ItemInfo &item = ItemDB::get(id); -- cgit v1.2.3-60-g2f50