summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/StrengthAuxData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/StrengthAuxData.cs')
-rw-r--r--Client/Assets/Scripts/XMainClient/StrengthAuxData.cs100
1 files changed, 100 insertions, 0 deletions
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<XGameSysMgr>.singleton.IsSystemOpened((XSysDefine)this.StrengthenData.BQSystem) && (long)this.StrengthenData.ShowLevel <= (long)((ulong)XSingleton<XAttributeMgr>.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<FpStrengthNew.RowData> list = new List<FpStrengthNew.RowData>();
+ 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;
+ }
+ }
+}