private void MultyParty()
    {
        GameWebAPI.WD_Req_DngStart last_dng_req = DataMng.Instance().GetResultUtilData().last_dng_req;
        GameWebAPI.RespDataMA_GetWorldDungeonM.WorldDungeonM[] worldDungeonM = MasterDataMng.Instance().RespDataMA_WorldDungeonM.worldDungeonM;
        int dungeonID = int.Parse(last_dng_req.dungeonId);

        GameWebAPI.RespDataMA_GetWorldDungeonM.WorldDungeonM masterDungeon = worldDungeonM.SingleOrDefault((GameWebAPI.RespDataMA_GetWorldDungeonM.WorldDungeonM x) => x.worldDungeonId == dungeonID.ToString());
        GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM[]   worldStageM   = MasterDataMng.Instance().RespDataMA_WorldStageM.worldStageM;
        GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM     worldStageM2  = worldStageM.SingleOrDefault((GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM x) => x.worldStageId == masterDungeon.worldStageId);
        CMD_PartyEdit.replayMultiStageId   = worldStageM2.worldStageId;
        CMD_PartyEdit.replayMultiDungeonId = last_dng_req.dungeonId;
        CMD_PartyEdit.ModeType             = CMD_PartyEdit.MODE_TYPE.MULTI;
        CMD_PartyEdit partyEdit = GUIMain.ShowCommonDialog(null, "CMD_PartyEdit", new Action <CommonDialog>(this.OnReadyPartyEdit)) as CMD_PartyEdit;

        partyEdit.PartsTitle.SetReturnAct(delegate(int i)
        {
            partyEdit.ClosePanel(true);
        });
        partyEdit.PartsTitle.DisableReturnBtn(false);
        partyEdit.PartsTitle.SetCloseAct(delegate(int i)
        {
            this.< ClosePanel > __BaseCallProxy0(false);
            partyEdit.SetCloseAction(delegate(int x)
            {
                CMD_BattleNextChoice.GoToFarm();
            });
            partyEdit.ClosePanel(true);
        });
    }
예제 #2
0
    private void SetInitLabel()
    {
        this.lbUserName.text = this.data.ownerName;
        this.lbComment.text  = this.data.introduction;
        TitleDataMng.SetTitleIcon(this.data.titleId, this.goTitleIcon.GetComponent <UITexture>());
        GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM[] worldStageM  = MasterDataMng.Instance().RespDataMA_WorldStageM.worldStageM;
        GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM   worldStageM2 = worldStageM.SingleOrDefault((GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM x) => x.worldStageId == this.data.worldStageId);
        this.lbQuestName.text = worldStageM2.name + "\n" + this.data.dungeonName;
        string moodType = this.data.moodType;

        if (moodType != null)
        {
            if (moodType == "1")
            {
                this.lbMoodType.text = StringMaster.GetString("RecruitRule-06");
                goto IL_125;
            }
            if (moodType == "2")
            {
                this.lbMoodType.text = StringMaster.GetString("RecruitRule-07");
                goto IL_125;
            }
            if (!(moodType == "3"))
            {
            }
        }
        this.lbMoodType.text = StringMaster.GetString("RecruitRule-08");
IL_125:
        this.lbNowMemberNum.text = string.Format(StringMaster.GetString("SystemFraction"), this.data.memberCount, 3);
        if (!this.isOpenedQuest)
        {
            this.bgFrame.color     = ConstValue.DEFAULT_COLOR;
            this.lbUserName.color  = ConstValue.DEACTIVE_BUTTON_LABEL;
            this.lbQuestName.color = ConstValue.DEACTIVE_BUTTON_LABEL;
            this.lbComment.color   = ConstValue.DEACTIVE_BUTTON_LABEL;
        }
        if (this.data.ownerMonsterId != null)
        {
            MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.data.ownerMonsterId);
            if (monsterData != null)
            {
                GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.goMasterIcon.transform.localScale, this.goMasterIcon.transform.localPosition, this.goMasterIcon.transform.parent, true, false);
                UIWidget       component      = base.gameObject.GetComponent <UIWidget>();
                if (component != null)
                {
                    DepthController depthController = guimonsterIcon.GetDepthController();
                    depthController.AddWidgetDepth(guimonsterIcon.transform, component.depth + 2);
                }
            }
        }
    }
    private void OnReadyPartyEdit(CommonDialog dialog)
    {
        CMD_PartyEdit cmd_PartyEdit = dialog as CMD_PartyEdit;

        if (null != cmd_PartyEdit)
        {
            GameWebAPI.WD_Req_DngStart last_dng_req = DataMng.Instance().GetResultUtilData().last_dng_req;
            GameWebAPI.RespDataMA_GetWorldDungeonM.WorldDungeonM[] worldDungeonM = MasterDataMng.Instance().RespDataMA_WorldDungeonM.worldDungeonM;
            int dungeonID = int.Parse(last_dng_req.dungeonId);
            GameWebAPI.RespDataMA_GetWorldDungeonM.WorldDungeonM masterDungeon = worldDungeonM.SingleOrDefault((GameWebAPI.RespDataMA_GetWorldDungeonM.WorldDungeonM x) => x.worldDungeonId == dungeonID.ToString());
            GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM[]   worldStageM   = MasterDataMng.Instance().RespDataMA_WorldStageM.worldStageM;
            GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM     worldStageM2  = worldStageM.SingleOrDefault((GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM x) => x.worldStageId == masterDungeon.worldStageId);
            cmd_PartyEdit.SetQuestId(worldStageM2.worldAreaId, worldStageM2.worldStageId, last_dng_req.dungeonId);
        }
    }
 private bool IsPointQuest(string worldDungeonId)
 {
     GameWebAPI.RespDataMA_GetWorldDungeonM respDataMA_WorldDungeonM  = MasterDataMng.Instance().RespDataMA_WorldDungeonM;
     GameWebAPI.RespDataMA_GetWorldDungeonM.WorldDungeonM dungeonInfo = respDataMA_WorldDungeonM.worldDungeonM.SingleOrDefault((GameWebAPI.RespDataMA_GetWorldDungeonM.WorldDungeonM x) => x.worldDungeonId == worldDungeonId);
     if (dungeonInfo == null)
     {
         return(false);
     }
     GameWebAPI.RespDataMA_GetWorldStageM             respDataMA_WorldStageM = MasterDataMng.Instance().RespDataMA_WorldStageM;
     GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM stageInfo = respDataMA_WorldStageM.worldStageM.SingleOrDefault((GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM x) => x.worldStageId == dungeonInfo.worldStageId);
     if (stageInfo == null)
     {
         return(false);
     }
     GameWebAPI.RespDataMA_GetWorldAreaM            respDataMA_WorldAreaM = MasterDataMng.Instance().RespDataMA_WorldAreaM;
     GameWebAPI.RespDataMA_GetWorldAreaM.WorldAreaM worldAreaM            = respDataMA_WorldAreaM.worldAreaM.SingleOrDefault((GameWebAPI.RespDataMA_GetWorldAreaM.WorldAreaM x) => x.worldAreaId == stageInfo.worldAreaId);
     return(worldAreaM != null && (worldAreaM.type == "3" || worldAreaM.type == "4"));
 }
예제 #5
0
    public override void Init()
    {
        base.Init();
        NGUITools.SetActiveSelf(this.winLogo, false);
        NGUITools.SetActiveSelf(this.winLogoForSkip, false);
        NGUITools.SetActiveSelf(this.titleGO, false);
        if (this.lines != null)
        {
            foreach (GameObject gameObject in this.lines)
            {
                gameObject.SetActive(false);
            }
        }
        string worldDungeonId = string.Empty;

        GameWebAPI.RespDataWD_DungeonStart respDataWD_DungeonStart = ClassSingleton <QuestData> .Instance.RespDataWD_DungeonStart;
        if (respDataWD_DungeonStart != null)
        {
            worldDungeonId = respDataWD_DungeonStart.worldDungeonId;
        }
        GameWebAPI.RespData_WorldMultiStartInfo respData_WorldMultiStartInfo = DataMng.Instance().RespData_WorldMultiStartInfo;
        if (respData_WorldMultiStartInfo != null)
        {
            worldDungeonId = respData_WorldMultiStartInfo.worldDungeonId;
        }
        GameWebAPI.RespDataMA_GetWorldDungeonM.WorldDungeonM[] worldDungeonM = MasterDataMng.Instance().RespDataMA_WorldDungeonM.worldDungeonM;
        GameWebAPI.RespDataMA_GetWorldDungeonM.WorldDungeonM   masterDungeon = worldDungeonM.SingleOrDefault((GameWebAPI.RespDataMA_GetWorldDungeonM.WorldDungeonM x) => x.worldDungeonId == worldDungeonId);
        GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM[]     worldStageM   = MasterDataMng.Instance().RespDataMA_WorldStageM.worldStageM;
        GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM       worldStageM2  = worldStageM.SingleOrDefault((GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM x) => x.worldStageId == masterDungeon.worldStageId);
        string name = worldStageM2.name;

        this.areaName.text = name;
        string name2   = masterDungeon.name;
        string @string = StringMaster.GetString("BattleResult-01");

        this.stageName.text = string.Format(@string, name2);
    }
    public override void ShowGUI()
    {
        base.ShowGUI();
        if (this.RespDataChatMessageDataResult.type == 3)
        {
            this.ngTX_COMMENT = this.goSYS_TX_COMMENT.GetComponent <UILabel>();
            this.goCONTENT_WRAP.SetActive(false);
            this.goSELF_CONTENT_WRAP.SetActive(false);
        }
        else if (DataMng.Instance().UserId == this.RespDataChatMessageDataResult.userId)
        {
            this.ngTX_USERNAME  = this.goSELF_TX_USERNAME.GetComponent <UILabel>();
            this.ngTX_DATE      = this.goSELF_TX_DATE.GetComponent <UILabel>();
            this.ngTX_COMMENT   = this.goSELF_TX_COMMENT.GetComponent <UILabel>();
            this.ngMONSTER_ICON = this.goSELF_MONSTER_ICON;
            this.ngTITLE_ICON   = this.goSELF_TITLE_ICON;
            this.goCONTENT_WRAP.SetActive(false);
            this.goSYS_CONTENT_WRAP.SetActive(false);
        }
        else
        {
            this.ngTX_USERNAME  = this.goTX_USERNAME.GetComponent <UILabel>();
            this.ngTX_DATE      = this.goTX_DATE.GetComponent <UILabel>();
            this.ngTX_COMMENT   = this.goTX_COMMENT.GetComponent <UILabel>();
            this.ngMONSTER_ICON = this.goMONSTER_ICON;
            this.ngTITLE_ICON   = this.goTITLE_ICON;
            if (this.RespDataChatMessageDataResult.type == 4)
            {
                this.ngMULTICODE_COL  = this.goBG_BALLOON.GetComponent <GUICollider>();
                this.ngMULTICODE_BCOL = this.goBG_BALLOON.GetComponent <BoxCollider>();
            }
            this.goSELF_CONTENT_WRAP.SetActive(false);
            this.goSYS_CONTENT_WRAP.SetActive(false);
        }
        string text = ChatTools.OutputDateCtrl(this.RespDataChatMessageDataResult.createTime);

        if (this.RespDataChatMessageDataResult.type != 3)
        {
            this.ngTX_DATE.text = text;
        }
        BoxCollider component = base.gameObject.GetComponent <BoxCollider>();
        string      text2;

        component.size          = ChatTools.GetColliderSize(this.RespDataChatMessageDataResult, component, CMD_ChatWindow.instance.goBaseTXT, out text2);
        this.listColliderHeight = component.size.y;
        int type = this.RespDataChatMessageDataResult.type;

        if (type != 3)
        {
            if (type != 4)
            {
                this.ngTX_COMMENT.text = text2;
            }
            else
            {
                string[] dungeonIds = text2.Split(new char[]
                {
                    ','
                });
                string arg;
                if (dungeonIds.Length > 2)
                {
                    GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM[]     worldStageM    = MasterDataMng.Instance().RespDataMA_WorldStageM.worldStageM;
                    GameWebAPI.RespDataMA_GetWorldDungeonM.WorldDungeonM[] worldDungeonM  = MasterDataMng.Instance().RespDataMA_WorldDungeonM.worldDungeonM;
                    GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM       worldStageM2   = worldStageM.SingleOrDefault((GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM x) => x.worldStageId == dungeonIds[0]);
                    GameWebAPI.RespDataMA_GetWorldDungeonM.WorldDungeonM   worldDungeonM2 = worldDungeonM.SingleOrDefault((GameWebAPI.RespDataMA_GetWorldDungeonM.WorldDungeonM x) => x.worldDungeonId == dungeonIds[1]);
                    arg = string.Format(StringMaster.GetString("MultiRecruitChat-07"), worldStageM2.name, worldDungeonM2.name);
                    this.multiWorldAreaId    = worldStageM2.worldAreaId;
                    this.multiWorldDungeonId = worldDungeonM2.worldDungeonId;
                    this.multiRoomId         = dungeonIds[2];
                }
                else
                {
                    arg = text2;
                }
                this.ngTX_COMMENT.text  = string.Format(StringMaster.GetString("ChatLog-11"), arg);
                this.ngTX_COMMENT.color = this.multiPassCodeTextColor;
                if (DataMng.Instance().UserId != this.RespDataChatMessageDataResult.userId)
                {
                    this.ngMULTICODE_COL.onTouchEnded += delegate(Touch touch, Vector2 pos, bool flag)
                    {
                        this.OnMultiPassCodeClicked();
                    };
                }
            }
        }
        else
        {
            this.ngTX_COMMENT.text = string.Format("{0}\n{1}", text, text2);
        }
        if (DataMng.Instance().UserId == this.RespDataChatMessageDataResult.userId && this.RespDataChatMessageDataResult.type != 3)
        {
            this.ngTX_COMMENT.pivot = UIWidget.Pivot.Left;
        }
    }
    private void OnPushedAgainCallBack()
    {
        ClassSingleton <PlayLimit> .Instance.ClearTicketNumCont();

        ClassSingleton <PlayLimit> .Instance.ClearPlayLimitNumCont();

        GameWebAPI.WD_Req_DngStart last_dng_req = DataMng.Instance().GetResultUtilData().last_dng_req;
        GameWebAPI.RespDataMA_GetWorldDungeonM.WorldDungeonM[] worldDungeonM = MasterDataMng.Instance().RespDataMA_WorldDungeonM.worldDungeonM;
        int dungeonID = int.Parse(last_dng_req.dungeonId);

        GameWebAPI.RespDataMA_GetWorldDungeonM.WorldDungeonM masterDungeon = worldDungeonM.SingleOrDefault((GameWebAPI.RespDataMA_GetWorldDungeonM.WorldDungeonM x) => x.worldDungeonId == dungeonID.ToString());
        GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM[]   worldStageM   = MasterDataMng.Instance().RespDataMA_WorldStageM.worldStageM;
        GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM     worldStageM2  = worldStageM.SingleOrDefault((GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM x) => x.worldStageId == masterDungeon.worldStageId);
        if (QuestData.IsTicketQuest(worldStageM2.worldAreaId))
        {
            if (this.isMulti && "-1" == last_dng_req.userDungeonTicketId)
            {
                CMD_ModalMessage cmd_ModalMessage = GUIMain.ShowCommonDialog(null, "CMD_ModalMessage", null) as CMD_ModalMessage;
                cmd_ModalMessage.Title = StringMaster.GetString("TicketQuestTitle");
                cmd_ModalMessage.Info  = StringMaster.GetString("MultiParticipateAgainAlert");
                return;
            }
            GameWebAPI.RespDataWD_GetDungeonInfo.Dungeons dng = ClassSingleton <QuestData> .Instance.GetTicketQuestDungeonByTicketID(last_dng_req.userDungeonTicketId);

            int num = int.Parse(dng.dungeonTicketNum);
            if (0 >= num)
            {
                CMD_ModalMessage cmd_ModalMessage2 = GUIMain.ShowCommonDialog(null, "CMD_ModalMessage", null) as CMD_ModalMessage;
                cmd_ModalMessage2.Title = StringMaster.GetString("TicketQuestTitle");
                cmd_ModalMessage2.Info  = StringMaster.GetString("QuestPlayLimitZeroInfo");
            }
            else
            {
                CMD_Confirm cmd_Confirm = GUIMain.ShowCommonDialog(delegate(int idx)
                {
                    if (idx == 0)
                    {
                        ClassSingleton <PlayLimit> .Instance.SetTicketNumCont(dng, ConstValue.PLAYLIMIT_USE_COUNT);
                        if (this.isMulti)
                        {
                            this.RequestDungeonStart();
                        }
                        else
                        {
                            NextChoiceReplay nextChoiceReplay2 = new NextChoiceReplay(new Action(this.RequestDungeonStart));
                            nextChoiceReplay2.Start();
                        }
                    }
                }, "CMD_Confirm", null) as CMD_Confirm;
                cmd_Confirm.Title      = StringMaster.GetString("TicketQuestTitle");
                cmd_Confirm.Info       = string.Format(StringMaster.GetString("TicketQuestConfirmInfo"), worldStageM2.name, num, num - 1);
                cmd_Confirm.BtnTextYes = StringMaster.GetString("SystemButtonYes");
                cmd_Confirm.BtnTextNo  = StringMaster.GetString("SystemButtonClose");
            }
        }
        else
        {
            GameWebAPI.RespDataWD_GetDungeonInfo dngeonInfoByWorldAreaId = ClassSingleton <QuestData> .Instance.GetDngeonInfoByWorldAreaId(worldStageM2.worldAreaId);

            List <QuestData.WorldDungeonData> wdd = ClassSingleton <QuestData> .Instance.GetWorldDungeonData_ByAreaIdStageId(worldStageM2.worldAreaId, masterDungeon.worldStageId, dngeonInfoByWorldAreaId, 0, false, true);

            if (wdd == null)
            {
                CMD_ModalMessage cmd_ModalMessage3 = GUIMain.ShowCommonDialog(null, "CMD_ModalMessage", null) as CMD_ModalMessage;
                cmd_ModalMessage3.Title = StringMaster.GetString("MultiAgainAlertYetClearTitle");
                cmd_ModalMessage3.Info  = StringMaster.GetString("MultiAgainAlertYetClearInfo");
                return;
            }
            int worldDungeonDataIndex = 0;
            for (int i = 0; i < wdd.Count; i++)
            {
                if (wdd[i].dungeon.worldDungeonId.ToString() == masterDungeon.worldDungeonId)
                {
                    worldDungeonDataIndex = i;
                    break;
                }
            }
            if (worldDungeonDataIndex < wdd.Count)
            {
                int usedCT = ConstValue.PLAYLIMIT_USE_COUNT;
                if (this.isMulti && "-1" == last_dng_req.userDungeonTicketId)
                {
                    usedCT = 0;
                }
                bool flag = ClassSingleton <QuestData> .Instance.IsEmptyDng(wdd[worldDungeonDataIndex].dungeon, worldStageM2.worldAreaId);

                if (flag)
                {
                    CMD_ModalMessage cmd_ModalMessage4 = GUIMain.ShowCommonDialog(null, "CMD_ModalMessage", null) as CMD_ModalMessage;
                    cmd_ModalMessage4.Title = StringMaster.GetString("QuestPlayLimitTitle");
                    cmd_ModalMessage4.Info  = StringMaster.GetString("QuestPlayLimitZeroInfo");
                    return;
                }
                if (!ClassSingleton <PlayLimit> .Instance.PlayLimitCheck(wdd[worldDungeonDataIndex].dungeon, delegate(int idx)
                {
                    if (idx == 0)
                    {
                        if (wdd[worldDungeonDataIndex].dungeon.playLimit.recoveryAssetCategoryId == 2)
                        {
                            CMD_Shop cmd = GUIMain.ShowCommonDialog(delegate(int _idx)
                            {
                            }, "CMD_Shop", null) as CMD_Shop;
                            cmd.PartsTitle.SetReturnAct(delegate(int _i_)
                            {
                                cmd.ClosePanel(true);
                            });
                            cmd.PartsTitle.DisableReturnBtn(false);
                            cmd.PartsTitle.SetCloseAct(delegate(int _i_)
                            {
                                this.< ClosePanel > __BaseCallProxy0(false);
                                cmd.SetCloseAction(delegate(int x)
                                {
                                    CMD_BattleNextChoice.GoToFarm();
                                });
                                cmd.ClosePanel(true);
                            });
                        }
                        else if (wdd[worldDungeonDataIndex].dungeon.playLimit.recoveryAssetCategoryId == 6)
                        {
                            GameWebAPI.RespDataMA_GetItemM.ItemM itemM = MasterDataMng.Instance().RespDataMA_ItemM.GetItemM(wdd[worldDungeonDataIndex].dungeon.playLimit.recoveryAssetValue.ToString());
                            CMD_ModalMessage cmd_ModalMessage6 = GUIMain.ShowCommonDialog(null, "CMD_ModalMessage", null) as CMD_ModalMessage;
                            cmd_ModalMessage6.Title = string.Format(StringMaster.GetString("SystemShortage"), itemM.name);
                            cmd_ModalMessage6.Info = string.Format(StringMaster.GetString("QuestPlayLimitItemShortInfo"), itemM.name);
                        }
                    }
                }, delegate(int _idx)
                {
                    ClassSingleton <PlayLimit> .Instance.RecoverPlayLimit(wdd[worldDungeonDataIndex].dungeon, new Action <GameWebAPI.RespDataWD_GetDungeonInfo.Dungeons>(this.OnSuccessedRecoverPlayLimit));
                }, usedCT))
                {
                    return;
                }
                if (this.isMulti)
                {
                    this.RequestDungeonStart();
                }
                else
                {
                    NextChoiceReplay nextChoiceReplay = new NextChoiceReplay(new Action(this.RequestDungeonStart));
                    nextChoiceReplay.Start();
                }
            }
            else
            {
                CMD_ModalMessage cmd_ModalMessage5 = GUIMain.ShowCommonDialog(null, "CMD_ModalMessage", null) as CMD_ModalMessage;
                cmd_ModalMessage5.Title = StringMaster.GetString("MultiAgainAlertYetClearTitle");
                cmd_ModalMessage5.Info  = StringMaster.GetString("MultiAgainAlertYetClearInfo");
            }
        }
    }