public long GetAllGodSoliderAttrValue() { long num = 0L; if (this.mGodList != null) { List <int> list = new List <int>(); List <int> list2 = new List <int>(); for (int i = 0; i < this.mGodList.get_Count(); i++) { GodWeaponInfo godWeaponInfo = this.mGodList.get_Item(i); if (godWeaponInfo.isOpen && godWeaponInfo.gLevel > 0) { Attrs attrs = DataReader <Attrs> .Get(this.mTypeLevelDict.get_Item(godWeaponInfo.Type).get_Item(godWeaponInfo.gLevel).attrID); if (attrs != null) { for (int j = 0; j < attrs.attrs.get_Count(); j++) { list.Add(attrs.attrs.get_Item(j)); list2.Add(attrs.values.get_Item(j)); } } } } num += EquipGlobal.CalculateFightingByIDAndValue(list, list2); } return(num); }
public static long getAllGemAttrValue() { long num = 0L; List <int> list = new List <int>(); for (int i = 0; i < 10; i++) { for (int j = 0; j < 4; j++) { if (GemManager.Instance.equipSlots.GetLength(0) >= i) { if (GemManager.Instance.equipSlots.GetLength(1) >= j) { GemEmbedInfo gemEmbedInfo = GemManager.Instance.equipSlots[i, j]; if (gemEmbedInfo != null && gemEmbedInfo.typeId > 0) { list.Add(gemEmbedInfo.typeId); } } } } } for (int k = 0; k < list.get_Count(); k++) { int itemId = list.get_Item(k); List <int> attrs = GemGlobal.GetAttrs(itemId); List <int> values = GemGlobal.GetValues(itemId); num += EquipGlobal.CalculateFightingByIDAndValue(attrs, values); } return(num); }
private void RefreshPowerNumber(int type, List <int> attrIds, List <int> attrValues, bool isSwitch) { int num = (int)EquipGlobal.CalculateFightingByIDAndValue(attrIds, attrValues); ChangeNumAnim changeNumAnim = this.mTxPower.GetComponent <ChangeNumAnim>(); if (isSwitch) { if (changeNumAnim != null) { changeNumAnim.set_enabled(false); } this.mTxPower.set_text(string.Format("战力:<color=#FFEB4B>{0}</color>", num)); } else { if (changeNumAnim == null) { changeNumAnim = this.mTxPower.get_gameObject().AddComponent <ChangeNumAnim>(); } else { changeNumAnim.set_enabled(true); } changeNumAnim.ShowChangeNumAnim(ChangeNumAnim.AnimType.Normal, this.mTxPower, (long)this.LastPower, (long)num, null, delegate(string resultStr) { this.mTxPower.set_text(string.Format("战力:<color=#FFEB4B>{0}</color>", resultStr)); }, null); } this.LastPower = num; }
public static long GetCurrentWingFightingValue() { long num = 0L; if (WingManager.wingInfoDict == null) { return(num); } using (Dictionary <int, WingInfo> .Enumerator enumerator = WingManager.wingInfoDict.GetEnumerator()) { while (enumerator.MoveNext()) { KeyValuePair <int, WingInfo> current = enumerator.get_Current(); int cfgId = current.get_Value().cfgId; int lv = current.get_Value().lv; if (cfgId > 0) { wingLv wingLvInfo = WingManager.GetWingLvInfo(cfgId, lv); if (wingLvInfo != null) { int templateId = wingLvInfo.templateId; Attrs attrs = DataReader <Attrs> .Get(templateId); if (attrs != null) { num += EquipGlobal.CalculateFightingByIDAndValue(attrs.attrs, attrs.values); } } } } } return(num); }
private void ShowFightPower(int attrId) { Attrs attrs = DataReader <Attrs> .Get(attrId); if (attrs != null) { long num = EquipGlobal.CalculateFightingByIDAndValue(attrs.attrs, attrs.values); if (num > 0L) { FightingUpUI fightingUpUI = UIManagerControl.Instance.OpenUI("FightingUpUI", UINodesManager.T2RootOfSpecial, false, UIType.NonPush) as FightingUpUI; fightingUpUI.SetPowerUp(num, null); } } }