|
@@ -94,7 +94,7 @@ namespace LOTRO_DAT {
|
|
|
|
|
|
auto subfiles_number = data.ToNumber<4>(0);
|
|
auto subfiles_number = data.ToNumber<4>(0);
|
|
if (subfiles_number >= 64) {
|
|
if (subfiles_number >= 64) {
|
|
- LOG(ERROR) << "Incorrect directory at offset " << offset_;
|
|
|
|
|
|
+ LOG(ERROR) << "Incorrect directory (subfiles_num >= 64) at offset " << offset_;
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -103,7 +103,7 @@ namespace LOTRO_DAT {
|
|
dat_->ReadData(header, 32, offset_ + 63 * 8 + 4 + 32 * i);
|
|
dat_->ReadData(header, 32, offset_ + 63 * 8 + 4 + 32 * i);
|
|
|
|
|
|
if (header.Empty()) {
|
|
if (header.Empty()) {
|
|
- LOG(ERROR) << "(READ ERROR) Incorrect directory at offset " << offset_;
|
|
|
|
|
|
+ LOG(ERROR) << "(READ ERROR) Incorrect directory (unable to read subfile data) at offset " << offset_;
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -122,12 +122,12 @@ namespace LOTRO_DAT {
|
|
header.ToNumber<4>(28) // unknown2 - must be zero??
|
|
header.ToNumber<4>(28) // unknown2 - must be zero??
|
|
);
|
|
);
|
|
|
|
|
|
- if (dat_->CorrectSubfile(subfile)) {
|
|
|
|
|
|
+// if (dat_->CorrectSubfile(subfile)) {
|
|
subfiles_.emplace_back(subfile);
|
|
subfiles_.emplace_back(subfile);
|
|
- } else {
|
|
|
|
- LOG(WARNING) << "Incorrect Subfile in directory at offset " << offset_ + 63 * 8 + 4 + 32 * i << " (id = " << subfile->file_id() << ");";
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
|
|
+// } else {
|
|
|
|
+// LOG(WARNING) << "Incorrect Subfile in directory at offset " << offset_ + 63 * 8 + 4 + 32 * i << " (id = " << subfile->file_id() << ");";
|
|
|
|
+// break;
|
|
|
|
+// }
|
|
}
|
|
}
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
@@ -137,7 +137,8 @@ namespace LOTRO_DAT {
|
|
if (dict.count(i->file_id() != 0)) {
|
|
if (dict.count(i->file_id() != 0)) {
|
|
LOG(WARNING) << "Found multiple instances of file " << i->file_id() << " at dictionary offset "
|
|
LOG(WARNING) << "Found multiple instances of file " << i->file_id() << " at dictionary offset "
|
|
<< i->dictionary_offset() << ". Base offset = " << dict[i->file_id()]->dictionary_offset();
|
|
<< i->dictionary_offset() << ". Base offset = " << dict[i->file_id()]->dictionary_offset();
|
|
- continue;
|
|
|
|
|
|
+ if (!dat_->CorrectSubfile(i) || dat_->CorrectSubfile(dict[i->file_id_]))
|
|
|
|
+ continue;
|
|
}
|
|
}
|
|
dict[i->file_id()] = i;
|
|
dict[i->file_id()] = i;
|
|
}
|
|
}
|