mirror of
https://github.com/Dongyifengs/AssetStudio-Genshin-MoYi.git
synced 2025-05-07 03:49:19 +08:00
33 lines
957 B
C#
33 lines
957 B
C#
using System.Collections.Generic;
|
|
|
|
namespace AssetStudio
|
|
{
|
|
public class TOTFile
|
|
{
|
|
public Dictionary<long, StreamFile[]> Bundles = new Dictionary<long, StreamFile[]>();
|
|
public TOTFile(FileReader reader)
|
|
{
|
|
if (reader.BundlePos.Length != 0)
|
|
{
|
|
foreach (var pos in reader.BundlePos)
|
|
{
|
|
reader.Position = pos;
|
|
var bundle = new BundleFile(reader);
|
|
Bundles.Add(pos, bundle.FileList);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
while (reader.Position != reader.Length)
|
|
{
|
|
var pos = reader.Position;
|
|
var bundle = new BundleFile(reader);
|
|
if (bundle.FileList == null)
|
|
continue;
|
|
Bundles.Add(pos, bundle.FileList);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|