Fix loading into world.

This commit is contained in:
hondacrx
2021-04-13 01:23:54 -04:00
parent b0e28e1478
commit 99350e6dc6
22 changed files with 78 additions and 171 deletions
@@ -34,16 +34,20 @@ namespace Game.DataStorage
void WriteRecord(uint id, Locale locale, ByteBuffer buffer);
void EraseRecord(uint id);
string GetName();
}
[Serializable]
public class DB6Storage<T> : Dictionary<uint, T>, IDB2Storage where T : new()
{
WDCHeader _header;
string _tableName;
public void LoadData(WDCHeader header, BitSet availableDb2Locales, HotfixStatements preparedStatement, HotfixStatements preparedStatementLocale)
{
_header = header;
_tableName = typeof(T).Name;
SQLResult result = DB.Hotfix.Query(DB.Hotfix.GetPreparedStatement(preparedStatement));
if (!result.IsEmpty())
@@ -384,5 +388,10 @@ namespace Game.DataStorage
}
public uint GetTableHash() { return _header.TableHash; }
public string GetName()
{
return _tableName;
}
}
}