聊天频道相关
This commit is contained in:
@@ -43,22 +43,25 @@ public static class GateLoginHelper
|
||||
|
||||
|
||||
//安排游戏服务器,并通知进入
|
||||
var gameRouteId = await GameSceneHelper.Online(session.Scene, gateUnit.AccountID, session.RuntimeId);
|
||||
if (gameRouteId <= 0)
|
||||
var (gameRouteId, roleSimpleInfo) =
|
||||
await GameSceneHelper.Online(session.Scene, gateUnit.AccountID, session.RuntimeId);
|
||||
if (gameRouteId <= 0 || roleSimpleInfo == null)
|
||||
{
|
||||
return ErrorCode.OnlineSceneFailed;
|
||||
}
|
||||
|
||||
Log.Info($"连接游戏服成功,gameRouteId:{gameRouteId}");
|
||||
routeComponent.AddAddress(RouteType.GameRoute, gameRouteId);
|
||||
gateUnit.GameSceneRouteId = gameRouteId;
|
||||
|
||||
|
||||
// //安排进入的聊天服
|
||||
var chatRouteId = await ChatSceneHelper.Online(session.Scene, gateUnit.AccountID, session.RuntimeId);
|
||||
|
||||
//安排进入的聊天服
|
||||
var chatRouteId = await ChatSceneHelper.Online(session.Scene, roleSimpleInfo, session.RuntimeId);
|
||||
if (chatRouteId <= 0)
|
||||
{
|
||||
return ErrorCode.OnlineSceneFailed;
|
||||
}
|
||||
|
||||
routeComponent.AddAddress(RouteType.ChatRoute, chatRouteId);
|
||||
gateUnit.ChatSceneRouteId = chatRouteId;
|
||||
Log.Info($"连接聊天服成功,gameRouteId:{gameRouteId}");
|
||||
@@ -66,7 +69,7 @@ public static class GateLoginHelper
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 下线
|
||||
|
||||
/// <summary>
|
||||
@@ -82,5 +85,4 @@ public static class GateLoginHelper
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user