Example #1
0
    private void EndValidate(GameWebAPI.RespData_ColosseumMatchingValidateLogic data)
    {
        MultiTools.DispLoading(false, RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
        int resultCode = data.resultCode;

        switch (resultCode)
        {
        case 92:
            AlertManager.ShowModalMessage(delegate(int modal)
            {
                this.ClosePanel(true);
            }, StringMaster.GetString("ColosseumMockLockTitle"), StringMaster.GetString("ColosseumMockLockInfo"), AlertManager.ButtonActionType.Close, false);
            return;

        default:
            if (resultCode == 1)
            {
                global::Debug.Log("対戦相手UserCode: " + this.pvpMockTargetInput.value);
                ClassSingleton <MultiBattleData> .Instance.MockBattleUserCode = this.pvpMockTargetInput.value;
                ClassSingleton <QuestData> .Instance.SelectDungeon            = null;
                CMD_ColosseumDeck.Create(CMD_ColosseumDeck.Mode.FROM_COLOSSEUM_TOP);
                return;
            }
            break;

        case 94:
            break;
        }
        AlertManager.ShowModalMessage(delegate(int modal)
        {
            this.ClosePanel(true);
        }, StringMaster.GetString("ColosseumMockNotFoundTitle"), StringMaster.GetString("ColosseumMockNotFoundInfo"), AlertManager.ButtonActionType.Close, false);
    }
 private void SetCommonUI()
 {
     this.csMultiRecruitListPanel                    = this.partMultiRecruitParent.GetComponent <GUISelectMultiRecruitListPanel>();
     this.csMultiRecruitListPanel.selectParts        = this.partMultiRecruit;
     this.csMultiRecruitListPanel.ListWindowViewRect = MultiTools.MakeRecruitListRectWindow();
     this.partMultiRecruit.SetActive(false);
 }
Example #3
0
 private void ClickDecisionBtn()
 {
     MultiTools.DispLoading(true, RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
     GameWebAPI.RespData_ColosseumMatchingValidateLogic responseData = null;
     GameWebAPI.ColosseumMatchingValidateLogic          request      = new GameWebAPI.ColosseumMatchingValidateLogic
     {
         SetSendData = delegate(GameWebAPI.ReqData_ColosseumMatchingValidateLogic param)
         {
             param.act            = 1;
             param.isMockBattle   = 1;
             param.targetUserCode = this.pvpMockTargetInput.value;
         },
         OnReceived = delegate(GameWebAPI.RespData_ColosseumMatchingValidateLogic response)
         {
             responseData = response;
         }
     };
     base.StartCoroutine(request.RunOneTime(delegate()
     {
         RestrictionInput.EndLoad();
         this.EndValidate(responseData);
     }, delegate(Exception noop)
     {
         RestrictionInput.EndLoad();
     }, null));
 }
Example #4
0
    private IEnumerator SendMultiRecruitChat()
    {
        MultiTools.DispLoading(true, RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
        foreach (GUIListChatGroupParts chat in this.csPartChatListParent.chatPartsList)
        {
            if (chat.isSelected)
            {
                base.StartCoroutine(Singleton <TCPUtil> .Instance.SendChatMessage(int.Parse(chat.Data.chatGroupId), string.Concat(new string[]
                {
                    CMD_MultiRecruitPartyWait.roomCreateData.multiRoomInfo.worldStageId,
                    ",",
                    CMD_MultiRecruitPartyWait.roomCreateData.multiRoomInfo.worldDungeonId,
                    ",",
                    CMD_MultiRecruitPartyWait.roomCreateData.multiRoomInfo.multiRoomId
                }), 4, null));
                yield return(null);
            }
        }
        MultiTools.DispLoading(false, RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
        yield return(null);

        CMD_ModalMessage cd = GUIMain.ShowCommonDialog(new Action <int>(this.CloseModalMessage), "CMD_ModalMessage", null) as CMD_ModalMessage;

        cd.Title = StringMaster.GetString("MultiRecruitChat-05");
        cd.Info  = StringMaster.GetString("MultiRecruitChat-06");
        yield break;
    }
Example #5
0
    private IEnumerator PlayRankDown()
    {
        this.rankSprite.spriteName = MultiTools.GetPvPRankSpriteName(this.pvpResultData.colosseumRankId);
        SoundMng.Instance().PlaySE("SEInternal/Farm/se_219", 0f, false, true, null, -1, 1f);
        this.PlayRankDownEffect();
        yield return(new WaitForSeconds(1f));

        yield break;
    }
    private void ManageOnlineCheck(object messageObj)
    {
        int valueByKey = MultiTools.GetValueByKey <int>(messageObj, "resultCode");

        global::Debug.LogFormat("[対戦相手のオンラインステータスチェック(080110)]result_code:{0}", new object[]
        {
            valueByKey
        });
        this.returnPvPOnlineCheck = valueByKey;
    }
    private void ManageFailedPlayer(object messageObj)
    {
        string valueByKey = MultiTools.GetValueByKey <string>(messageObj, "resultCode");

        global::Debug.LogFormat("切断時処理(800012) resultCode :{0}", new object[]
        {
            valueByKey
        });
        this.enemyFailedAction = this.EnemyFailedAction();
        AppCoroutine.Start(this.enemyFailedAction, false);
    }
    protected virtual void TCPCallbackMethod(Dictionary <string, object> arg)
    {
        if (!arg.ContainsKey(this.myTCPKey))
        {
            global::Debug.LogWarningFormat("{0} is not valid key.", new object[]
            {
                arg.Keys.First <string>()
            });
            return;
        }
        Dictionary <object, object> dictionary = arg[this.myTCPKey] as Dictionary <object, object>;
        string         text           = dictionary.Keys.First <object>().ToString();
        TCPMessageType tcpMessageType = MultiTools.StringToEnum <TCPMessageType>(text);
        object         messageObj     = dictionary[text];

        this.RunRecieverPlayerActions(tcpMessageType, messageObj);
    }
    private void ManageJudgmentCheck(object messageObj)
    {
        string valueByKey = MultiTools.GetValueByKey <string>(messageObj, "resultCode");

        global::Debug.LogFormat("[試合判定(080120)]result_code:{0}", new object[]
        {
            valueByKey
        });
        this.returnPvPJudgmentCheck = valueByKey.ToInt32();
        if (this.returnPvPJudgmentCheck != 1)
        {
            if (this.returnPvPJudgmentCheck == 2)
            {
                this.ShowWinDialog();
            }
            else if (this.returnPvPJudgmentCheck == 3)
            {
                this.ShowDisconnectTCPDialog(null);
            }
        }
    }
Example #10
0
    private void EndValidate(GameWebAPI.RespData_ColosseumMatchingValidateLogic matchingValidate)
    {
        MultiTools.DispLoading(false, RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
        int resultCode = matchingValidate.resultCode;

        if (resultCode != 1)
        {
            if (resultCode != 93)
            {
            }
            AlertManager.ShowModalMessage(delegate(int modal)
            {
                CMD_ChatTop.instance.OnClickMultiRequestUpdate();
            }, StringMaster.GetString("ColosseumWithdraw"), StringMaster.GetString("ColosseumSelect"), AlertManager.ButtonActionType.Close, false);
        }
        else
        {
            ClassSingleton <QuestData> .Instance.SelectDungeon = null;
            CMD_ColosseumDeck.Create(CMD_ColosseumDeck.Mode.FROM_COLOSSEUM_TOP);
        }
    }
 private void ClickDecisionBtn()
 {
     if (!Singleton <UserDataMng> .Instance.IsOverUnitLimit(ClassSingleton <MonsterUserDataMng> .Instance.GetMonsterNum() + ConstValue.ENABLE_SPACE_TOEXEC_DUNGEON))
     {
         if (!Singleton <UserDataMng> .Instance.IsOverChipLimit(ConstValue.ENABLE_SPACE_TOEXEC_DUNGEON))
         {
             MultiTools.DispLoading(true, RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
             GameWebAPI.MultiRoomJoin request = new GameWebAPI.MultiRoomJoin
             {
                 SetSendData = delegate(GameWebAPI.ReqData_MultiRoomJoin param)
                 {
                     param.roomId   = 0;
                     param.password = this.multiRecruitPassInput.value;
                 },
                 OnReceived = delegate(GameWebAPI.RespData_MultiRoomJoin response)
                 {
                     this.parentDialog.passInputJoinData = response;
                 }
             };
             base.StartCoroutine(request.RunOneTime(delegate()
             {
                 RestrictionInput.EndLoad();
                 this.ClosePanel(true);
             }, delegate(Exception noop)
             {
                 RestrictionInput.EndLoad();
             }, null));
         }
         else
         {
             CMD_UpperlimitChip cmd_UpperlimitChip = GUIMain.ShowCommonDialog(null, "CMD_UpperlimitChip", null) as CMD_UpperlimitChip;
             cmd_UpperlimitChip.SetType(CMD_UpperlimitChip.MessageType.QUEST);
         }
     }
     else
     {
         CMD_UpperLimit cmd_UpperLimit = GUIMain.ShowCommonDialog(null, "CMD_Upperlimit", null) as CMD_UpperLimit;
         cmd_UpperLimit.SetType(CMD_UpperLimit.MessageType.QUEST);
     }
 }
Example #12
0
    private void InitInfo()
    {
        this.multiBattleData    = ClassSingleton <MultiBattleData> .Instance;
        this.isMockBattle       = !(this.multiBattleData.MockBattleUserCode == "0");
        this.previousUserStatus = this.multiBattleData.PvPUserDatas.Where((MultiBattleData.PvPUserData item) => item.userStatus.userId == this.multiBattleData.MyPlayerUserId).Select((MultiBattleData.PvPUserData item) => item.userStatus).First <GameWebAPI.ColosseumUserStatus>();
        this.pvpResultData      = this.multiBattleData.BattleEndResponse;
        foreach (GameWebAPI.RespDataMA_ColosseumRankM.ColosseumRank colosseumRank in MasterDataMng.Instance().RespDataMA_ColosseumRankMaster.colosseumRankM)
        {
            this.rankDataDict.Add(colosseumRank.colosseumRankId, colosseumRank);
        }
        this.getClusterLabel.text  = "0";
        this.fluctuateDpLabel.text = "0";
        GameWebAPI.RespDataMA_ColosseumRankM.ColosseumRank colosseumRank2 = this.rankDataDict[this.previousUserStatus.colosseumRankId.ToString()];
        this.currentDpLabel.text = this.previousUserStatus.score.ToString();
        bool flag = this.multiBattleData.BattleResult == 1;

        if (flag && !this.isMockBattle)
        {
            this.nowTotalWin = this.previousUserStatus.winTotal + 1;
        }
        else
        {
            this.nowTotalWin = this.previousUserStatus.winTotal;
        }
        this.totalWinNum.text = string.Format(StringMaster.GetString("MyColosseumTotalWinNum"), this.nowTotalWin.ToString());
        if (this.isMockBattle)
        {
            this.nextRankupWinNum.text = string.Empty;
        }
        else if (this.pvpResultData.battleRecord != null)
        {
            this.nextRankupWinNum.text = string.Format(StringMaster.GetString("ColosseumRankAGroup"), this.pvpResultData.battleRecord.count, this.pvpResultData.battleRecord.winPercent);
        }
        else
        {
            this.nextRankupWinNum.text = string.Format(StringMaster.GetString("NextRankupNum"), int.Parse(colosseumRank2.maxScore) + 1 - this.nowTotalWin);
        }
        this.rankSprite.spriteName = MultiTools.GetPvPRankSpriteName(int.Parse(colosseumRank2.colosseumRankId));
        this.UpdateItemNum();
    }
    private void ManageRecoverCommunicate(object messageObj)
    {
        int valueByKey = MultiTools.GetValueByKey <int>(messageObj, "resultCode");

        global::Debug.LogFormat("[通信復帰(080112)]result_code:{0}", new object[]
        {
            valueByKey
        });
        if (valueByKey == 1)
        {
            this.isPvPRecoverCommunicateCheck = true;
        }
        else if (valueByKey != 5)
        {
            if (valueByKey == 2 || valueByKey == 6)
            {
                this.isPvPRecoverCommunicateCheck = true;
                this.ShowDisconnectTCPDialog(null);
            }
            else if (valueByKey == 3)
            {
                this.isPvPRecoverCommunicateCheck = true;
                this.ShowWinDialog();
            }
            else if (valueByKey == 4)
            {
                this.isPvPRecoverCommunicateCheck = true;
                this.ShowBackToTitleDialog();
            }
            else
            {
                global::Debug.LogErrorFormat("ありえないキー:{0}.", new object[]
                {
                    valueByKey
                });
            }
        }
    }
    private void ManageBattleActionLog(object messageObj)
    {
        int valueByKey = MultiTools.GetValueByKey <int>(messageObj, "resultCode");

        if (valueByKey == 1)
        {
            global::Debug.LogFormat("[0]成功.", new object[]
            {
                "080114"
            });
        }
        else if (valueByKey == 0)
        {
            global::Debug.LogFormat("[0]失敗.", new object[]
            {
                "080114"
            });
        }
        if (MasterDataMng.Instance().RespDataMA_CodeM.codeM.PVP_BATTLE_ACTION_LOG == 1)
        {
            BattlePvPFunction.battleActionLogResult = valueByKey;
        }
    }
Example #15
0
 private void SetUserInfo(MultiBattleData.PvPUserData userData, PvPVersusInfo6Icon.UserDataUI ui)
 {
     ui.name.text = userData.userStatus.nickname;
     TitleDataMng.SetTitleIcon(userData.userStatus.titleId, ui.title);
     ui.rank.spriteName = MultiTools.GetPvPRankSpriteName(userData.userStatus.colosseumRankId);
     ui.koTitle.text    = StringMaster.GetString("ColosseumScoreTitle");
     ui.koValue.text    = string.Format(StringMaster.GetString("ColosseumScore"), userData.userStatus.winTotal, userData.userStatus.loseTotal);
     ui.dpTitle.text    = StringMaster.GetString("ColosseumDuelPoint");
     ui.dpValue.text    = userData.userStatus.score.ToString();
     for (int i = 0; i < userData.monsterData.Length; i++)
     {
         GUIMonsterIcon guimonsterIcon = ui.icons[i];
         if (ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(userData.monsterData[i].userMonsterId) != null)
         {
             guimonsterIcon.Data = ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(userData.monsterData[i].userMonsterId);
         }
         else
         {
             guimonsterIcon.Data = userData.monsterData[i].ToMonsterData();
         }
         guimonsterIcon.SetTouchAct_L(null);
         guimonsterIcon.SetTouchAct_S(null);
     }
 }
Example #16
0
    private void OnClickedInfo()
    {
        bool flag = false;

        if (CMD_ChatTop.instance != null)
        {
            flag = CMD_ChatTop.instance.isRecruitListLock;
        }
        else if (null != this.parentDialog)
        {
            flag = this.parentDialog.isRecruitListLock;
        }
        if (!flag)
        {
            if (!this.isOpenedQuest)
            {
                AlertManager.ShowModalMessage(delegate(int modal)
                {
                }, StringMaster.GetString("Recruit-04"), StringMaster.GetString("Recruit-05"), AlertManager.ButtonActionType.Close, false);
                return;
            }
            if (!Singleton <UserDataMng> .Instance.IsOverUnitLimit(ClassSingleton <MonsterUserDataMng> .Instance.GetMonsterNum() + ConstValue.ENABLE_SPACE_TOEXEC_DUNGEON))
            {
                if (!Singleton <UserDataMng> .Instance.IsOverChipLimit(ConstValue.ENABLE_SPACE_TOEXEC_DUNGEON))
                {
                    MultiTools.DispLoading(true, RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
                    GameWebAPI.RespDataWD_GetDungeonInfo respDataWD_GetDungeonInfo = new GameWebAPI.RespDataWD_GetDungeonInfo();
                    respDataWD_GetDungeonInfo = ClassSingleton <QuestData> .Instance.GetDngeonInfoByWorldAreaId(this.data.worldAreaId);

                    if (respDataWD_GetDungeonInfo != null)
                    {
                        foreach (GameWebAPI.RespDataWD_GetDungeonInfo.WorldDungeonInfo worldDungeonInfo2 in respDataWD_GetDungeonInfo.worldDungeonInfo)
                        {
                            foreach (GameWebAPI.RespDataWD_GetDungeonInfo.Dungeons dungeons2 in worldDungeonInfo2.dungeons)
                            {
                                if (dungeons2.worldDungeonId == int.Parse(this.data.worldDungeonId))
                                {
                                    ClassSingleton <PartyBossIconsAccessor> .Instance.StageEnemies = dungeons2.encountEnemies;
                                }
                            }
                        }
                        ClassSingleton <QuestData> .Instance.SelectDungeon = ClassSingleton <QuestData> .Instance.GetWorldDungeonMaster(this.data.worldDungeonId);

                        DataMng.Instance().GetResultUtilData().SetLastDngReq(this.data.worldDungeonId, "-1", "-1");
                        GameWebAPI.MultiRoomJoin multiRoomJoin = new GameWebAPI.MultiRoomJoin();
                        multiRoomJoin.SetSendData = delegate(GameWebAPI.ReqData_MultiRoomJoin param)
                        {
                            param.roomId   = int.Parse(this.data.multiRoomId);
                            param.password = string.Empty;
                        };
                        multiRoomJoin.OnReceived = delegate(GameWebAPI.RespData_MultiRoomJoin response)
                        {
                            CMD_MultiRecruitPartyWait.roomJoinData = response;
                        };
                        GameWebAPI.MultiRoomJoin request = multiRoomJoin;
                        base.StartCoroutine(request.RunOneTime(delegate()
                        {
                            RestrictionInput.EndLoad();
                            CMD_MultiRecruitPartyWait.UserType    = CMD_MultiRecruitPartyWait.USER_TYPE.MEMBER;
                            CMD_MultiRecruitPartyWait.StageDataBk = this.data;
                            CMD_MultiRecruitPartyWait cmd_MultiRecruitPartyWait = GUIMain.ShowCommonDialog(null, "CMD_MultiRecruitPartyWait", null) as CMD_MultiRecruitPartyWait;
                            cmd_MultiRecruitPartyWait.SetParentDialog(this.parentDialog);
                        }, delegate(Exception noop)
                        {
                            RestrictionInput.EndLoad();
                            if (null != this.parentDialog)
                            {
                                this.parentDialog.AddExcludeRoomIdList(this.data.multiRoomId);
                                this.parentDialog.ReBuildMultiRecruitList();
                            }
                        }, null));
                    }
                    else
                    {
                        CMD_ModalMessage cmd_ModalMessage = GUIMain.ShowCommonDialog(null, "CMD_ModalMessage", null) as CMD_ModalMessage;
                        cmd_ModalMessage.Title = StringMaster.GetString("QuestEventTitle");
                        cmd_ModalMessage.Info  = StringMaster.GetString("QuestEventInfo2");
                    }
                }
                else
                {
                    CMD_UpperlimitChip cmd_UpperlimitChip = GUIMain.ShowCommonDialog(null, "CMD_UpperlimitChip", null) as CMD_UpperlimitChip;
                    cmd_UpperlimitChip.SetType(CMD_UpperlimitChip.MessageType.QUEST);
                }
            }
            else
            {
                CMD_UpperLimit cmd_UpperLimit = GUIMain.ShowCommonDialog(null, "CMD_Upperlimit", null) as CMD_UpperLimit;
                cmd_UpperLimit.SetType(CMD_UpperLimit.MessageType.QUEST);
            }
        }
    }
 public override void Show(Action <int> f, float sizeX, float sizeY, float aT)
 {
     MultiTools.DispLoading(true, RestrictionInput.LoadType.SMALL_IMAGE_MASK_OFF);
     base.HideDLG();
     base.StartCoroutine(this.InitFriendUI(f, sizeX, sizeY, aT));
 }
Example #18
0
 public override void Show(Action <int> f, float sizeX, float sizeY, float aT)
 {
     MultiTools.DispLoading(true, RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
     base.HideDLG();
     this.InitChatListUI(f, sizeX, sizeY, aT);
 }