|
|
|
@ -33,13 +33,10 @@ void CSMTools::BodyPartCheckStage::perform (int stage, CSMDoc::Messages &message
|
|
|
|
|
CSMWorld::UniversalId id( CSMWorld::UniversalId::Type_BodyPart, bodyPart.mId );
|
|
|
|
|
|
|
|
|
|
// Check BYDT
|
|
|
|
|
if (bodyPart.mData.mPart > 14 )
|
|
|
|
|
if (bodyPart.mData.mPart >= ESM::BodyPart::MP_Count )
|
|
|
|
|
messages.add(id, "Invalid part", "", CSMDoc::Message::Severity_Error);
|
|
|
|
|
|
|
|
|
|
if (bodyPart.mData.mFlags > 3 )
|
|
|
|
|
messages.add(id, "Invalid flags", "", CSMDoc::Message::Severity_Error);
|
|
|
|
|
|
|
|
|
|
if (bodyPart.mData.mType > 2 )
|
|
|
|
|
if (bodyPart.mData.mType > ESM::BodyPart::MT_Armor )
|
|
|
|
|
messages.add(id, "Invalid type", "", CSMDoc::Message::Severity_Error);
|
|
|
|
|
|
|
|
|
|
// Check MODL
|
|
|
|
@ -48,9 +45,12 @@ void CSMTools::BodyPartCheckStage::perform (int stage, CSMDoc::Messages &message
|
|
|
|
|
else if ( mMeshes.searchId( bodyPart.mModel ) == -1 )
|
|
|
|
|
messages.add(id, "Model '" + bodyPart.mModel + "' does not exist", "", CSMDoc::Message::Severity_Error);
|
|
|
|
|
|
|
|
|
|
// Check FNAM
|
|
|
|
|
if ( bodyPart.mRace.empty() )
|
|
|
|
|
messages.add(id, "Race is missing", "", CSMDoc::Message::Severity_Error);
|
|
|
|
|
else if ( mRaces.searchId( bodyPart.mRace ) == -1 )
|
|
|
|
|
messages.add(id, "Race '" + bodyPart.mRace + "' does not exist", "", CSMDoc::Message::Severity_Error);
|
|
|
|
|
// Check FNAM for skin body parts (for non-skin body parts it's meaningless)
|
|
|
|
|
if ( bodyPart.mData.mType == ESM::BodyPart::MT_Skin )
|
|
|
|
|
{
|
|
|
|
|
if ( bodyPart.mRace.empty() )
|
|
|
|
|
messages.add(id, "Race is missing", "", CSMDoc::Message::Severity_Error);
|
|
|
|
|
else if ( mRaces.searchId( bodyPart.mRace ) == -1 )
|
|
|
|
|
messages.add(id, "Race '" + bodyPart.mRace + "' does not exist", "", CSMDoc::Message::Severity_Error);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|