Exemplo n.º 1
0
    private void _Packet(ScTeamPveMatchSuccess msg)
    {
        moduleGlobal.UnLockUI();

        if (msg.result == 10)
        {
            moduleGlobal.CheckSourceMd5();
            return;
        }
        else if (msg.result == 0)
        {
            roomId  = msg.roomId;
            StageId = msg.stageId;
            Array.Resize(ref matchInfos, msg.teamFriend.Length);
            for (var i = 0; i < msg.teamFriend.Length; i++)
            {
                matchInfos[i] = msg.teamFriend[i].Clone();
                if (matchInfos[i].roleId == modulePlayer.id_)
                {
                    if (CurrentTask?.taskType == TaskType.Awake)
                    {
                        HandleTasks(matchInfos[i].stageInfo);
                    }
                    else if (CurrentTask?.taskType == TaskType.Nightmare)
                    {
                        var task = Array.Find(matchInfos[i].stageInfo, item => item.taskId == CurrentTask.taskConfigInfo.ID);
                        if (task != null)
                        {
                            var t = moduleChase.CanEnterNightmareList.Find(item => item.taskConfigInfo.ID == CurrentTask.taskConfigInfo.ID);
                            if (t != null)
                            {
                                t.taskData = task;
                            }
                        }
                    }
                    if (CurrentTask != null)
                    {
                        var _task = matchInfos[i].stageInfo.Find((p) => p.taskId == CurrentTask.taskData.taskId);
                        if (_task != null)
                        {
                            CurrentTask.taskData = _task;
                        }
                    }

                    enterTimes = matchInfos[i].enterTimes;
                }
            }
        }
        else
        {
            ClearMatchInfo();
        }

        DispatchModuleEvent(Notice_MatchSuccess, msg);
    }
Exemplo n.º 2
0
    private void OnMatchSuccess(ScTeamPveMatchSuccess msg)
    {
        if (msg.result != 0)
        {
            return;
        }
        UpdateTaskList();
        RefreshMember();

        broadButton.SafeSetActive(moduleAwakeMatch.MasterIsCaptain);
    }
Exemplo n.º 3
0
    private void OnMatchSuccess(ScTeamPveMatchSuccess msg)
    {
        if (msg.result == 3)
        {
            Window_Alert.ShowAlertDefalut(ConfigText.GetDefalutString((int)TextForMatType.AwakeStage, 10),
                                          () => { moduleAwakeMatch.Request_EnterRoom(false, currentTask); },
                                          () => Hide());
            return;
        }

        if (msg.result != 0)
        {
            moduleGlobal.ShowMessage(9806, msg.result);
            return;
        }
        Hide();

        ShowAsync <Window_TeamMatch>();
    }