private void P2C_RefreshInFightInfo(MobaMessage msg)
        {
            PvpServer.LockScreen(false);
            InBattleRuntimeInfo probufMsg = msg.GetProbufMsg <InBattleRuntimeInfo>();

            PvpStateBase.LogState("receive P2C_RefreshInFightInfo  " + StringUtils.DumpObject(probufMsg));
            PvpProtocolTools.SyncFightInfo(probufMsg);
            if (probufMsg != null && probufMsg.roomState == 3)
            {
                Singleton <PvpManager> .Instance.AbandonGame(PvpErrorCode.StateError);
            }
            this.RecoverFinish(new PvpStateStart(PvpStateCode.PvpStart));
        }
        private void P2C_Reconnect(MobaMessage msg)
        {
            PvpServer.LockScreen(false);
            RetaMsg      probufMsg    = msg.GetProbufMsg <RetaMsg>();
            byte         retaCode     = probufMsg.retaCode;
            PvpErrorCode pvpErrorCode = (PvpErrorCode)retaCode;

            PvpStateBase.LogState("receive P2C_Reconnect " + pvpErrorCode);
            if (pvpErrorCode != PvpErrorCode.OK)
            {
                NetWorkHelper.Instance.DisconnectPvpServer();
                PvpStateBase.LogState("P2C_Reconnect failed " + pvpErrorCode);
                this.ConfirmQuiting("游戏已经结束,戳确认退出", "游戏结束");
            }
        }
        private void P2C_BackGame(MobaMessage msg)
        {
            PvpServer.LockScreen(false);
            RetaMsg      probufMsg    = msg.GetProbufMsg <RetaMsg>();
            byte         retaCode     = probufMsg.retaCode;
            PvpErrorCode pvpErrorCode = (PvpErrorCode)retaCode;

            PvpStateBase.LogState("receive P2C_BackGame " + pvpErrorCode);
            GameManager.Instance.ReConnected();
            Singleton <PvpManager> .Instance.LoadPvpSceneBegin();

            this.OnP2CBackGame(pvpErrorCode);
            if (pvpErrorCode != PvpErrorCode.OK)
            {
                Singleton <PvpManager> .Instance.AbandonGame(pvpErrorCode);
            }
        }
        protected virtual void P2C_LoginAsViewer(MobaMessage msg)
        {
            PvpServer.LockScreen(false);
            RetaMsg probufMsg = msg.GetProbufMsg <RetaMsg>();
            byte    retaCode  = probufMsg.retaCode;

            PvpStateBase.LogState("===>receive: P2C_LoginAsViewer:" + retaCode);
            if (retaCode == 0)
            {
                Singleton <PvpManager> .Instance.LoadPvpSceneBegin();

                this.RecoverFinish(new PvpStateLoad());
            }
            else
            {
                ClientLogger.Error("P2C_LoginAsViewer: failed for " + retaCode);
                CtrlManager.ShowMsgBox("观战失败", "观战失败,游戏已经结束或者没有观战的权限", new Action(PvpUtils.GoHome), PopViewType.PopOneButton, "确定", "取消", null);
            }
        }