public uint GetPlayerCoinAtTimeWithType(int iTimeIndex, KDAStat.GET_COIN_CHANNEL_TYPE type) { uint num = 0u; ListView <HeroKDA> .Enumerator enumerator = this.m_HeroKDA.GetEnumerator(); while (enumerator.MoveNext()) { if (enumerator.get_Current() != null) { uint num2 = 0u; if (enumerator.get_Current().m_arrCoinInfos[(int)type] != null) { while (!enumerator.get_Current().m_arrCoinInfos[(int)type].TryGetValue((uint)iTimeIndex, ref num2)) { iTimeIndex--; if (iTimeIndex < 0) { break; } } } num += num2; } } return(num); }
private void SetCoinRecorderInfo(KDAStat.GET_COIN_CHANNEL_TYPE type, int iValue, uint uiCurIndex) { if (this.m_arrCoinInfos != null) { if (this.m_arrCoinInfos[(int)type] == null) { this.m_arrCoinInfos[(int)type] = new Dictionary <uint, uint>(); } if (this.m_arrCoinInfos[(int)type] != null) { if (uiCurIndex != this.uiLastRecordCoinIndex) { this.m_arrCoinInfos[(int)type].Add(uiCurIndex, (uint)iValue); } else { this.m_arrCoinInfos[(int)type].Remove(uiCurIndex); this.m_arrCoinInfos[(int)type].Add(uiCurIndex, (uint)iValue); } } } }