1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 20:53:50 +00:00

ooops, using search id

This commit is contained in:
Marek Kochanowicz 2014-01-15 11:12:56 +01:00
parent 89d4a90c06
commit fbcb1a14fc

View file

@ -765,18 +765,7 @@ void CSMTools::ReferenceableCheckStage::npcCheck(
} }
else //checking if there is a such race else //checking if there is a such race
{ {
bool noSuchRace(true); if ((!mRaces.searchId(npc.mRace)))
for (int i = 0; i < mRaces.getSize(); ++i)
{
if (Misc::StringUtils::ciEqual(dynamic_cast<const ESM::Race&>(mRaces.getRecord(i).get()).mId, npc.mRace))
{
noSuchRace = false;
break;
}
}
if (noSuchRace)
{ {
messages.push_back(id.toString() + "|" + npc.mId + " has invalid race"); messages.push_back(id.toString() + "|" + npc.mId + " has invalid race");
} }