mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core: Updated to 10.2.6.53840
This commit is contained in:
@@ -2076,19 +2076,23 @@ void DB2FileLoader::Load(DB2FileSource* source, DB2FileLoadInfo const* loadInfo)
|
||||
if (loadInfo)
|
||||
{
|
||||
uint32 fieldIndex = 0;
|
||||
std::string signValidationResult;
|
||||
if (!loadInfo->Meta->HasIndexFieldInData())
|
||||
{
|
||||
ASSERT(!loadInfo->Fields[0].IsSigned, "ID must be unsigned in %s", source->GetFileName());
|
||||
if (loadInfo->Fields[0].IsSigned)
|
||||
signValidationResult += Trinity::StringFormat("ID must be unsigned in {}", source->GetFileName());
|
||||
++fieldIndex;
|
||||
}
|
||||
for (uint32 f = 0; f < loadInfo->Meta->FieldCount; ++f)
|
||||
{
|
||||
ASSERT(loadInfo->Fields[fieldIndex].IsSigned == _impl->IsSignedField(f),
|
||||
"Field %s in %s must be %s%s", loadInfo->Fields[fieldIndex].Name, source->GetFileName(), _impl->IsSignedField(f) ? "signed" : "unsigned",
|
||||
_impl->GetExpectedSignMismatchReason(f));
|
||||
if (loadInfo->Fields[fieldIndex].IsSigned != _impl->IsSignedField(f))
|
||||
signValidationResult += Trinity::StringFormat("Field {} in {} must be {}{}", loadInfo->Fields[fieldIndex].Name,
|
||||
source->GetFileName(), _impl->IsSignedField(f) ? "signed" : "unsigned", _impl->GetExpectedSignMismatchReason(f));
|
||||
|
||||
fieldIndex += loadInfo->Meta->Fields[f].ArraySize;
|
||||
}
|
||||
if (!signValidationResult.empty())
|
||||
throw DB2FileLoadException(std::move(signValidationResult));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user