Пример #1
0
 public ArchiveFileEntry(WildstarFile indexFile, WildstarAssets assets, IArchiveDirectoryEntry parent, int blockNumber, string name, BinaryReader reader) : base(indexFile, assets, parent, blockNumber, name)
 {
     Flags            = reader.ReadInt32();
     Reserved1        = reader.ReadInt64();
     UncompressedSize = reader.ReadInt64();
     CompressedSize   = reader.ReadInt64();
     Hash             = BitConverter.ToString(reader.ReadBytes(20)).Replace("-", "").ToLower();
     Reserved2        = reader.ReadInt32();
     _lazyArchiveFile = new Lazy <WildstarFile>(() => Assets.LocateArchiveWithAsset(Hash));
 }
Пример #2
0
 public MergedArchiveDirectoryEntry(WildstarAssets assets, IEnumerable <IArchiveDirectoryEntry> directories = null, string name = null, IArchiveDirectoryEntry parent = null)
 {
     _name             = name;
     _parent           = parent;
     Assets            = assets;
     _directoryEntries = directories?.ToList() ?? assets.RootDirectoryEntries.ToList();
     _children         = GroupDirectories(_directoryEntries.SelectMany(i => i.Children)).ToList();
     if (_directoryEntries.Count == 1)
     {
         BlockNumber = _directoryEntries[0].BlockNumber;
         IndexFile   = _directoryEntries[0].IndexFile;
     }
 }
Пример #3
0
 public ArchiveDirectoryEntry(WildstarFile indexFile, WildstarAssets assets, IArchiveDirectoryEntry parent, int blockNumber, string name) : base(indexFile, assets, parent, blockNumber, name)
 {
     _children = new Lazy <List <IArchiveEntry> >(ReadChildren);
 }