Ejemplo n.º 1
0
    private void OnTouch()
    {
        bool flag = false;

        GameWebAPI.RespDataWD_DungeonResult respDataWD_DungeonResult = ClassSingleton <QuestData> .Instance.RespDataWD_DungeonResult;
        if (respDataWD_DungeonResult != null && "3" == respDataWD_DungeonResult.worldDungeonId)
        {
            flag = true;
        }
        else
        {
            GameWebAPI.RespData_WorldMultiResultInfoLogic respData_WorldMultiResultInfoLogic = ClassSingleton <QuestData> .Instance.RespData_WorldMultiResultInfoLogic;
            if (respData_WorldMultiResultInfoLogic != null && "3" == respData_WorldMultiResultInfoLogic.worldDungeonId)
            {
                flag = true;
            }
        }
        if (flag)
        {
            if (this.particle != null && !this.particle.isStopped)
            {
                this.particle.Stop();
            }
            Action finishedAction = delegate()
            {
                this.ClosePanel(true);
            };
            LeadReview.ShowReviewConfirm(LeadReview.MessageType.FIRST_CLEAR_AREA1_STAGE3, finishedAction, false);
        }
        else
        {
            this.ClosePanel(true);
        }
    }
Ejemplo n.º 2
0
 protected override void Update()
 {
     base.Update();
     GUIScreenResult.UpdateState updateState = (GUIScreenResult.UpdateState) this.seq;
     if (updateState != GUIScreenResult.UpdateState.Initialize)
     {
         if (updateState != GUIScreenResult.UpdateState.OpenResult)
         {
             if (updateState != GUIScreenResult.UpdateState.Wait)
             {
             }
         }
         else if (++this.timeCt >= 20)
         {
             RestrictionInput.EndLoad();
             this.OpenResultUI();
             this.timeCt = 0;
             this.seq    = 2;
         }
     }
     else
     {
         this.result      = ClassSingleton <QuestData> .Instance.RespDataWD_DungeonResult;
         this.multiResult = ClassSingleton <QuestData> .Instance.RespData_WorldMultiResultInfoLogic;
         if (this.result == null && this.multiResult == null)
         {
             ScreenController.ChangeHomeScreen(CMD_Tips.DISPLAY_PLACE.TitleToFarm);
             this.seq = 2;
         }
         else
         {
             this.seq = 1;
         }
     }
 }
Ejemplo n.º 3
0
    protected override void Awake()
    {
        base.Awake();
        GameWebAPI.RespData_WorldMultiResultInfoLogic respData_WorldMultiResultInfoLogic  = ClassSingleton <QuestData> .Instance.RespData_WorldMultiResultInfoLogic;
        GameWebAPI.RespData_WorldMultiResultInfoLogic.DungeonReward.LinkBonus[] linkBonus = respData_WorldMultiResultInfoLogic.dungeonReward.linkBonus;
        if (linkBonus == null || linkBonus.Length == 0)
        {
            GUICollider.DisableAllCollider("CMD_FirstClear");
            return;
        }
        int num = linkBonus.Length;

        this.firstClearMessage.text = string.Empty;
        for (int i = 0; i < num; i++)
        {
            GameWebAPI.RespData_WorldMultiResultInfoLogic.DungeonReward.LinkBonus linkBonus2 = linkBonus[i];
            int type = linkBonus2.type;
            if (linkBonus2.reward != null && linkBonus2.reward.Length != 0)
            {
                for (int j = 0; j < linkBonus2.reward.Length; j++)
                {
                    GameWebAPI.RespData_WorldMultiResultInfoLogic.DungeonReward.LinkBonus.LinkBonusReward linkBonusReward = linkBonus2.reward[j];
                    string assetTitle = DataMng.Instance().GetAssetTitle(linkBonusReward.assetCategoryId, linkBonusReward.assetValue.ToString());
                    if (type != 1)
                    {
                        if (type == 2)
                        {
                            UILabel uilabel = this.firstClearMessage;
                            uilabel.text += string.Format(StringMaster.GetString("FirstLinkBonusFriend"), linkBonusReward.linkNum, assetTitle, linkBonusReward.assetNum);
                        }
                    }
                    else
                    {
                        UILabel uilabel2 = this.firstClearMessage;
                        uilabel2.text += string.Format(StringMaster.GetString("FirstLinkBonus"), linkBonusReward.linkNum, assetTitle, linkBonusReward.assetNum);
                    }
                    UILabel uilabel3 = this.firstClearMessage;
                    uilabel3.text += "\n";
                }
            }
        }
        GUICollider.DisableAllCollider("CMD_FirstClear");
    }
Ejemplo n.º 4
0
    private void ShowDrops()
    {
        this.skipCount = DropItemResult.SkipCount.Drops;
        GameWebAPI.RespDataWD_DungeonResult.Drop[]            array    = null;
        GameWebAPI.RespDataWD_DungeonStart.LuckDrop           luckDrop = null;
        GameWebAPI.RespDataWD_DungeonResult.OptionDrop[]      array2   = null;
        GameWebAPI.RespDataWD_DungeonResult.EventChipReward[] array3   = null;
        GameWebAPI.RespData_WorldMultiResultInfoLogic.DungeonReward.DropReward[] array4 = null;
        GameWebAPI.RespData_WorldMultiResultInfoLogic.DungeonReward.DropReward[] array5 = null;
        GameWebAPI.RespData_WorldMultiResultInfoLogic.DungeonReward.LuckDrop[]   array6 = null;
        GameWebAPI.RespDataWD_DungeonStart respDataWD_DungeonStart = ClassSingleton <QuestData> .Instance.RespDataWD_DungeonStart;
        if (respDataWD_DungeonStart != null)
        {
            luckDrop = respDataWD_DungeonStart.luckDrop;
            if (ClassSingleton <QuestData> .Instance.RespDataWD_DungeonResult != null)
            {
                array  = ClassSingleton <QuestData> .Instance.RespDataWD_DungeonResult.dropReward;
                array2 = ClassSingleton <QuestData> .Instance.RespDataWD_DungeonResult.optionDrop;
                array3 = ClassSingleton <QuestData> .Instance.RespDataWD_DungeonResult.eventChipReward;
            }
        }
        GameWebAPI.RespData_WorldMultiStartInfo respData_WorldMultiStartInfo = DataMng.Instance().RespData_WorldMultiStartInfo;
        if (respData_WorldMultiStartInfo != null)
        {
            array    = null;
            luckDrop = null;
            GameWebAPI.RespData_WorldMultiResultInfoLogic respData_WorldMultiResultInfoLogic = ClassSingleton <QuestData> .Instance.RespData_WorldMultiResultInfoLogic;
            if (respData_WorldMultiResultInfoLogic.dungeonReward != null)
            {
                array6 = respData_WorldMultiResultInfoLogic.dungeonReward.luckDrop;
                GameWebAPI.RespData_WorldMultiStartInfo respData_WorldMultiStartInfo2 = DataMng.Instance().RespData_WorldMultiStartInfo;
                bool flag = respData_WorldMultiStartInfo2.party[0].userId == DataMng.Instance().RespDataCM_Login.playerInfo.userId;
                if (flag)
                {
                    array4 = respData_WorldMultiResultInfoLogic.dungeonReward.ownerDropReward;
                }
                array5 = respData_WorldMultiResultInfoLogic.dungeonReward.multiReward;
            }
            array  = respData_WorldMultiResultInfoLogic.dropReward;
            array2 = respData_WorldMultiResultInfoLogic.optionDrop;
            array3 = respData_WorldMultiResultInfoLogic.eventChipReward;
        }
        List <DropItemTotalParts.Data> list = new List <DropItemTotalParts.Data>();

        if (array != null)
        {
            foreach (GameWebAPI.RespDataWD_DungeonResult.Drop drop in array)
            {
                list.Add(new DropItemTotalParts.Data
                {
                    assetCategoryId = drop.assetCategoryId,
                    objectId        = drop.assetValue.ToString(),
                    num             = drop.assetNum
                });
            }
        }
        if (luckDrop != null)
        {
            list.Add(new DropItemTotalParts.Data
            {
                assetCategoryId = luckDrop.assetCategoryId,
                objectId        = luckDrop.assetValue.ToString(),
                num             = luckDrop.assetNum
            });
        }
        if (array4 != null)
        {
            foreach (GameWebAPI.RespData_WorldMultiResultInfoLogic.DungeonReward.DropReward dropReward in array4)
            {
                list.Add(new DropItemTotalParts.Data
                {
                    assetCategoryId = dropReward.assetCategoryId,
                    objectId        = dropReward.assetValue.ToString(),
                    num             = dropReward.assetNum
                });
            }
        }
        if (array5 != null)
        {
            foreach (GameWebAPI.RespData_WorldMultiResultInfoLogic.DungeonReward.DropReward dropReward2 in array5)
            {
                list.Add(new DropItemTotalParts.Data
                {
                    assetCategoryId = dropReward2.assetCategoryId,
                    objectId        = dropReward2.assetValue.ToString(),
                    num             = dropReward2.assetNum
                });
            }
        }
        if (array6 != null)
        {
            foreach (GameWebAPI.RespData_WorldMultiResultInfoLogic.DungeonReward.LuckDrop luckDrop2 in array6)
            {
                list.Add(new DropItemTotalParts.Data
                {
                    assetCategoryId = luckDrop2.assetCategoryId,
                    objectId        = luckDrop2.assetValue.ToString(),
                    num             = luckDrop2.assetNum
                });
            }
        }
        if (array2 != null)
        {
            foreach (GameWebAPI.RespDataWD_DungeonResult.OptionDrop optionDrop in array2)
            {
                list.Add(new DropItemTotalParts.Data
                {
                    assetCategoryId = optionDrop.assetCategoryId,
                    objectId        = optionDrop.assetValue.ToString(),
                    num             = optionDrop.assetNum.ToInt32()
                });
            }
        }
        if (array3 != null)
        {
            foreach (GameWebAPI.RespDataWD_DungeonResult.EventChipReward eventChipReward in array3)
            {
                list.Add(new DropItemTotalParts.Data
                {
                    assetCategoryId = eventChipReward.assetCategoryId,
                    objectId        = eventChipReward.assetValue.ToString(),
                    num             = eventChipReward.assetNum.ToInt32()
                });
            }
        }
        List <DropItemTotalParts.Data> list2 = new List <DropItemTotalParts.Data>();

        while (list.Count > 0)
        {
            DropItemTotalParts.Data data = list[0];
            int num = 0;
            foreach (DropItemTotalParts.Data data2 in list)
            {
                if (data.assetCategoryId == data2.assetCategoryId && data.objectId == data2.objectId)
                {
                    num += data2.num;
                }
            }
            DropItemTotalParts.Data newData = new DropItemTotalParts.Data();
            newData.assetCategoryId = data.assetCategoryId;
            newData.objectId        = data.objectId;
            newData.num             = num;
            list2.Add(newData);
            list = list.Where((DropItemTotalParts.Data x) => x.assetCategoryId != newData.assetCategoryId || x.objectId != newData.objectId).ToList <DropItemTotalParts.Data>();
        }
        this.dropItemTotalList = new DropItemTotalList(base.gameObject, list2.ToArray());
        this.dropItemTotalList.SetActive(false);
        this.dropItemList = new DropItemList(base.gameObject, 10, new Vector2(890f, 250f), array, luckDrop, array4, array5, array6, array2, array3);
        this.dropItemList.SetScrollBarPosX(550f);
        this.dropItemList.SetPosition(new Vector3(0f, 40f, 100f));
        if (this.clipingTextures != null)
        {
            foreach (UITexture uitexture in this.clipingTextures)
            {
                uitexture.depth = 0;
            }
        }
        IEnumerator routine = this.dropItemList.SetDrops(false, new Action(this.SetDropCallBack));

        this.coroutineDropInfo = AppCoroutine.Start(routine, false);
        if (this.lines != null)
        {
            foreach (GameObject gameObject in this.lines)
            {
                gameObject.SetActive(true);
            }
        }
        this.isUserMonsterRefresh = false;
        this.isChipMonsterRefresh = false;
        foreach (DropItemTotalParts.Data data3 in list2)
        {
            if (data3.assetCategoryId.ToInt32() == 1)
            {
                this.isUserMonsterRefresh = true;
            }
            if (data3.assetCategoryId.ToInt32() == 17)
            {
                this.isChipMonsterRefresh = true;
            }
        }
    }
    public override void Init()
    {
        base.Init();
        this.particleRemover.SetActive(false);
        this.getExp.text     = "0";
        this.getCluster.text = "0";
        this.getFriendPointForLeader.text = "0";
        this.getFriendPoint.text          = "0";
        NGUITools.SetActiveSelf(this.acquisitionGO, false);
        int num = int.Parse(DataMng.Instance().RespDataMN_DeckList.selectDeckNum) - 1;

        this.deckData = DataMng.Instance().RespDataMN_DeckList.deckList[num];
        GameWebAPI.RespData_WorldMultiStartInfo respData_WorldMultiStartInfo = DataMng.Instance().RespData_WorldMultiStartInfo;
        this.isMulti = (null != respData_WorldMultiStartInfo);
        if (!this.isMulti)
        {
            GameWebAPI.RespDataWD_DungeonResult respDataWD_DungeonResult = ClassSingleton <QuestData> .Instance.RespDataWD_DungeonResult;
            this.totalExp     = respDataWD_DungeonResult.totalExp;
            this.totalCluster = respDataWD_DungeonResult.totalMoney;
        }
        else
        {
            GameWebAPI.RespData_WorldMultiResultInfoLogic respData_WorldMultiResultInfoLogic = ClassSingleton <QuestData> .Instance.RespData_WorldMultiResultInfoLogic;
            this.totalExp     = respData_WorldMultiResultInfoLogic.totalExp;
            this.totalCluster = respData_WorldMultiResultInfoLogic.totalMoney;
            if (respData_WorldMultiResultInfoLogic.dungeonReward != null)
            {
                if (respData_WorldMultiResultInfoLogic.dungeonReward.luckDrop != null)
                {
                    foreach (GameWebAPI.RespData_WorldMultiResultInfoLogic.DungeonReward.LuckDrop luckDrop2 in respData_WorldMultiResultInfoLogic.dungeonReward.luckDrop)
                    {
                        if (int.Parse(luckDrop2.assetCategoryId) == 5)
                        {
                            this.totalExp += luckDrop2.assetNum;
                        }
                        if (int.Parse(luckDrop2.assetCategoryId) == 4)
                        {
                            this.totalCluster += luckDrop2.assetNum;
                        }
                    }
                }
                if (respData_WorldMultiResultInfoLogic.dungeonReward.multiReward != null)
                {
                    foreach (GameWebAPI.RespData_WorldMultiResultInfoLogic.DungeonReward.DropReward dropReward in respData_WorldMultiResultInfoLogic.dungeonReward.multiReward)
                    {
                        if (int.Parse(dropReward.assetCategoryId) == 5)
                        {
                            this.totalExp += dropReward.assetNum;
                        }
                        if (int.Parse(dropReward.assetCategoryId) == 4)
                        {
                            this.totalCluster += dropReward.assetNum;
                        }
                    }
                }
                if (respData_WorldMultiResultInfoLogic.dungeonReward.ownerDropReward != null)
                {
                    foreach (GameWebAPI.RespData_WorldMultiResultInfoLogic.DungeonReward.DropReward dropReward2 in respData_WorldMultiResultInfoLogic.dungeonReward.ownerDropReward)
                    {
                        if (int.Parse(dropReward2.assetCategoryId) == 5)
                        {
                            this.totalExp += dropReward2.assetNum;
                        }
                        if (int.Parse(dropReward2.assetCategoryId) == 4)
                        {
                            this.totalCluster += dropReward2.assetNum;
                        }
                    }
                }
            }
        }
        this.getExpText.text     = StringMaster.GetString("BattleUI-03");
        this.getClusterText.text = StringMaster.GetString("BattleUI-40");
        this.getFriendPointForLeaderText.text = StringMaster.GetString("BattleUI-48");
        this.getFriendPointText.text          = StringMaster.GetString("BattleUI-49");
        this.CreateDigimonThumbnail();
    }