check if adt exists on UID check

This commit is contained in:
T1ti
2025-01-24 23:09:11 +01:00
parent 128b58ca08
commit 3977e60c64

View File

@@ -1040,6 +1040,13 @@ void MapIndex::searchMaxUID()
std::stringstream filename; std::stringstream filename;
filename << "World\\Maps\\" << basename << "\\" << basename << "_" << x << "_" << z << ".adt"; filename << "World\\Maps\\" << basename << "\\" << basename << "_" << x << "_" << z << ".adt";
if (!Noggit::Application::NoggitApplication::instance()->clientData()->exists(filename.str()))
{
LogError << "searchMaxUID(): ADT(" << x << "_" << z << ") referenced by WDT does not exist. Skipping." << std::endl;
continue;
}
highestGUID = std::max(highestGUID, getHighestGUIDFromFile(filename.str())); highestGUID = std::max(highestGUID, getHighestGUIDFromFile(filename.str()));
} }
} }