From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Assets/Scripts/XMainClient/StrengthAuxData.cs | 100 +++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/StrengthAuxData.cs (limited to 'Client/Assets/Scripts/XMainClient/StrengthAuxData.cs') diff --git a/Client/Assets/Scripts/XMainClient/StrengthAuxData.cs b/Client/Assets/Scripts/XMainClient/StrengthAuxData.cs new file mode 100644 index 00000000..3ce79ed7 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/StrengthAuxData.cs @@ -0,0 +1,100 @@ +using System; +using System.Collections.Generic; +using XUtliPoolLib; + +namespace XMainClient +{ + public class StrengthAuxData + { + public int Id + { + get + { + return this.m_StrengthenData.BQID; + } + } + + public uint FightNum + { + get + { + return this.m_iFightNum; + } + set + { + this.m_iFightNum = value; + this._fightPercent = 0.0; + } + } + + public double FightPercent + { + get + { + return this._fightPercent; + } + set + { + this._fightPercent = value; + } + } + + public FpStrengthNew.RowData StrengthenData + { + get + { + return this.m_StrengthenData; + } + } + + public bool IsShow + { + get + { + bool flag = this.StrengthenData == null; + return !flag && XSingleton.singleton.IsSystemOpened((XSysDefine)this.StrengthenData.BQSystem) && (long)this.StrengthenData.ShowLevel <= (long)((ulong)XSingleton.singleton.XPlayerData.Level); + } + } + + private uint m_iFightNum = 0u; + + private double _fightPercent = 0.0; + + private FpStrengthNew.RowData m_StrengthenData = null; + + public StrengthAuxData(FpStrengthNew.RowData data) + { + this.m_StrengthenData = data; + } + + public double GetFightPercent(int recommendFight) + { + bool flag = recommendFight == 0; + double result; + if (flag) + { + result = 0.0; + } + else + { + result = this.FightNum / (double)recommendFight * 100.0; + } + return result; + } + + private FpStrengthNew.RowData GetData(int id) + { + List list = new List(); + for (int i = 0; i < XFPStrengthenDocument.StrengthenReader.Table.Length; i++) + { + FpStrengthNew.RowData rowData = XFPStrengthenDocument.StrengthenReader.Table[i]; + bool flag = rowData.BQID == id; + if (flag) + { + return rowData; + } + } + return null; + } + } +} -- cgit v1.1-26-g67d0