Eintoo/GameServer/Server/Hotfix/Outter/Chat/Handler/Inner/G2Chat_LoginRequestHandler.cs

23 lines
841 B
C#

using Fantasy;
using Fantasy.Async;
using Fantasy.Entitas;
using Fantasy.Network.Interface;
namespace Hotfix;
public class G2Chat_LoginRequestHandler : RouteRPC<Scene,G2Chat_LoginRequest,Chat2G_LoginResponse>
{
protected override async FTask Run(Scene scene, G2Chat_LoginRequest request, Chat2G_LoginResponse response, Action reply)
{
var chatUnit = Entity.Create<ChatUnit>(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;
}
}