1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00

correcting

This commit is contained in:
Marek Kochanowicz 2013-12-30 18:41:16 +01:00
parent 3758fe3834
commit 4a1987ddec
3 changed files with 74 additions and 94 deletions

View File

@ -945,18 +945,7 @@ void CSMTools::ReferenceableCheckStage::npcCheck(int stage, const CSMWorld::RefI
}
else //checking if there is such class
{
bool nosuchclass(true);
for (int i = 0; i < mClasses.getSize(); ++i)
{
if (dynamic_cast<const ESM::Class&>(mClasses.getRecord(i).get()).mId == NPC.mClass)
{
nosuchclass = false;
break;
}
}
if (nosuchclass)
if (mClasses.searchId(NPC.mClass))
{
messages.push_back(id.toString() + "|" + NPC.mId + " has invalid class");
}
@ -1002,18 +991,7 @@ void CSMTools::ReferenceableCheckStage::npcCheck(int stage, const CSMWorld::RefI
messages.push_back(id.toString() + "|" + NPC.mId + " has negative rank");
}
bool nosuchfaction(true);
for (int i = 0; i < mFactions.getSize(); ++i)
{
if (dynamic_cast<const ESM::Faction&>(mFactions.getRecord(i).get()).mId == NPC.mFaction)
{
nosuchfaction = false;
break;
}
}
if (nosuchfaction)
if (mFactions.searchId(NPC.mFaction) == -1)
{
messages.push_back(id.toString() + "|" + NPC.mId + " has invalid faction");
}
@ -1026,7 +1004,7 @@ void CSMTools::ReferenceableCheckStage::npcCheck(int stage, const CSMWorld::RefI
if (NPC.mHair.empty())
{
messages.push_back(id.toString() + "|" + NPC.mId + " has no har");
messages.push_back(id.toString() + "|" + NPC.mId + " has no hair");
}
//TODO: reputation, Disposition, rank, everything else

View File

@ -142,3 +142,4 @@ void CSMTools::Tools::verifierMessage(const QString& message, int type)
if (iter!=mActiveReports.end())
mReports[iter->second]->add (message.toStdString());
}

View File

@ -113,3 +113,4 @@ namespace CSMWorld
}
#endif