Beispiel #1
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="getRewards"></param>
    private void updateGetRewardList(PacketStructChallengeGetReward[] getRewards)
    {
        if (getRewards != null ||
            getRewards.Length == 0)
        {
            IsViewFlag = false;
            rewardList[TAB_REWARD_GET].Clear();

            for (int i = 0; i < getRewards.Length; i++)
            {
                MasterDataChallengeReward master = MasterFinder <MasterDataChallengeReward> .Instance.Find(getRewards[i].fix_id);

                if (master == null)
                {
                    continue;
                }

                ChallengeRewardContext newData = new ChallengeRewardContext();


                newData.SetData(getRewards[i], master);

                rewardList[TAB_REWARD_GET].Add(newData);
            }

            if (rewardList[TAB_REWARD_GET].Count != 0)
            {
                IsViewFlag = true;
            }
        }
    }
Beispiel #2
0
    public void CopyData(ChallengeRewardContext context)
    {
        m_GetReward  = context.GetReward;
        m_GetMaster  = context.GetMaster;
        m_InfoReward = context.InfoReward;

        IsActiveTitleBar = context.IsActiveTitleBar;
        TitleBarText     = context.TitleBarText;
    }
Beispiel #3
0
    public void setupGet(int type)
    {
        PacketStructChallengeGetReward reward = m_GetReward;
        MasterDataChallengeReward      master = m_GetMaster;

        Message    = getRewardMessage(master.type, master.clear_param, master.clear_param, (master.clear_loop_reward_enable == 1 ? master.clear_loop_reward_count : 0));
        RewardType = type;

        if (reward.present_ids == null ||
            reward.present_ids.Length == 0)
        {
            return;
        }

        setupPresent(reward.present_ids);
    }
Beispiel #4
0
 public void SetData(PacketStructChallengeGetReward reward, MasterDataChallengeReward master)
 {
     m_GetReward  = reward;
     m_GetMaster  = master;
     m_InfoReward = null;
 }
Beispiel #5
0
 public void SetData(PacketStructChallengeInfoReward reward)
 {
     m_GetReward  = null;
     m_GetMaster  = null;
     m_InfoReward = reward;
 }