using Fantasy; using Fantasy.Async; using Fantasy.Network.Interface; using NB.Game; namespace NB.Chat; public class G2Chat_EnterRequestHandler: RouteRPC { protected override async FTask Run(Scene scene, G2Chat_EnterRequest request, Chat2G_EnterResponse response, Action reply) { Log.Debug($"收到 G2Chat_EnterRequestHandler {request.AccountId}"); // 在缓存中检查该账号是否存在 var chatUnitManageComponent = scene.GetComponent(); var account = await chatUnitManageComponent.Online(scene, request.AccountId, request.GateRouteId); response.RoleRouteId = account.RuntimeId; await FTask.CompletedTask; } }