private void initData() { List <RingRankingInfo> playerRingDataList = RingPaiHangDBController.getInstance().getPlayerRingDataList(); if (null != playerRingDataList) { foreach (RingRankingInfo data in playerRingDataList) { this.playerRingDatas.Add(data.nRoleID, data); this.rankingDatas.Add(data.getPlayerRingRankingData()); } } }
public RingRankingInfo getRingData(int nRoleID) { RingRankingInfo data = null; lock (this.playerRingDatas) { if (this.playerRingDatas.TryGetValue(nRoleID, out data)) { return(data); } } return(RingPaiHangDBController.getInstance().getRingDataById(nRoleID)); }