Eintoo/GameServer/Server/Hotfix/Outter/Gate/Handler/C2G_UpdateAndSaveGameNameRequestHandler.cs

25 lines
934 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Fantasy.Async;
using Fantasy.Network;
using Fantasy.Network.Interface;
using Hotfix;
namespace Fantasy;
public class C2G_UpdateAndSaveGameNameRequestHandler : MessageRPC<C2G_UpdateAndSaveGameNameRequest, G2C_UpdateAndSaveGameNameResponse>
{
protected override async FTask Run(Session session, C2G_UpdateAndSaveGameNameRequest request, G2C_UpdateAndSaveGameNameResponse response, Action reply)
{
var scene = session.Scene;
if (string.IsNullOrEmpty(request.GameName) || request.AccountId == 0)
{
Log.Debug($"Gate 登录 失败用户名 和 账号 ID 不能为空 ");
return;
}
Log.Debug($"Gate 修改游戏名 account{request.AccountId} 游戏名称 {request.GameName} ");
var result = await GateComponentHelper.UpdateAccountGameName(scene,session, request.AccountId, request.GameName);
response.ErrorCode = result;
}
}