protected override void P2C_LoginAsViewer(MobaMessage msg) { RetaMsg probufMsg = msg.GetProbufMsg <RetaMsg>(); byte retaCode = probufMsg.retaCode; PvpStateBase.LogState("===>receive: P2C_LoginAsViewer:" + retaCode); if (retaCode == 0) { if (this._prevState == PvpStateCode.PveLoad) { Singleton <PvpManager> .Instance.LoadPvpSceneBegin(); base.RecoverFinish(new PvpStateLoad()); } else { base.QueryPsPvpState(); base.RecoverFinish(new PvpStateStart(PvpStateCode.PvpStart)); } } else { ClientLogger.Error("P2C_LoginAsViewer: failed for " + retaCode); Singleton <PvpManager> .Instance.AbandonGame(PvpErrorCode.UnknowError); } }
private void OnEnd_RevertShop(RetaMsg ret) { this.StopWaitCoroutine(); if (ret != null && ret.retaCode == 0) { if (this.DealingShop != null) { if (this.DealingShop.RollbackStack.Count > 0) { RollbackInfo rollbackInfo = this.DealingShop.RollbackStack.Pop(); this.SetRollbackInfo(rollbackInfo); } this.DealingShop.DealCounter--; } } else { MobaMessageManagerTools.SendClientMsg(ClientC2C.BattleShop_err, "撤销失败,errCode=" + ret.retaCode, false); } if (this.DealingShop != null) { this.DealingShop.State = EBattleShopState.eIdle; this.DealingShop = null; } }
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); } }
private void C2P_LoginAsViewer(MobaMessage msg) { RetaMsg probufMsg = msg.GetProbufMsg <RetaMsg>(); byte retaCode = probufMsg.retaCode; if (retaCode == 0) { Singleton <PvpManager> .Instance.LoadPvpSceneBegin(); PvpStateManager.Instance.ChangeState(new PvpStateLoad()); } else { ClientLogger.Error("C2P_LoginAsViewer: failed for " + retaCode); this.AlertAndGoHome("连接Pvp服务器失败"); } }
private void P2C_LoginFight(MobaMessage msg) { RetaMsg probufMsg = msg.GetProbufMsg <RetaMsg>(); byte retaCode = probufMsg.retaCode; PvpStateBase.LogState("===>receive: P2C_LoginFight:" + retaCode); if (retaCode == 0) { Singleton <PvpManager> .Instance.LoadPvpSceneBegin(); PvpStateManager.Instance.ChangeState(new PvpStateLoad()); } else { ClientLogger.Error("P2C_LoginFight: 别怕,帮助@liuchen定位问题,failed for " + (PvpErrorCode)retaCode); CtrlManager.ShowMsgBox("错误", "服务器错误码" + retaCode, new Action(PvpUtils.GoHome), PopViewType.PopOneButton, "确定", "取消", null); } }
private void P2C_LoginAsViewer(MobaMessage msg) { RetaMsg probufMsg = msg.GetProbufMsg <RetaMsg>(); byte retaCode = probufMsg.retaCode; PvpStateBase.LogState("===>receive: P2C_LoginAsViewer:" + retaCode); if (retaCode == 0) { Singleton <PvpManager> .Instance.LoadPvpSceneBegin(); PvpStateManager.Instance.ChangeState(new PvpStateLoad()); } else { ClientLogger.Error("P2C_LoginAsViewer: 别怕,帮助@汪洋定位问题,failed for " + retaCode); CtrlManager.ShowMsgBox("观战失败", "观战失败,游戏已经结束或者没有观战的权限", new Action(PvpUtils.GoHome), PopViewType.PopOneButton, "确定", "取消", null); } }
private void NewbieP2C_LoginFight(MobaMessage msg) { RetaMsg probufMsg = msg.GetProbufMsg <RetaMsg>(); byte retaCode = probufMsg.retaCode; if (retaCode == 0) { NewbieManager.Instance.SetSpecialEnterBattleSuc(); Singleton <PvpManager> .Instance.LoadPvpSceneBegin(); PvpStateManager.Instance.ChangeState(new PvpStateLoad()); } else { ClientLogger.Error("P2C_LoginFight: 别怕,帮助@汪洋定位问题,failed for " + retaCode); CtrlManager.ShowMsgBox("错误", "服务器错误码" + retaCode, new Action(PvpUtils.GoHome), PopViewType.PopOneButton, "确定", "取消", null); } }
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); } }
private void OnMsg_C2P_RevertShop(MobaMessage msg) { RetaMsg probufMsg = msg.GetProbufMsg <RetaMsg>(); this.OnEnd_RevertShop(probufMsg); }