using Fantasy; using Fantasy.Async; using Fantasy.Entitas; using Fantasy.Network.Interface; namespace Hotfix; public class G2Chat_LoginRequestHandler : RouteRPC { protected override async FTask Run(Scene scene, G2Chat_LoginRequest request, Chat2G_LoginResponse response, Action reply) { var chatUnit = Entity.Create(scene,request.GateRoutedId,false,false); chatUnit.AccountId = request.AccountId; chatUnit.GameName = request.GameName; response.ErrorCode = GameErrorCode.Success; response.ChatRouteId = chatUnit.RuntimeId; Log.Info($"登录聊天服务器成功 {request.GameName} AccountId {request.AccountId } GateRoutedId { request.GateRoutedId}"); await FTask.CompletedTask; } }