|
@@ -29,11 +29,11 @@ namespace LOTRO_DAT {
|
|
|
root_directory_(nullptr), actual_dat_size_(0) {
|
|
|
}
|
|
|
|
|
|
+
|
|
|
//------------------------------------------------//
|
|
|
// INIT SECTION
|
|
|
//------------------------------------------------//
|
|
|
|
|
|
-
|
|
|
DatOperationResult DatFileIO::Init(const std::string &filename) {
|
|
|
LOG(INFO) << "Initializing IO: " << filename;
|
|
|
|
|
@@ -205,13 +205,12 @@ namespace LOTRO_DAT {
|
|
|
return DatOperationResult(DatOperationResult::SUCCESS, "Data writing successful.");
|
|
|
}
|
|
|
|
|
|
+
|
|
|
//------------------------------------------------//
|
|
|
// DEINIT SECTION
|
|
|
//------------------------------------------------//
|
|
|
|
|
|
DatOperationResult DatFileIO::DeInit() {
|
|
|
- UpdateHeader();
|
|
|
-
|
|
|
if (file_handler_ != nullptr) {
|
|
|
fclose(file_handler_);
|
|
|
}
|
|
@@ -233,7 +232,6 @@ namespace LOTRO_DAT {
|
|
|
return DatOperationResult(DatOperationResult::SUCCESS, "File deinitialisation successfull");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
DatOperationResult DatFileIO::ModifyFragmentationJournal() {
|
|
|
if (fragmentation_journal_size == 0)
|
|
|
return DatOperationResult(DatOperationResult::SUCCESS,
|
|
@@ -261,7 +259,6 @@ namespace LOTRO_DAT {
|
|
|
return DatOperationResult(DatOperationResult::SUCCESS, "Fragmentation journal patched successfully!");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
DatOperationResult DatFileIO::UpdateHeader() {
|
|
|
LOG(DEBUG) << "Updating header";
|
|
|
WriteData(BinaryData::FromNumber<4>(constant1), 4, 0x100);
|