add standalone mode ,bug fix

This commit is contained in:
CroakFang
2023-02-13 10:38:40 +08:00
parent 7ba9b84a11
commit f11edb5924
46 changed files with 3599 additions and 34 deletions
+9 -11
View File
@@ -17,7 +17,7 @@ public class ManifestDB
public ManifestDB()
{
string DBPath = $"{Config.Instance.MainPath}\\meta";
string DBPath = $"{Config.Instance.MainPath}\\meta_umaviewer";
ManifestDB.DBPath = DBPath;
if (!File.Exists(DBPath))
{
@@ -177,7 +177,7 @@ public class ManifestDB
callback?.Invoke($"Checking master.mdb");
SqliteCommand command = new SqliteCommand("SELECT h FROM a WHERE n LIKE 'master.mdb.lz4'", MetaDB);
var reader = command.ExecuteReader();
if (reader.Read())
{
var hash = reader.GetString(0);
@@ -230,28 +230,26 @@ public class ManifestDB
ulong count = reader.GetRowCount();
ManifestEntry[] manifests = new ManifestEntry[count];
if (kind == Kind.Default)
for (ulong i = 0; i < count; i++)
{
for (ulong i = 0; i < count; i++)
manifests[i].kind = (int)kind;
if (kind == Kind.Default)
{
manifests[i].kind = (int)kind;
if (!reader.ReadLine(ManifestEntry.GetBsvParser(ManifestEntry.Format.Full, reader), ref manifests[i]))
{
Debug.LogError("ReadLineError");
return null;
}
}
}
else
{
for (ulong i = 0; i < count; i++)
else
{
manifests[i].kind = (int)kind;
if (!reader.ReadLine(ManifestEntry.GetBsvParser(ManifestEntry.Format.Simplified, reader), ref manifests[i]))
{
Debug.LogError("ReadLineError");
return null;
}
}
}
return manifests;
@@ -320,6 +318,6 @@ public class ManifestDB
}
return platformEntrys[0];
}
}