private GongxianJianliItem GetMineCortributeAwardPropList(int iMyRank) { GongxianJianliItem _MyCortributionRewardItemList = new GongxianJianliItem(); int _iCortributionDataId = GetIdCortributeByGrade(iMyRank); if (_iCortributionDataId >= 0) { DefendCityDevoteRewardRecord _CortributionData = Table.GetDefendCityDevoteReward(_iCortributionDataId); if (_CortributionData != null) { _MyCortributionRewardItemList.NubIcon = _CortributionData.ContributionIcon.ToInt(); for (int j = 0; j < _CortributionData.RankItemCount.Count; j++) { if (_CortributionData.RankItemID[j] > 0) { GongxianJianliItem.JiangliItem _item = new GongxianJianliItem.JiangliItem(); ItemBaseRecord _dbd = Table.GetItemBase(_CortributionData.RankItemID[j]); _item.IconId = _CortributionData.RankItemID[j]; _item.Icon = _dbd.Icon; _item.count = _CortributionData.RankItemCount[j].ToString(); _MyCortributionRewardItemList.Rewards.Add(_item); } } } } return(_MyCortributionRewardItemList); }
private void AddSetUpItem() { if (MonsterMiniature != null) { MonsterMiniature.GongxianList.Clear(); for (int i = 0; ; i++) { DefendCityDevoteRewardRecord _dcrr = Table.GetDefendCityDevoteReward(i + 1); if (_dcrr == null) { break; } GongxianJianliItem _jiangliItem = new GongxianJianliItem(); if (i < 3) { _jiangliItem.NubIcon = _dcrr.ContributionIcon.ToInt(); } else { _jiangliItem.Numb = string.Format("{0} - {1}", _dcrr.Rank[0].ToString(), _dcrr.Rank[_dcrr.Rank.Count - 1].ToString()); } for (int j = 0; j < _dcrr.RankItemCount.Count; j++) { if (_dcrr.RankItemID[j] > 0) { GongxianJianliItem.JiangliItem _item = new GongxianJianliItem.JiangliItem(); ItemBaseRecord _dbd = Table.GetItemBase(_dcrr.RankItemID[j]); _item.IconId = _dcrr.RankItemID[j]; _item.Icon = _dbd.Icon; _item.count = _dcrr.RankItemCount[j].ToString(); _jiangliItem.Rewards.Add(_item); } } MonsterMiniature.GongxianList.Add(_jiangliItem); } MonsterMiniature.JifenList.Clear(); for (int q = 0; ; q++) { DefendCityRewardRecord _dcrr2 = Table.GetDefendCityReward(q + 1); if (_dcrr2 == null) { break; } GongxianJianliItem _jiangliItem = new GongxianJianliItem(); if (q < 3) { _jiangliItem.NubIcon = _dcrr2.RankIcon.ToInt(); } else { _jiangliItem.Numb = string.Format("{0} - {1}", _dcrr2.Rank[0].ToString(), _dcrr2.Rank[_dcrr2.Rank.Count - 1].ToString()); } for (int k = 0; k < _dcrr2.RankItemCount.Count; k++) { if (_dcrr2.RankItemID[k] > 0) { GongxianJianliItem.JiangliItem _item = new GongxianJianliItem.JiangliItem(); ItemBaseRecord _dbd = Table.GetItemBase(_dcrr2.RankItemID[k]); _item.Icon = _dbd.Icon; _item.IconId = _dcrr2.RankItemID[k]; _item.count = _dcrr2.RankItemCount[k].ToString(); _jiangliItem.Rewards.Add(_item); } } MonsterMiniature.JifenList.Add(_jiangliItem); } } }
public void RefreshData(UIInitArguments data) { DataModel.ViewState = 0; DataModel.QueueState = 0; FubenRecord fuben = Table.GetFuben(30000); SceneRecord scene = Table.GetScene(fuben.SceneId); var _queueUpData = PlayerDataManager.Instance.PlayerDataModel.QueueUpData; if (_queueUpData.QueueId != -1 && _queueUpData.QueueId == fuben.QueueParam) { DataModel.QueueState = 1; } if (DataModel.Reward.Count <= 0) { DataModel.NeedLevel = scene.LevelLimit; for (int i = 0; i < fuben.RewardId.Count && i < fuben.RewardCount.Count; i++) { if (fuben.RewardId[i] > 0 && fuben.RewardCount[i] > 0) { ItemIdDataModel model = new ItemIdDataModel(); model.ItemId = fuben.RewardId[i]; model.Count = fuben.RewardCount[i]; DataModel.Reward.Add(model); } } } if (DataModel.TotalRewardRank == null) { DataModel.TotalRewardRank = new System.Collections.ObjectModel.ObservableCollection <GongxianJianliItem>(); for (int i = 0; ; i++) { CheckenFinalRewardRecord dcrr = Table.GetCheckenFinalReward(i + 1); if (dcrr == null) { break; } string[] rank = dcrr.Rank.Split('|'); GongxianJianliItem jiangliItem = new GongxianJianliItem(); if (rank.Length > 0) { if (int.Parse(rank[0]) <= 3) { jiangliItem.NubIcon = dcrr.RankIcon; } else { jiangliItem.Numb = string.Format("{0} - {1}", dcrr.Rank[0], dcrr.Rank[dcrr.Rank.Length - 1]); } for (int j = 0; j < dcrr.RankItemCount.Length; j++) { if (dcrr.RankItemID[j] > 0) { GongxianJianliItem.JiangliItem item = new GongxianJianliItem.JiangliItem(); item.IconId = dcrr.RankItemID[j]; ItemBaseRecord dbd = Table.GetItemBase(dcrr.RankItemID[j]); item.Icon = dbd.Icon; item.count = dcrr.RankItemCount[j].ToString(); jiangliItem.Rewards.Add(item); } } } DataModel.TotalRewardRank.Add(jiangliItem); } } }