public static ListView <CUseable> CreateUsableListByRandowReward(RES_RANDOM_REWARD_TYPE type, int cnt, uint baseId)
        {
            ListView <CUseable> view = new ListView <CUseable>();

            if (type != RES_RANDOM_REWARD_TYPE.RES_RANDOM_REWARD_TYPE_NEST)
            {
                CUseable item = CreateUsableByRandowReward(type, cnt, baseId);
                if (item != null)
                {
                    view.Add(item);
                }
                return(view);
            }
            ResRewardForWeal weal = new ResRewardForWeal();

            if (GameDataMgr.wealRewardDict.TryGetValue(baseId, out weal))
            {
                for (int i = 0; i < weal.astRewardDetail.Length; i++)
                {
                    if (weal.astRewardDetail[i].bItemType == 0)
                    {
                        return(view);
                    }
                    if (weal.astRewardDetail[i].bItemType >= 0x11)
                    {
                        return(view);
                    }
                    view.AddRange(CreateUsableListByRandowReward((RES_RANDOM_REWARD_TYPE)weal.astRewardDetail[i].bItemType, (int)weal.astRewardDetail[i].dwLowCnt, weal.astRewardDetail[i].dwItemID));
                }
            }
            return(view);
        }
Exemple #2
0
 public ActivityPhase(Activity owner)
 {
     this._owner            = owner;
     this._timeState        = TimeState.NotStart;
     this._secondSpan       = 0;
     this._marked           = false;
     this._rewardStore      = null;
     this._rewardCount      = 0;
     this._extraRewardStore = null;
     this._extraRewardCount = 0;
 }