From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Assets/Scripts/XUtliPoolLib/ProfSkillTable.cs | 139 +++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 Client/Assets/Scripts/XUtliPoolLib/ProfSkillTable.cs (limited to 'Client/Assets/Scripts/XUtliPoolLib/ProfSkillTable.cs') diff --git a/Client/Assets/Scripts/XUtliPoolLib/ProfSkillTable.cs b/Client/Assets/Scripts/XUtliPoolLib/ProfSkillTable.cs new file mode 100644 index 00000000..c9b83fc9 --- /dev/null +++ b/Client/Assets/Scripts/XUtliPoolLib/ProfSkillTable.cs @@ -0,0 +1,139 @@ +using System; + +namespace XUtliPoolLib +{ + public class ProfSkillTable : CVSReader + { + public ProfSkillTable.RowData[] Table = null; + + public class RowData + { + public int ProfID; + + public string ProfName; + + public string Skill1; + + public string Skill2; + + public string Skill3; + + public string Skill4; + + public string ProfIcon; + + public string ProfPic; + + public string ProfHeadIcon; + + public string ProfHeadIcon2; + + public float FixedEnmity; + + public float EnmityCoefficient; + + public string Description; + + public uint PromoteExperienceID; + + public uint OperateLevel; + + public bool PromoteLR; + + public string ProfNameIcon; + + public string ProfIntro; + + public string ProfTypeIntro; + + public string ProfWord1; + + public string ProfWord2; + } + + public ProfSkillTable.RowData GetByProfID(int key) + { + bool flag = this.Table == null || this.Table.Length == 0; + ProfSkillTable.RowData result; + if (flag) + { + result = null; + } + else + { + for (int i = 0; i < this.Table.Length; i++) + { + bool flag2 = this.Table[i].ProfID == key; + if (flag2) + { + return this.Table[i]; + } + } + result = null; + } + return result; + } + + protected override void ReadLine(XBinaryReader reader) + { + ProfSkillTable.RowData rowData = new ProfSkillTable.RowData(); + base.Read(reader, ref rowData.ProfID, CVSReader.intParse); + this.columnno = 0; + base.Read(reader, ref rowData.ProfName, CVSReader.stringParse); + this.columnno = 1; + base.Read(reader, ref rowData.Skill1, CVSReader.stringParse); + this.columnno = 2; + base.Read(reader, ref rowData.Skill2, CVSReader.stringParse); + this.columnno = 3; + base.Read(reader, ref rowData.Skill3, CVSReader.stringParse); + this.columnno = 4; + base.Read(reader, ref rowData.Skill4, CVSReader.stringParse); + this.columnno = 5; + base.Read(reader, ref rowData.ProfIcon, CVSReader.stringParse); + this.columnno = 6; + base.Read(reader, ref rowData.ProfPic, CVSReader.stringParse); + this.columnno = 7; + base.Read(reader, ref rowData.ProfHeadIcon, CVSReader.stringParse); + this.columnno = 8; + base.Read(reader, ref rowData.ProfHeadIcon2, CVSReader.stringParse); + this.columnno = 9; + base.Read(reader, ref rowData.FixedEnmity, CVSReader.floatParse); + this.columnno = 10; + base.Read(reader, ref rowData.EnmityCoefficient, CVSReader.floatParse); + this.columnno = 11; + base.Read(reader, ref rowData.Description, CVSReader.stringParse); + this.columnno = 12; + base.Read(reader, ref rowData.PromoteExperienceID, CVSReader.uintParse); + this.columnno = 13; + base.Read(reader, ref rowData.OperateLevel, CVSReader.uintParse); + this.columnno = 14; + base.Read(reader, ref rowData.PromoteLR, CVSReader.boolParse); + this.columnno = 15; + base.Read(reader, ref rowData.ProfNameIcon, CVSReader.stringParse); + this.columnno = 16; + base.Read(reader, ref rowData.ProfIntro, CVSReader.stringParse); + this.columnno = 17; + base.Read(reader, ref rowData.ProfTypeIntro, CVSReader.stringParse); + this.columnno = 18; + base.Read(reader, ref rowData.ProfWord1, CVSReader.stringParse); + this.columnno = 19; + base.Read(reader, ref rowData.ProfWord2, CVSReader.stringParse); + this.columnno = 20; + this.Table[this.lineno] = rowData; + this.columnno = -1; + } + + protected override void OnClear(int lineCount) + { + bool flag = lineCount > 0; + if (flag) + { + this.Table = new ProfSkillTable.RowData[lineCount]; + } + else + { + this.Table = null; + } + } + } +} -- cgit v1.1-26-g67d0