This commit is contained in:
bird_egop
2026-06-03 16:48:13 +03:00
parent 2bb61c41ea
commit 4163e9aecb
11 changed files with 23 additions and 37 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ public record CpDatEntry(
string ArchiveFile,
string ArchiveEntryName,
int Magic1,
int Magic2,
int AttachIndex,
string Description,
DatEntryType Type,
int ChildCount, // игра не хранит это число в объекте, но оно есть в файле
+2 -2
View File
@@ -51,7 +51,7 @@ public class CpDatParser
fs.Seek(32 - str2.Length - 1, SeekOrigin.Current); // -1 ignore null terminator
var magic1 = fs.ReadInt32LittleEndian();
var magic2 = fs.ReadInt32LittleEndian();
var attachIndex = fs.ReadInt32LittleEndian();
var descriptionString = fs.ReadNullTerminated1251String();
@@ -69,6 +69,6 @@ public class CpDatParser
children.Add(child);
}
return new CpDatEntry(str1, str2, magic1, magic2, descriptionString, type, childCount, Children: children);
return new CpDatEntry(str1, str2, magic1, attachIndex, descriptionString, type, childCount, Children: children);
}
}