|
|
|
@ -940,19 +940,16 @@ namespace MWWorld
|
|
|
|
|
|
|
|
|
|
if (Misc::StringUtils::ciEqual(record.mId, "player"))
|
|
|
|
|
{
|
|
|
|
|
static const char *sRaces[] =
|
|
|
|
|
{
|
|
|
|
|
"Argonian", "Breton", "Dark Elf", "High Elf", "Imperial", "Khajiit", "Nord", "Orc", "Redguard",
|
|
|
|
|
"Woodelf", 0
|
|
|
|
|
};
|
|
|
|
|
std::vector<std::string> ids;
|
|
|
|
|
getStore().get<ESM::Race>().listIdentifier(ids);
|
|
|
|
|
|
|
|
|
|
int i=0;
|
|
|
|
|
unsigned int i=0;
|
|
|
|
|
|
|
|
|
|
for (; sRaces[i]; ++i)
|
|
|
|
|
if (Misc::StringUtils::ciEqual (sRaces[i], record.mRace))
|
|
|
|
|
for (; i<ids.size(); ++i)
|
|
|
|
|
if (Misc::StringUtils::ciEqual (ids[i], record.mRace))
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
mGlobalVariables->setInt ("pcrace", sRaces[i] ? i+1 : 0);
|
|
|
|
|
mGlobalVariables->setInt ("pcrace", (i == ids.size()) ? 0 : i+1);
|
|
|
|
|
|
|
|
|
|
const ESM::NPC *player =
|
|
|
|
|
mPlayer->getPlayer().get<ESM::NPC>()->mBase;
|
|
|
|
|