summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XUtliPoolLib/StringTable.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-01-25 14:28:30 +0800
committerchai <chaifix@163.com>2021-01-25 14:28:30 +0800
commit6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch)
tree7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XUtliPoolLib/StringTable.cs
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XUtliPoolLib/StringTable.cs')
-rw-r--r--Client/Assets/Scripts/XUtliPoolLib/StringTable.cs34
1 files changed, 34 insertions, 0 deletions
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<uint, string> Table = new Dictionary<uint, string>();
+
+ public class RowData
+ {
+ public string Enum;
+
+ public string Text;
+ }
+
+ protected override void ReadLine(XBinaryReader reader)
+ {
+ uint key = 0u;
+ string value = "";
+ base.Read<uint>(reader, ref key, CVSReader.uintParse);
+ this.columnno = 0;
+ base.Read<string>(reader, ref value, CVSReader.stringParse);
+ this.columnno = 1;
+ this.Table[key] = value;
+ this.columnno = -1;
+ }
+
+ protected override void OnClear(int lineCount)
+ {
+ this.Table.Clear();
+ }
+ }
+}