28 lines
828 B
C#
28 lines
828 B
C#
using Fantasy;
|
|
using Fantasy.Async;
|
|
using Fantasy.Entitas;
|
|
using Fantasy.Helper;
|
|
using Fantasy.Network;
|
|
using Fantasy.Network.Interface;
|
|
using NB;
|
|
using NB.Gate;
|
|
|
|
namespace NB.Game;
|
|
|
|
public class G2Game_EnterRequestHandler : RouteRPC<Scene, G2Game_EnterRequest, Game2G_EnterResponse>
|
|
{
|
|
protected override async FTask Run(Scene scene, G2Game_EnterRequest request, Game2G_EnterResponse response,
|
|
Action reply)
|
|
{
|
|
Log.Debug("收到 G2Game_EnterRequestHandler");
|
|
|
|
|
|
// 在缓存中检查该账号是否存在
|
|
var gameAccountManageComponent = scene.GetComponent<PlayerManageComponent>();
|
|
|
|
var account = await gameAccountManageComponent.Online(scene, request.AccountId, request.GateRouteId);
|
|
|
|
response.RoleRouteId = account.RuntimeId;
|
|
await FTask.CompletedTask;
|
|
}
|
|
} |