服务合并
This commit is contained in:
@@ -4,7 +4,6 @@ using Fantasy.Async;
|
||||
using Fantasy.Network.Interface;
|
||||
using NB.Chat;
|
||||
using NB.Game;
|
||||
using NBF.Social;
|
||||
|
||||
namespace NB.Common;
|
||||
|
||||
@@ -23,14 +22,9 @@ public class G2Common_EnterRequestHandler : AddressRPC<Scene, G2Common_EnterRequ
|
||||
|
||||
break;
|
||||
}
|
||||
case SceneType.Social:
|
||||
{
|
||||
await RunSocial(scene, request, response);
|
||||
break;
|
||||
}
|
||||
// case SceneType.Map:
|
||||
// case SceneType.Social:
|
||||
// {
|
||||
// await RunMap(scene, request, response);
|
||||
// await RunSocial(scene, request, response);
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
@@ -53,21 +47,21 @@ public class G2Common_EnterRequestHandler : AddressRPC<Scene, G2Common_EnterRequ
|
||||
Log.Info($"登录到游戏服成功,id={response.UnitRouteId}");
|
||||
}
|
||||
|
||||
private async FTask RunSocial(Scene scene, G2Common_EnterRequest request, G2Common_EnterResponse response)
|
||||
{
|
||||
// 在缓存中检查该账号是否存在
|
||||
var chatUnitManageComponent = scene.GetComponent<SocialUnitManageComponent>();
|
||||
var account = await chatUnitManageComponent.Online(scene, request.AccountId, request.GateRouteId);
|
||||
|
||||
if (account == null)
|
||||
{
|
||||
response.ErrorCode = ErrorCode.ErrServer;
|
||||
return;
|
||||
}
|
||||
|
||||
response.UnitRouteId = account.RuntimeId;
|
||||
Log.Info($"登录到社交服成功,id={response.UnitRouteId}");
|
||||
}
|
||||
// private async FTask RunSocial(Scene scene, G2Common_EnterRequest request, G2Common_EnterResponse response)
|
||||
// {
|
||||
// // 在缓存中检查该账号是否存在
|
||||
// var chatUnitManageComponent = scene.GetComponent<SocialUnitManageComponent>();
|
||||
// var account = await chatUnitManageComponent.Online(scene, request.AccountId, request.GateRouteId);
|
||||
//
|
||||
// if (account == null)
|
||||
// {
|
||||
// response.ErrorCode = ErrorCode.ErrServer;
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// response.UnitRouteId = account.RuntimeId;
|
||||
// Log.Info($"登录到社交服成功,id={response.UnitRouteId}");
|
||||
// }
|
||||
|
||||
// private async FTask RunMap(Scene scene, G2Common_EnterRequest request, G2Common_EnterResponse response)
|
||||
// {
|
||||
|
||||
Reference in New Issue
Block a user