Some more bcsv fixes

This commit is contained in:
KillzXGaming 2020-03-18 14:10:37 -04:00
parent 6afdd0e10f
commit f44b2ed920
2 changed files with 10 additions and 6 deletions

View file

@ -26,7 +26,7 @@ namespace FirstPlugin
{ {
using (var reader = new Toolbox.Library.IO.FileReader(stream, true)) using (var reader = new Toolbox.Library.IO.FileReader(stream, true))
{ {
return reader.CheckSignature(4, "VSCB", 12); return reader.CheckSignature(4, "VSCB", 12) || Utils.GetExtension(FileName) == ".bcsv";
} }
} }

View file

@ -29,11 +29,15 @@ namespace FirstPlugin
uint numEntries = reader.ReadUInt32(); uint numEntries = reader.ReadUInt32();
uint entrySize = reader.ReadUInt32(); uint entrySize = reader.ReadUInt32();
ushort numFields = reader.ReadUInt16(); ushort numFields = reader.ReadUInt16();
ushort version = reader.ReadUInt16(); byte flag1 = reader.ReadByte();
byte flag2 = reader.ReadByte();
if (flag1 == 1)
{
uint magic = reader.ReadUInt32(); uint magic = reader.ReadUInt32();
uint unk = reader.ReadUInt32(); //Always 100000 uint unk = reader.ReadUInt32(); //Always 100000
reader.ReadUInt32();//0 reader.ReadUInt32();//0
reader.ReadUInt32();//0 reader.ReadUInt32();//0
}
Field[] fields = new Field[numFields]; Field[] fields = new Field[numFields];
for (int i = 0; i < numFields; i++) { for (int i = 0; i < numFields; i++) {