From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- Client/Assets/Scripts/XUtliPoolLib/StringTable.cs | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Client/Assets/Scripts/XUtliPoolLib/StringTable.cs (limited to 'Client/Assets/Scripts/XUtliPoolLib/StringTable.cs') diff --git a/Client/Assets/Scripts/XUtliPoolLib/StringTable.cs b/Client/Assets/Scripts/XUtliPoolLib/StringTable.cs new file mode 100644 index 00000000..f0480f35 --- /dev/null +++ b/Client/Assets/Scripts/XUtliPoolLib/StringTable.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; + +namespace XUtliPoolLib +{ + public class StringTable : CVSReader + { + public Dictionary Table = new Dictionary(); + + public class RowData + { + public string Enum; + + public string Text; + } + + protected override void ReadLine(XBinaryReader reader) + { + uint key = 0u; + string value = ""; + base.Read(reader, ref key, CVSReader.uintParse); + this.columnno = 0; + base.Read(reader, ref value, CVSReader.stringParse); + this.columnno = 1; + this.Table[key] = value; + this.columnno = -1; + } + + protected override void OnClear(int lineCount) + { + this.Table.Clear(); + } + } +} -- cgit v1.1-26-g67d0