Пример #1
0
        private static bool IsLadderInvite()
        {
            if (Singleton <CInviteSystem> .GetInstance().InviteType == COM_INVITE_JOIN_TYPE.COM_INVITE_JOIN_TEAM)
            {
                CMatchingSystem instance = Singleton <CMatchingSystem> .GetInstance();

                if ((instance != null) && (instance.teamInfo.stTeamInfo.bMapType == 3))
                {
                    return(true);
                }
            }
            return(false);
        }
Пример #2
0
        private static bool IsLadderInvite()
        {
            if (Singleton <CInviteSystem> .GetInstance().InviteType == 2)
            {
                CMatchingSystem instance = Singleton <CMatchingSystem> .GetInstance();

                if (instance != null && instance.teamInfo.stTeamInfo.bMapType == 3)
                {
                    return(true);
                }
            }
            return(false);
        }
Пример #3
0
        public static void OnSelfConfirmed(GameObject root, int PlayerNum)
        {
            CMatchingSystem instance = Singleton <CMatchingSystem> .GetInstance();

            instance.confirmPlayerNum++;
            RoomInfo roomInfo = Singleton <CRoomSystem> .GetInstance().roomInfo;

            DebugHelper.Assert(roomInfo != null);
            if (roomInfo != null)
            {
                CMatchingView.UpdateConfirmBox(root, roomInfo.selfInfo.ullUid);
                if (Singleton <CMatchingSystem> .GetInstance().confirmPlayerNum == Singleton <CMatchingSystem> .GetInstance().currentMapPlayerNum)
                {
                    GotoHeroSelectPage();
                }
            }
        }
Пример #4
0
        private static void FakeConfirmLater(int seq)
        {
            if (FakePlayerConfirmNum < (MapPlayerNum / 2))
            {
                int[]             numArray = (MapPlayerNum != 6) ? FAKE_CONFIRM_MAP_5V5 : FAKE_CONFIRM_MAP_3V3;
                FakePlayerConfirm confirm  = FakePlayerList[numArray[FakePlayerConfirmNum]];
                confirm.bConfirmed = true;
                FakePlayerConfirmNum++;
                CMatchingSystem instance = Singleton <CMatchingSystem> .GetInstance();

                instance.confirmPlayerNum++;
                CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CMatchingSystem.PATH_MATCHING_CONFIRMBOX);

                if (form != null)
                {
                    CMatchingView.UpdateConfirmBox(form.gameObject, confirm.FakePlayer.ullUid);
                }
            }
        }
Пример #5
0
        private void BattleAgain(CUIEvent uiEvent)
        {
            this.CloseItemForm();
            if (!Singleton <CBattleGuideManager> .get_instance().bTrainingAdv)
            {
                SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

                if (curLvelContext != null && curLvelContext.IsGameTypeAdventure())
                {
                    CUIEvent cUIEvent = new CUIEvent();
                    Singleton <CAdventureSys> .get_instance().OpenAdvForm(curLvelContext.m_chapterNo, (int)curLvelContext.m_levelNo, curLvelContext.m_levelDifficulty);

                    cUIEvent.m_eventID = enUIEventID.Adv_OpenLevelForm;
                    Singleton <CUIEventManager> .GetInstance().DispatchUIEvent(cUIEvent);
                }
            }
            else
            {
                CMatchingSystem.ReqStartTrainingLevel();
            }
        }
Пример #6
0
        private void BattleAgain(CUIEvent uiEvent)
        {
            this.CloseItemForm();
            if (!Singleton <CBattleGuideManager> .instance.bTrainingAdv)
            {
                SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

                if ((curLvelContext != null) && (curLvelContext.GameType == COM_GAME_TYPE.COM_SINGLE_GAME_OF_ADVENTURE))
                {
                    CUIEvent event2 = new CUIEvent();
                    Singleton <CAdventureSys> .instance.OpenAdvForm(curLvelContext.iChapterNo, curLvelContext.bLevelNo, curLvelContext.difficulty);

                    event2.m_eventID = enUIEventID.Adv_OpenLevelForm;
                    Singleton <CUIEventManager> .GetInstance().DispatchUIEvent(event2);
                }
            }
            else
            {
                CMatchingSystem.ReqStartTrainingLevel();
            }
        }
Пример #7
0
        public static void OnLeaveRoom(CSPkg msg)
        {
            Singleton <CUIManager> .GetInstance().CloseSendMsgAlert();

            if (msg.stPkgData.stQuitMultGameRsp.iErrCode == 0)
            {
                if (msg.stPkgData.stQuitMultGameRsp.bLevelFromType == 1)
                {
                    Singleton <CRoomSystem> .GetInstance().bInRoom = false;

                    Singleton <CUIManager> .GetInstance().CloseForm(PATH_ROOM);

                    Singleton <CTopLobbyEntry> .GetInstance().CloseForm();

                    Singleton <CInviteSystem> .GetInstance().CloseInviteForm();

                    Singleton <CChatController> .instance.model.channelMgr.Clear(EChatChannel.Room, 0L, 0);

                    Singleton <CChatController> .instance.model.channelMgr.SetChatTab(CChatChannelMgr.EChatTab.Normal);

                    Singleton <CChatController> .instance.view.UpView(false);

                    Singleton <CChatController> .instance.model.sysData.ClearEntryText();
                }
                else if (msg.stPkgData.stQuitMultGameRsp.bLevelFromType == 2)
                {
                    CMatchingSystem.OnPlayerLeaveMatching();
                }
            }
            else
            {
                object[] replaceArr = new object[] { Utility.ProtErrCodeToStr(0x400, msg.stPkgData.stQuitMultGameRsp.iErrCode) };
                Singleton <CUIManager> .GetInstance().OpenTips("PVP_Exit_Room_Error", true, 1f, null, replaceArr);
            }
            Singleton <CMatchingSystem> .instance.bPlayerActive = true;
        }
Пример #8
0
 private void BeginMatch()
 {
     CMatchingSystem.ReqStartSingleMatching(CLadderSystem.GetRankBattleMapID(), false, COM_BATTLE_MAP_TYPE.COM_BATTLE_MAP_TYPE_RANK);
 }
 private void SendBeginMatchReq()
 {
     CMatchingSystem.ReqStartSingleMatching(this.m_selectMapID, false, COM_BATTLE_MAP_TYPE.COM_BATTLE_MAP_TYPE_REWARDMATCH);
 }
Пример #10
0
 private void BeginMatch()
 {
     CMatchingSystem.ReqStartSingleMatching(CLevelCfgLogicManager.GetRankBattleMapID(), false, COM_BATTLE_MAP_TYPE.COM_BATTLE_MAP_TYPE_RANK);
 }
Пример #11
0
 private void BeginMatch()
 {
     CMatchingSystem.ReqStartSingleMatching(CLadderSystem.GetRankBattleMapID(), false, 3);
 }