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));
 }
Esempio n. 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;
     }
 }
Esempio n. 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);
 }