private void GetLotteryExtraInfo(uint id, SysExchangeVo vo) { //获得星签id,每次抽奖所需数量 string[] needsArr = GetNeedsArr(vo.needs); lotteryData[id].StarId = Convert.ToInt32(needsArr[0]); lotteryData[id].StarNeeds = Convert.ToInt32(needsArr[1]); //获得星签名称、图标 SysItemVo starVo = BaseDataMgr.instance.getGoodsVo((uint)lotteryData[id].StarId); if (null != starVo) { lotteryData[id].StarName = starVo.name; lotteryData[id].StarIcon = starVo.icon; } //获得高级奖品列表 string[] highRewardArr = StringUtils.SplitVoString(vo.higheritemid); foreach (string item in highRewardArr) { lotteryData[id].HighRewardList.Add(Convert.ToInt32(item)); } //获得奖品列表 string[] rewardArr = StringUtils.SplitVoString(vo.rewarditemid, "},"); foreach (string item in rewardArr) { lotteryData[id].RewardList.Add(GetRewardItem(item)); } }
private void InitLotteryData() { for (uint id = 1; id <= 6; id++) { SysExchangeVo vo = BaseDataMgr.instance.GetSysExchangeVo(id); if (null != vo) { lotteryData[id].LotteryLimit = vo.limit; lotteryData[id].LotteryRemain = vo.limit; GetLotteryExtraInfo(id, vo); } } }