mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
18 lines
501 B
C#
18 lines
501 B
C#
using System;
|
|
|
|
|
|
namespace ET.Server
|
|
{
|
|
[ActorMessageHandler(SceneType.Gate)]
|
|
public class R2G_GetLoginKeyHandler : ActorMessageHandler<Scene, R2G_GetLoginKey, G2R_GetLoginKey>
|
|
{
|
|
protected override async ETTask Run(Scene scene, R2G_GetLoginKey request, G2R_GetLoginKey response)
|
|
{
|
|
long key = RandomGenerator.RandInt64();
|
|
scene.GetComponent<GateSessionKeyComponent>().Add(key, request.Account);
|
|
response.Key = key;
|
|
response.GateId = scene.Id;
|
|
await ETTask.CompletedTask;
|
|
}
|
|
}
|
|
} |