From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Scripts/XUtliPoolLib/ProfessionConvertTable.cs | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Client/Assets/Scripts/XUtliPoolLib/ProfessionConvertTable.cs (limited to 'Client/Assets/Scripts/XUtliPoolLib/ProfessionConvertTable.cs') diff --git a/Client/Assets/Scripts/XUtliPoolLib/ProfessionConvertTable.cs b/Client/Assets/Scripts/XUtliPoolLib/ProfessionConvertTable.cs new file mode 100644 index 00000000..ce23e61d --- /dev/null +++ b/Client/Assets/Scripts/XUtliPoolLib/ProfessionConvertTable.cs @@ -0,0 +1,76 @@ +using System; + +namespace XUtliPoolLib +{ + public class ProfessionConvertTable : CVSReader + { + public ProfessionConvertTable.RowData[] Table = null; + + public class RowData + { + public int ProfessionID; + + public int AttributeID; + + public double PhysicalAtk; + + public double PhysicalDef; + + public double MagicAtk; + + public double MagicDef; + + public double Critical; + + public double CritResist; + + public double MaxHP; + + public double MaxMP; + + public double CritDamage; + } + + protected override void ReadLine(XBinaryReader reader) + { + ProfessionConvertTable.RowData rowData = new ProfessionConvertTable.RowData(); + base.Read(reader, ref rowData.ProfessionID, CVSReader.intParse); + this.columnno = 0; + base.Read(reader, ref rowData.AttributeID, CVSReader.intParse); + this.columnno = 1; + base.Read(reader, ref rowData.PhysicalAtk, CVSReader.doubleParse); + this.columnno = 2; + base.Read(reader, ref rowData.PhysicalDef, CVSReader.doubleParse); + this.columnno = 3; + base.Read(reader, ref rowData.MagicAtk, CVSReader.doubleParse); + this.columnno = 4; + base.Read(reader, ref rowData.MagicDef, CVSReader.doubleParse); + this.columnno = 5; + base.Read(reader, ref rowData.Critical, CVSReader.doubleParse); + this.columnno = 6; + base.Read(reader, ref rowData.CritResist, CVSReader.doubleParse); + this.columnno = 7; + base.Read(reader, ref rowData.MaxHP, CVSReader.doubleParse); + this.columnno = 12; + base.Read(reader, ref rowData.MaxMP, CVSReader.doubleParse); + this.columnno = 13; + base.Read(reader, ref rowData.CritDamage, CVSReader.doubleParse); + this.columnno = 15; + this.Table[this.lineno] = rowData; + this.columnno = -1; + } + + protected override void OnClear(int lineCount) + { + bool flag = lineCount > 0; + if (flag) + { + this.Table = new ProfessionConvertTable.RowData[lineCount]; + } + else + { + this.Table = null; + } + } + } +} -- cgit v1.1-26-g67d0