新增相关协议
This commit is contained in:
@@ -1,29 +1,29 @@
|
||||
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;
|
||||
response.RoleInfo = account.GetRoleSimpleInfo();
|
||||
await FTask.CompletedTask;
|
||||
}
|
||||
}
|
||||
// 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;
|
||||
// response.RoleInfo = account.GetRoleSimpleInfo();
|
||||
// await FTask.CompletedTask;
|
||||
// }
|
||||
// }
|
||||
Reference in New Issue
Block a user