Ejemplo n.º 1
0
    private void OnClickImgBox(GameObject go)
    {
        int boxFlag = Activity7DayManager.Instance.boxFlag;

        if (boxFlag != 0)
        {
            if (boxFlag == 1)
            {
                Activity7DayManager.Instance.SendGetOpenServerBoxReq();
            }
        }
        else
        {
            List <int>  list  = new List <int>();
            List <long> list2 = new List <long>();
            for (int i = 0; i < Activity7DayManager.Instance.boxItems.get_Count(); i++)
            {
                ItemInfo1 itemInfo = Activity7DayManager.Instance.boxItems.get_Item(i);
                list.Add(itemInfo.itemId);
                list2.Add((long)itemInfo.count);
            }
            RewardUI rewardUI = UIManagerControl.Instance.OpenUI("RewardUI", UINodesManager.TopUIRoot, false, UIType.NonPush) as RewardUI;
            rewardUI.SetRewardItem(GameDataUtils.GetChineseContent(513163, false), list, list2, true, false, null, null);
            rewardUI.SetTipsText(GameDataUtils.GetChineseContent(513197, false));
        }
    }
Ejemplo n.º 2
0
    public void OnClickGeStartReward(GameObject go)
    {
        Debug.LogError(BountyManager.Instance.GettingReward);
        if (this.isTipsRewardBosx)
        {
            List <int>      goods           = new List <int>();
            List <long>     goodNums        = new List <long>();
            ShengLiBaoXiang shengLiBaoXiang = DataReader <ShengLiBaoXiang> .Get(BountyManager.Instance.rewardBoxId);

            int markIndex = BountyManager.Instance.GetMarkIndex();
            if (markIndex == 0)
            {
                goods    = shengLiBaoXiang.item1;
                goodNums = shengLiBaoXiang.num1;
            }
            else if (markIndex == 1)
            {
                goods    = shengLiBaoXiang.item2;
                goodNums = shengLiBaoXiang.num2;
            }
            else if (markIndex == 2)
            {
                goods    = shengLiBaoXiang.item3;
                goodNums = shengLiBaoXiang.num3;
            }
            else if (markIndex == 3)
            {
                goods    = shengLiBaoXiang.item4;
                goodNums = shengLiBaoXiang.num4;
            }
            RewardUI rewardUI = LinkNavigationManager.OpenRewardUI(UINodesManager.TopUIRoot);
            rewardUI.SetRewardItem("奖励预览", goods, goodNums, true, false, null, null);
            if (shengLiBaoXiang.word > 0)
            {
                rewardUI.SetTipsText(GameDataUtils.GetChineseContent(shengLiBaoXiang.word, false));
            }
        }
        else if (!BackpackManager.Instance.ShowBackpackFull() && !BountyManager.Instance.GettingReward)
        {
            if (BountyManager.Instance.HasGotRewardDaily)
            {
                UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(513630, false), 1f, 2f);
            }
            else
            {
                BountyManager.Instance.GettingReward = true;
                NetworkManager.Send(new BountyGetStarBoxReq
                {
                    taskType = (!BountyManager.Instance.isSelectDaily) ? BountyTaskType.ENUM.Urgent : BountyTaskType.ENUM.Normal
                }, ServerType.Data);
            }
        }
    }
Ejemplo n.º 3
0
    public void OnClickGetStartReward(GameObject go)
    {
        Debug.LogError(BountyManager.Instance.GettingReward);
        int num = 0;

        if (go.get_name().Equals("ButtonBox1"))
        {
            num = 1;
        }
        else if (go.get_name().Equals("ButtonBox2"))
        {
            num = 2;
        }
        else if (go.get_name().Equals("ButtonBox3"))
        {
            num = 3;
        }
        if (BountyManager.Instance.Info.hasStarUrgent < DataReader <JinJiShengLiBaoXiang> .Get(num).star || BountyManager.Instance.HasGotRewardUrgent[num - 1])
        {
            List <int>           goods                = new List <int>();
            List <long>          goodNums             = new List <long>();
            int                  markIndex            = BountyManager.Instance.GetMarkIndex();
            JinJiShengLiBaoXiang jinJiShengLiBaoXiang = DataReader <JinJiShengLiBaoXiang> .Get(num);

            if (markIndex == 0)
            {
                goods    = jinJiShengLiBaoXiang.item1;
                goodNums = jinJiShengLiBaoXiang.num1;
            }
            else if (markIndex == 1)
            {
                goods    = jinJiShengLiBaoXiang.item2;
                goodNums = jinJiShengLiBaoXiang.num2;
            }
            else if (markIndex == 2)
            {
                goods    = jinJiShengLiBaoXiang.item3;
                goodNums = jinJiShengLiBaoXiang.num3;
            }
            else if (markIndex == 3)
            {
                goods    = jinJiShengLiBaoXiang.item4;
                goodNums = jinJiShengLiBaoXiang.num4;
            }
            RewardUI rewardUI = LinkNavigationManager.OpenRewardUI(UINodesManager.TopUIRoot);
            rewardUI.SetRewardItem("奖励预览", goods, goodNums, true, false, null, null);
            if (jinJiShengLiBaoXiang.word > 0)
            {
                rewardUI.SetTipsText(GameDataUtils.GetChineseContent(jinJiShengLiBaoXiang.word, false));
            }
        }
        else if (!BackpackManager.Instance.ShowBackpackFull() && !BountyManager.Instance.GettingReward)
        {
            if (BountyManager.Instance.HasGotRewardDaily)
            {
                UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(513630, false), 1f, 2f);
            }
            else
            {
                BountyManager.Instance.GettingReward = true;
                NetworkManager.Send(new BountyGetStarBoxReq
                {
                    taskType  = (!BountyManager.Instance.isSelectDaily) ? BountyTaskType.ENUM.Urgent : BountyTaskType.ENUM.Normal,
                    boxTypeId = num
                }, ServerType.Data);
            }
        }
    }