|
@@ -466,12 +466,15 @@ namespace LOTRO_DAT {
|
|
|
return;
|
|
|
}
|
|
|
if (current_locale() != PATCHED) {
|
|
|
- std::cout << "Changing locale to RU in order to patch file";
|
|
|
+ std::cout << "Changing locale to RU in order to patch file" << std::endl;
|
|
|
SetLocale(PATCHED);
|
|
|
}
|
|
|
dat_state_ = UPDATED;
|
|
|
|
|
|
auto journal = GetFragmentationJournal();
|
|
|
+ if (journal[0].second != file_size_) {
|
|
|
+ journal[0].second = file_size_;
|
|
|
+ }
|
|
|
|
|
|
file->file_size_ = data.size() - 8;
|
|
|
|
|
@@ -562,6 +565,15 @@ namespace LOTRO_DAT {
|
|
|
if (dat_state_ != UPDATED)
|
|
|
return;
|
|
|
std::cout << "There are some updated files. Rewriting dictionary..." << std::endl << std::flush;
|
|
|
+
|
|
|
+ auto journal = GetFragmentationJournal();
|
|
|
+ journal[0].second = file_size_;
|
|
|
+ BinaryData nulls(size_t(journal[0].first));
|
|
|
+ WriteData(nulls, nulls.size(), file_size_);
|
|
|
+ file_size_ += journal[0].first;
|
|
|
+ UpdateFragmentationJournal(journal);
|
|
|
+ std::cout << "Updated fragmentation journal..." << std::endl << std::flush;
|
|
|
+
|
|
|
UpdateHeader();
|
|
|
std::cout << "Updated header..." << std::endl << std::flush;
|
|
|
UpdateSubdirectories();
|