Forráskód Böngészése

Minor improvements. Original locale dictionary now contains only files, that have 2 versions - original and patched

Ivan Arkhipov 7 éve
szülő
commit
335d334bfe
3 módosított fájl, 4 hozzáadás és 5 törlés
  1. BIN
      lib/libLotroDat.dll.a
  2. BIN
      lib/libLotroDat_static.a
  3. 4 5
      src/DatFile.cpp

BIN
lib/libLotroDat.dll.a


BIN
lib/libLotroDat_static.a


+ 4 - 5
src/DatFile.cpp

@@ -483,6 +483,10 @@ namespace LOTRO_DAT {
         }
         dat_state_ = UPDATED;
 
+        if (orig_dict_.count(file->file_id()) == 0) {
+            orig_dict_[file->file_id()] = new Subfile(this, dictionary_[file->file_id()]->MakeHeaderData());
+        }
+
         auto journal = GetFragmentationJournal();
         if (journal[0].second != file_size_) {
             journal[0].second = file_size_;
@@ -630,11 +634,6 @@ namespace LOTRO_DAT {
         FILE *dict_file = fopen(filename, "rb");
 
         if (dict_file == nullptr) {
-            if (locale == ORIGINAL) {
-                for (auto file : dictionary_) {
-                    (*dict)[file.first] = new Subfile(this, file.second->MakeHeaderData());
-                }
-            }
             fprintf(stderr, "WARNING!!! DatFile::InitLocale() - cannot open .dat locale file %s\n", filename);
             return;
         }