|
@@ -81,7 +81,7 @@ namespace ET
|
|
|
{
|
|
|
zoneScene.GetComponent<SessionComponent>().AccountSession = accountSession;
|
|
|
accountSession.AddComponent<PingComponent>();
|
|
|
- accountSession.AddComponent<DisConnectedCompnent>();
|
|
|
+ accountSession.AddComponent<DisConnectedCompnent>().SessionState = SessionState.Login;
|
|
|
zoneScene.GetComponent<SessionComponent>().SessionState = SessionState.Login;
|
|
|
AccountInfoComponent accountInfoComponent = zoneScene.GetComponent<AccountInfoComponent>();
|
|
|
accountInfoComponent.Token = a2CLoginAccount.Token;
|
|
@@ -289,6 +289,7 @@ namespace ET
|
|
|
|
|
|
zoneScene.GetComponent<AccountInfoComponent>().RealmKey = a2C_GetRealmKey.RealmKey;
|
|
|
zoneScene.GetComponent<AccountInfoComponent>().RealmAddress = a2C_GetRealmKey.RealmAddress;
|
|
|
+ zoneScene.GetComponent<SessionComponent>().DisconnectAccount();
|
|
|
|
|
|
await ETTask.CompletedTask;
|
|
|
return ErrorCode.ERR_Success;
|
|
@@ -325,7 +326,7 @@ namespace ET
|
|
|
LogUtil.LogDev($"GateAddress : {r2C_LoginRealm.GateAddress}");
|
|
|
Session gateSession = zoneScene.GetComponent<NetKcpComponent>().Create(NetworkHelper.ToIPEndPoint(r2C_LoginRealm.GateAddress));
|
|
|
gateSession.AddComponent<PingComponent>();
|
|
|
- gateSession.AddComponent<DisConnectedCompnent>();
|
|
|
+ gateSession.AddComponent<DisConnectedCompnent>().SessionState = SessionState.Gate;
|
|
|
zoneScene.GetComponent<SessionComponent>().GateSession = gateSession;
|
|
|
zoneScene.GetComponent<SessionComponent>().SessionState = SessionState.Gate;
|
|
|
|
|
@@ -375,9 +376,12 @@ namespace ET
|
|
|
return g2C_EnterGame.Error;
|
|
|
}
|
|
|
zoneScene.GetComponent<PlayerComponent>().MyId = g2C_EnterGame.MyId;
|
|
|
- await GameGlobal.zoneScene.GetComponent<ObjectWait>().Wait<ET.WaitType.Wait_SceneChangeStart>();
|
|
|
+ var result = await GameGlobal.zoneScene.GetComponent<ObjectWait>().Wait<ET.WaitType.Wait_SceneChangeStart>();
|
|
|
+ if(result.Error == WaitTypeError.Cancel)
|
|
|
+ {
|
|
|
+ return ErrorCode.ERR_Cancel;
|
|
|
+ }
|
|
|
LogUtil.LogDev("角色进入游戏成功!");
|
|
|
- zoneScene.GetComponent<SessionComponent>().DisconnectAccount();
|
|
|
return ErrorCode.ERR_Success;
|
|
|
}
|
|
|
|