public LvCollection(int tlevel, List <LvItem[]> tLevelReward, List <int[]> tReward, LevelRewardCollection.CollectionState tCollectionState)
 {
     this.level      = tlevel;
     tLvReward       = tLevelReward;
     reward          = tReward;
     CollectionState = tCollectionState;
 }
Exemple #2
0
    public void SetItemValue(object obj)
    {
        colItem = obj as CollectionItem;

        if (colItem != null)
        {
            giftId       = colItem.ID;
            num          = colItem.num;
            curItemState = colItem.giftType;
        }

        GetObject(giftId);

        Refresh();
    }
Exemple #3
0
    public LevelRewardCollection.CollectionState  RefreshItemState(int num, int tLimit)
    {
        List <int> levelRewardList = Core.Data.ActivityManager.GetGotLvReward();

        LevelRewardCollection.CollectionState curItemState = LevelRewardCollection.CollectionState.LockReward;

        if (levelRewardList != null && levelRewardList.Count != 0) //领过奖励
        {
            if (num < tLimit)                                      //解锁 可以领
            {
                if (levelRewardList.Contains((num + 1) * 5))
                {
                    curItemState = LevelRewardCollection.CollectionState.GotReward;
                }
                else
                {
                    curItemState = LevelRewardCollection.CollectionState.UnlockReward;
                }
            }
            else
            {
                curItemState = LevelRewardCollection.CollectionState.LockReward;
            }
        }
        else
        {    // 从未领过  可以开启
            if (num < tLimit)
            {
                curItemState = LevelRewardCollection.CollectionState.UnlockReward;
            }
            else
            {
                curItemState = LevelRewardCollection.CollectionState.LockReward;
            }
        }
        return(curItemState);
    }
Exemple #4
0
 public CollectionItem(int tId, int tNum, LevelRewardCollection.CollectionState tGiftType)
 {
     ID       = tId;
     num      = tNum;
     giftType = tGiftType;
 }