void Awake() { updatePreclist = new List <UpdatePrec>(); m_bInitHandler = false; GameMatch curMatch = GameSystem.Instance.mClient.mCurMatch; if (curMatch != null && curMatch.leagueType != GameMatch.LeagueType.ePVP && (curMatch.leagueType != GameMatch.LeagueType.eRegular1V1 || curMatch.GetMatchType() == GameMatch.Type.eCareer3On3) && (curMatch.leagueType != GameMatch.LeagueType.eQualifyingNew || curMatch.GetMatchType() == GameMatch.Type.eCareer3On3)) { PlayerManager pm = GameSystem.Instance.mClient.mPlayerManager; single = pm.m_Players.Count <= 2; } Tip = transform.FindChild("Window/Bottom/Tip").GetComponent <UILabel>(); TipSimple = transform.FindChild("Window/Bottom/Tip_Simple").GetComponent <UILabel>(); Title = transform.FindChild("Window/Top/TopBG/Icon").GetComponent <UISprite>(); MyTeamName = transform.FindChild("Window/Top/WeName").GetComponent <UILabel>(); RivalTeamName = transform.FindChild("Window/Top/TheyName").GetComponent <UILabel>(); //MyTeamRoles = transform.FindChild("Window/Middle/Left/Grid").GetComponent<UIGrid>(); //RivalTeamRoles = transform.FindChild("Window/Middle/Right/Grid").GetComponent<UIGrid>(); SingleBaseBg = transform.FindChild("Window/Middle/NarrowBase").gameObject; MultiBaseBg = transform.FindChild("Window/Middle/WideBase").gameObject; LblNarrowTip = SingleBaseBg.transform.FindChild("Tip").GetComponent <UILabel> (); LblMultiBaseTip = MultiBaseBg.transform.FindChild("Tip").GetComponent <UILabel> (); Window = transform.FindChild("Window").gameObject; BG = transform.FindChild("Window/Bg").gameObject.GetComponent <UITexture>(); BGSimple = transform.FindChild("Window/Bg_Simple").gameObject.GetComponent <UITexture>(); foreach (KeyValuePair <uint, List <LuaComponent> > items in mapPlayerIdLoadingState) { items.Value.Clear(); } mapPlayerIdLoadingState.Clear(); NetworkConn conn = GameSystem.Instance.mNetworkManager.m_platConn; if (conn != null) { conn.EnableTimeout(false); } conn = GameSystem.Instance.mNetworkManager.m_gameConn; if (conn != null) { conn.EnableTimeout(false); } GameSystem.Instance.mClient.mUIManager.isInMatchLoading = true; m_curLoadingStep = LoadingStep.eInit; }
private void OnExit(GameObject go) { GameMatch curMatch = GameSystem.Instance.mClient.mCurMatch; if (curMatch.GetMatchType() != GameMatch.Type.ePVP_1PLUS && curMatch.GetMatchType() != GameMatch.Type.ePVP_3On3) { GameSystem.Instance.mClient.pause = true; } PopPauseDlg(UIManager.Instance.m_uiRootBasePanel.transform, OnConfirmExit, OnCancelExit); }
void _OnTriggerStay(Player player) { GameMatch match = GameSystem.Instance.mClient.mCurMatch; if (match == null) { return; } if (match.GetMatchType() != GameMatch.Type.eBullFight && match.GetMatchType() != GameMatch.Type.eCareer3On3 && match.GetMatchType() != GameMatch.Type.eAsynPVP3On3 && match.GetMatchType() != GameMatch.Type.e3AIOn3AI && match.GetMatchType() != GameMatch.Type.e3On3 && match.GetMatchType() != GameMatch.Type.ePVP_3On3 && match.GetMatchType() != GameMatch.Type.ePVP_1PLUS && match.GetMatchType() != GameMatch.Type.eUltimate21 && match.GetMatchType() != GameMatch.Type.eGrabZone && match.GetMatchType() != GameMatch.Type.ePractise) { return; } //if( match.m_mainRole != m_Owner && !m_Owner.m_bIsAI ) // return; if (m_Owner.m_StateMachine.m_curState.m_eState == PlayerState.State.eFallLostBall || m_Owner.m_StateMachine.m_curState.m_eState == PlayerState.State.eKnocked) { return; } if (m_Owner.m_aiMgr != null && m_Owner.m_aiMgr.m_curState != null) { m_Owner.m_aiMgr.m_curState.OnPlayerCollided(player); } if (match.GetMatchType() == GameMatch.Type.eGrabZone || match.GetMatchType() == GameMatch.Type.ePractise) { return; } bool isStayed = false; isColliderStayed.TryGetValue(player, out isStayed); if (isStayed) { return; } isColliderStayed[player] = true; PlayerState.State curPlayerState = m_Owner.m_StateMachine.m_curState.m_eState; PlayerState.State curCollidePlayerState = player.m_StateMachine.m_curState.m_eState; IM.Vector3 dirPlayerToCollide = GameUtils.HorizonalNormalized(m_Owner.position, player.position); IM.Number fAngle = IM.Vector3.Angle(m_Owner.forward, dirPlayerToCollide); if (fAngle < new IM.Number(60) && m_Owner.m_team.m_side != player.m_team.m_side ) { if ( curPlayerState == PlayerState.State.eBackTurnRun || curPlayerState == PlayerState.State.eCutIn || curPlayerState == PlayerState.State.eRush) { //突破/空切倒地几率=0.2+(防守者身体强度-突破者身体强度)*0.0004 Dictionary <string, uint> playerData = m_Owner.m_finalAttrs; Dictionary <string, uint> colPlayerData = player.m_finalAttrs; if (playerData == null || colPlayerData == null) { Debug.LogError("Can not build player: " + m_Owner.m_name + " ,can not fight state by id: " + m_Owner.m_id); Debug.LogError("Can not build player: " + player.m_name + " ,can not fight state by id: " + player.m_id); return; } GameMatch curMatch = GameSystem.Instance.mClient.mCurMatch; uint strength = 0; player.m_skillSystem.HegdingToValue("addn_strength", ref strength); IM.Number colPlayerStrength = (colPlayerData["strength"] + strength) * curMatch.GetAttrReduceScale("strength", player); m_Owner.m_skillSystem.HegdingToValue("addn_strength", ref strength); IM.Number playerStrength = (playerData["strength"] + strength) * curMatch.GetAttrReduceScale("strength", m_Owner); IM.Number fRate = hedging.Calc(playerStrength, colPlayerStrength); fRate = IM.Number.one - fRate; IM.Number fRandom = IM.Random.value; if (curPlayerState == PlayerState.State.eBackTurnRun) { IM.Number uRate = fRate; bool sumValue = random.AdjustRate(ref uRate); m_Owner.m_StateMachine.SetState(fRandom < fRate ? PlayerState.State.eFallLostBall : PlayerState.State.eKnocked); if (fRandom < fRate && sumValue) { random.SumValue(); } } else if (curPlayerState == PlayerState.State.eCutIn) { fRate *= IM.Number.half; m_Owner.m_StateMachine.SetState(fRandom < fRate ? PlayerState.State.eFallGround : PlayerState.State.eKnocked); } else if (curPlayerState == PlayerState.State.eRush) { fRate *= new IM.Number(0, 300); //防守者不被撞,无人持球时不被撞 if (match.mCurScene.mBall.m_owner != null && m_Owner.m_team.m_role == GameMatch.MatchRole.eOffense) { if (fRandom < fRate) { m_Owner.m_StateMachine.SetState(m_Owner.m_bWithBall ? PlayerState.State.eFallLostBall : PlayerState.State.eFallGround); } else { m_Owner.m_StateMachine.SetState(PlayerState.State.eKnocked); } } } //Debugger.Instance.m_steamer.message = "Player: " + m_Owner.m_name + " strength: " + playerData["strength"]; //Debugger.Instance.m_steamer.message += " Collided Player: " + colPlayer.m_Owner.m_name + " strength: " + colPlayerData["strength"]; //Debugger.Instance.m_steamer.message += " Collide fall down rate: " + fRate + " Random: " + fRandom; } } }
private void ExitMatch() { PlatNetwork.Instance.onReconnected -= ExitMatch; GameMatch curMatch = GameSystem.Instance.mClient.mCurMatch; GameMatch.LeagueType type = curMatch.leagueType; if (type == GameMatch.LeagueType.eCareer) { EndSectionMatch career = new EndSectionMatch(); career.session_id = curMatch.m_config.session_id; ExitGameReq req = new ExitGameReq(); req.acc_id = MainPlayer.Instance.AccountID; req.type = MatchType.MT_CAREER; req.exit_type = ExitMatchType.EMT_OPTION; req.career = career; GameSystem.Instance.mNetworkManager.m_platConn.SendPack(0, req, MsgID.ExitGameReqID); GameSystem.Instance.mClient.mUIManager.curLeagueType = curMatch.leagueType; } else if (type == GameMatch.LeagueType.ePractise1vs1) { EndPracticePve endPracticePve = new EndPracticePve(); endPracticePve.session_id = curMatch.m_config.session_id; endPracticePve.main_role_side = 0; //Ö÷¶ÓOr¿Í¶Ó endPracticePve.score_home = (uint)curMatch.m_homeScore; //Ö÷¶ÓµÃ·Ö endPracticePve.score_away = (uint)curMatch.m_awayScore; //¿Í¶ÓµÃ·Ö ExitGameReq req = new ExitGameReq(); req.acc_id = MainPlayer.Instance.AccountID; req.type = MatchType.MT_PRACTICE_1V1; req.exit_type = ExitMatchType.EMT_OPTION; req.practice_pve = endPracticePve; GameSystem.Instance.mNetworkManager.m_platConn.SendPack(0, req, MsgID.ExitGameReqID); GameSystem.Instance.mClient.mUIManager.curLeagueType = curMatch.leagueType; } else if (type == GameMatch.LeagueType.eQualifying) { QualifyingEndReq qualifying = new QualifyingEndReq(); qualifying.session_id = curMatch.m_config.session_id; qualifying.type = MatchType.MT_QUALIFYING; ExitGameReq req = new ExitGameReq(); req.acc_id = MainPlayer.Instance.AccountID; req.type = MatchType.MT_QUALIFYING; req.exit_type = ExitMatchType.EMT_OPTION; req.qualifying = qualifying; GameSystem.Instance.mNetworkManager.m_platConn.SendPack(0, req, MsgID.ExitGameReqID); GameSystem.Instance.mClient.mUIManager.curLeagueType = curMatch.leagueType; } else if (type == GameMatch.LeagueType.eTour) { //TourExitReq req = new TourExitReq(); //req.session_id = curMatch.m_config.session_id; TourEndReq tour = new TourEndReq(); tour.session_id = curMatch.m_config.session_id; ExitGameReq req = new ExitGameReq(); req.acc_id = MainPlayer.Instance.AccountID; req.type = MatchType.MT_TOUR; req.exit_type = ExitMatchType.EMT_OPTION; req.tour = tour; GameSystem.Instance.mNetworkManager.m_platConn.SendPack(0, req, MsgID.ExitGameReqID); MainPlayer.Instance.TourFailTimes++; LuaInterface.LuaTable table = LuaScriptMgr.Instance.lua.NewTable(); table.Set("uiBack", (object)"UICompetition"); LuaScriptMgr.Instance.CallLuaFunction("jumpToUI", new object[] { curMatch.leagueType, null, table }); } else if (type == GameMatch.LeagueType.ePVP) { ExitGameReq req = new ExitGameReq(); req.acc_id = MainPlayer.Instance.AccountID; req.type = GameMatch_PVP.ToMatchType(curMatch.leagueType, curMatch.m_config.type); req.exit_type = ExitMatchType.EMT_OPTION; if (GameSystem.Instance.mNetworkManager.m_gameConn != null) { Debug.Log("send exit game req"); GameSystem.Instance.mNetworkManager.m_gameConn.SendPack(0, req, MsgID.ExitGameReqID); } GameSystem.Instance.mClient.mUIManager.curLeagueType = curMatch.leagueType; LuaInterface.LuaTable table = LuaScriptMgr.Instance.lua.NewTable(); if (req.type == MatchType.MT_PVP_1V1_PLUS) { if (GameSystem.Instance.mNetworkManager.m_gameConn == null) { table.Set("uiBack", (object)"UIPVPEntrance"); LuaScriptMgr.Instance.CallLuaFunction("jumpToUI", new object[] { "UI1V1Plus", null, table }); } } else if (req.type == MatchType.MT_PVP_3V3) { table.Set("nextShowUI", (object)"UIPVPEntrance"); LuaScriptMgr.Instance.CallLuaFunction("jumpToUI", new object[] { "UIChallenge", null, table }); } } else if (type == GameMatch.LeagueType.eRegular1V1) { ExitGameReq req = new ExitGameReq(); req.acc_id = MainPlayer.Instance.AccountID; req.type = MatchType.MT_REGULAR_RACE; req.exit_type = ExitMatchType.EMT_OPTION; req.regular = new PVPEndRegularReq(); req.regular.session_id = curMatch.m_config.session_id; if (curMatch.GetMatchType() == GameMatch.Type.ePVP_1PLUS) { if (GameSystem.Instance.mNetworkManager.m_gameConn != null) { Debug.Log("send exit game req to game server"); GameSystem.Instance.mNetworkManager.m_gameConn.SendPack(0, req, MsgID.ExitGameReqID); } } else if (curMatch.GetMatchType() == GameMatch.Type.eAsynPVP3On3) { req.regular.rival_score = (curMatch as GameMatch_AsynPVP3ON3).GetRivalScore(); GameSystem.Instance.mNetworkManager.m_platConn.SendPack(0, req, MsgID.ExitGameReqID); } else { Debug.Log("send exit game req to plat server"); GameSystem.Instance.mNetworkManager.m_platConn.SendPack(0, req, MsgID.ExitGameReqID); } } else if (type == GameMatch.LeagueType.eQualifyingNew) { ExitGameReq req = new ExitGameReq(); req.acc_id = MainPlayer.Instance.AccountID; req.type = MatchType.MT_QUALIFYING_NEW; req.exit_type = ExitMatchType.EMT_OPTION; req.qualifying_new = new PVPEndQualifyingReq(); req.qualifying_new.session_id = curMatch.m_config.session_id; if (curMatch.GetMatchType() == GameMatch.Type.ePVP_1PLUS) { if (GameSystem.Instance.mNetworkManager.m_gameConn != null) { Debug.Log("send exit game req to game server"); GameSystem.Instance.mNetworkManager.m_gameConn.SendPack(0, req, MsgID.ExitGameReqID); } } else if (curMatch.GetMatchType() == GameMatch.Type.eAsynPVP3On3) { req.qualifying_new.rival_score = (curMatch as GameMatch_AsynPVP3ON3).GetRivalScore(); GameSystem.Instance.mNetworkManager.m_platConn.SendPack(0, req, MsgID.ExitGameReqID); } else { Debug.Log("send exit game req to plat server"); GameSystem.Instance.mNetworkManager.m_platConn.SendPack(0, req, MsgID.ExitGameReqID); } } else if (type == GameMatch.LeagueType.ePractise) { EndPractice practice = new EndPractice(); practice.session_id = curMatch.m_config.session_id; ExitGameReq req = new ExitGameReq(); req.acc_id = MainPlayer.Instance.AccountID; req.type = MatchType.MT_PRACTICE; req.exit_type = ExitMatchType.EMT_OPTION; req.practice = practice; GameSystem.Instance.mNetworkManager.m_platConn.SendPack(0, req, MsgID.ExitGameReqID); } else if (type == GameMatch.LeagueType.eBullFight) { LuaInterface.LuaTable table = LuaScriptMgr.Instance.lua.NewTable(); table.Set("uiBack", (object)"UICompetition"); LuaScriptMgr.Instance.CallLuaFunction("jumpToUI", new object[] { curMatch.leagueType, null, table }); } else { LuaInterface.LuaTable table = LuaScriptMgr.Instance.lua.NewTable(); table.Set("uiBack", (object)"UICompetition"); LuaScriptMgr.Instance.CallLuaFunction("jumpToUI", new object[] { curMatch.leagueType, null, table }); } curMatch.m_stateMachine.m_curState.OnExit(); GameSystem.Instance.mClient.pause = false; }
void _UpdateValidCommand(GameMatch match) { validCmdList.Clear(); if (player == null) { return; } bool bOffense = (player.m_team.m_role == GameMatch.MatchRole.eOffense); UBasketball ball = match.mCurScene.mBall; UBasket basket = match.mCurScene.mBasket; bool hasTeamMate = player.m_team.GetMemberCount() > 1; if (bOffense) { if (player.m_bWithBall) { if (hasTeamMate && match.IsCommandValid(Command.Pass)) { validCmdList.Add(Command.Pass); } if (match.IsCommandValid(Command.Shoot)) { validCmdList.Add(Command.Shoot); } if (player.m_position == PositionType.PT_C || player.m_position == PositionType.PT_PF) { if (match.IsCommandValid(Command.BackToBack)) { validCmdList.Add(Command.BackToBack); } } else { if (match.IsCommandValid(Command.CrossOver)) { validCmdList.Add(Command.CrossOver); } } } else { if (ball != null) { if (ball.m_owner != null || ball.m_ballState == BallState.eUseBall_Pass) { if (match.IsCommandValid(Command.RequireBall)) { validCmdList.Add(Command.RequireBall); } } if (ball.m_owner != null && ball.m_ballState != BallState.eUseBall_Pass) { if (match.IsCommandValid(Command.PickAndRoll)) { validCmdList.Add(Command.PickAndRoll); } } } if (match.IsCommandValid(Command.CutIn)) { validCmdList.Add(Command.CutIn); } } if (ball == null || (ball.m_ballState != BallState.eLoseBall && ball.m_ballState != BallState.eRebound)) { if (match.IsCommandValid(Command.Rush)) { validCmdList.Add(Command.Rush); } } } //defense else { if (ball != null) { if (ball.m_ballState == BallState.eUseBall || ball.m_ballState == BallState.eUseBall_Pass || ball.m_ballState == BallState.eUseBall_Shoot) { if (match.IsCommandValid(Command.Rush) && match.GetMatchType() == GameMatch.Type.ePVP_3On3) { validCmdList.Add(Command.Rush); } if (match.IsCommandValid(Command.Defense)) { validCmdList.Add(Command.Defense); } } if (ball != null && ball.m_owner != null && match.IsCommandValid(Command.Steal) || (ball.m_ballState == BallState.eUseBall_Pass)) { validCmdList.Add(Command.Steal); } if (ball != null && (ball.m_ballState == BallState.eUseBall || ball.m_ballState == BallState.eUseBall_Shoot)) { if (match.IsCommandValid(Command.Block)) { validCmdList.Add(Command.Block); } } } if (hasTeamMate && match.IsCommandValid(Command.Switch)) { validCmdList.Add(Command.Switch); } } if (ball != null && ball.m_ballState == BallState.eLoseBall) { if (match.GetMatchType() == GameMatch.Type.ePVP_3On3) { if (match.IsCommandValid(Command.Rush)) { validCmdList.Add(Command.Rush); } } else { if (match.IsCommandValid(Command.TraceBall)) { validCmdList.Add(Command.TraceBall); } } if (hasTeamMate && match.IsCommandValid(Command.Switch)) { validCmdList.Add(Command.Switch); } if (player.m_position == PositionType.PT_SG || player.m_position == PositionType.PT_PG) { if (match.IsCommandValid(Command.BodyThrowCatch)) { validCmdList.Add(Command.BodyThrowCatch); } } } if (ball != null && (ball.m_ballState == BallState.eLoseBall || ball.m_ballState == BallState.eRebound || ball.m_ballState == BallState.eNone)) { if (hasTeamMate && match.IsCommandValid(Command.Switch)) { validCmdList.Add(Command.Switch); } } MatchState curMatchState = match.m_stateMachine.m_curState; if (!player.m_bWithBall && (ball != null && ball.m_ballState == BallState.eRebound || (curMatchState != null && curMatchState.m_eState == MatchState.State.eTipOff))) { if (match.IsCommandValid(Command.Rebound)) { validCmdList.Add(Command.Rebound); } //float fDist = GameUtils.HorizonalDistance(player.position, basket.m_vShootTarget).ToUnity(); //if( fDist < 3.0f ) // m_validCmdList.Add(Command.JockeyForPosition); } if (match.m_uiController != null) { match.m_uiController.UpdateBtnCmd(); } }
public void Refresh(bool bOnlyPic) { int id = Random.Range(1, 26); string str = "STR_LOADING_TIPS_" + id; Tip.text = CommonFunction.GetConstString(str); TipSimple.text = CommonFunction.GetConstString(str); LblNarrowTip.text = TipSimple.text; LblMultiBaseTip.text = TipSimple.text; if (bOnlyPic) { GetComponent <Animator>().enabled = false; NGUITools.SetActiveChildren(Window, false); ResourceLoadManager.Instance.LoadAloneImage(GameSystem.Instance.CommonConfig.GetString("gPracticeBg"), _OnLoadTexFinish); if (GameSystem.Instance.isNewPlayer) { BGSimple.gameObject.SetActive(false); TipSimple.gameObject.SetActive(false); } } else { TipSimple.gameObject.SetActive(false); BGSimple.gameObject.SetActive(false); GameMatch curMatch = GameSystem.Instance.mClient.mCurMatch; Title.spriteName = curMatch.LeagueTypeToSpriteName(); Title.MakePixelPerfect(); Debug.Log("Refresh team"); if (pvp) { if (myName != null && rivalName != null) { MyTeamName.text = myName; RivalTeamName.text = rivalName; } RefreshMyTeam_PVP(); RefreshRivalTeam_PVP(); GameMatch_PVP match_pvp = curMatch as GameMatch_PVP; if (curMatch.leagueType == GameMatch.LeagueType.eQualifyingNewer || curMatch.leagueType == GameMatch.LeagueType.ePVP ) { MyTeamName.text = CommonFunction.GetConstString("STR_HOME"); RivalTeamName.text = CommonFunction.GetConstString("STR_PEER"); } } else { if (curMatch.leagueType == GameMatch.LeagueType.eRegular1V1 && curMatch.GetMatchType() == GameMatch.Type.eCareer3On3) { MyTeamName.text = MainPlayer.Instance.Name; RivalTeamName.text = (string)(LuaScriptMgr.Instance.GetLuaTable("Regular1V1Handler")["npcRivalName"]); } else if (curMatch.leagueType == GameMatch.LeagueType.eQualifyingNew && curMatch.GetMatchType() == GameMatch.Type.eCareer3On3) { MyTeamName.text = MainPlayer.Instance.Name; RivalTeamName.text = (string)(LuaScriptMgr.Instance.GetLuaTable("UIQualifyingNew")["npcRivalName"]); } RefreshMyTeam(); RefreshRivalTeam(); } SetTeamMatesName(); SetRivalName(); SetTeamMatesScore(); SetRivalScore(); LoadScene(); } }
private void ShowOffLine() { UIEventListener.VoidDelegate onConfirmExit = (GameObject go) => { UIManager uiManager = GameSystem.Instance.mClient.mUIManager; GameMatch match = GameSystem.Instance.mClient.mCurMatch; if (match.leagueType == GameMatch.LeagueType.eRegular1V1) { LuaScriptMgr.Instance.CallLuaFunction("jumpToUI", "UIHall"); } else if (match.leagueType == GameMatch.LeagueType.eQualifyingNew) { LuaScriptMgr.Instance.CallLuaFunction("jumpToUI", "UIQualifyingNew"); } else if (match.GetMatchType() == GameMatch.Type.ePVP_1PLUS) { LuaInterface.LuaTable table = LuaScriptMgr.Instance.lua.NewTable(); table.Set("uiBack", (object)"UIPVPEntrance"); table.Set("autoMatch", (object)true); LuaScriptMgr.Instance.CallLuaFunction("jumpToUI", new object[] { "UI1V1Plus", null, table }); } else if (match.GetMatchType() == GameMatch.Type.ePVP_3On3) { LuaInterface.LuaTable table = LuaScriptMgr.Instance.lua.NewTable(); // table.Set("nextShowUI", (object)"UIPVPEntrance"); // table.Set("autoMatch", (object)true); LuaScriptMgr.Instance.CallLuaFunction("jumpToUI", new object[] { "UIHall", null, table }); } }; bool isNotify = false; if (!string.IsNullOrEmpty(pvpPlusEndResp.off_name)) { CommonFunction.ShowPopupMsg(string.Format(CommonFunction.GetConstString("STR_PVP_DISCONNECT"), pvpPlusEndResp.off_name), UIManager.Instance.m_uiRootBasePanel.transform, onConfirmExit); isNotify = true; } else if (!string.IsNullOrEmpty(pvpExEndResp.off_name)) { CommonFunction.ShowPopupMsg(string.Format(CommonFunction.GetConstString("STR_PVP_DISCONNECT"), pvpExEndResp.off_name), UIManager.Instance.m_uiRootBasePanel.transform, onConfirmExit); isNotify = true; } else if (!string.IsNullOrEmpty(qualifyingNewerResp.off_name)) { CommonFunction.ShowPopupMsg(string.Format(CommonFunction.GetConstString("STR_PVP_DISCONNECT"), qualifyingNewerResp.off_name), UIManager.Instance.m_uiRootBasePanel.transform, onConfirmExit); isNotify = true; } else if (!string.IsNullOrEmpty(pvpRegularEndResp.off_name)) { CommonFunction.ShowPopupMsg(string.Format(CommonFunction.GetConstString("STR_PVP_DISCONNECT"), pvpRegularEndResp.off_name), UIManager.Instance.m_uiRootBasePanel.transform, onConfirmExit); isNotify = true; } else if (!string.IsNullOrEmpty(pvpQualifyingEndResp.off_name)) { CommonFunction.ShowPopupMsg(string.Format(CommonFunction.GetConstString("STR_PVP_DISCONNECT"), pvpQualifyingEndResp.off_name), UIManager.Instance.m_uiRootBasePanel.transform, onConfirmExit); isNotify = true; } if (MainPlayer.Instance.inPvpJoining) { CommonFunction.ShowPopupMsg(CommonFunction.GetConstString("GAME_OVER"), UIManager.Instance.m_uiRootBasePanel.transform, onConfirmExit); MainPlayer.Instance.inPvpJoining = false; isNotify = true; } if (!isNotify) { CommonFunction.ShowPopupMsg(string.Format(CommonFunction.GetConstString("STR_PVP_DISCONNECT"), ""), UIManager.Instance.m_uiRootBasePanel.transform, onConfirmExit); } }