R2G_GetLoginKeyHandler.cs 483 B

123456789101112131415161718
  1. using System;
  2. using ETModel;
  3. namespace ETHotfix
  4. {
  5. [MessageHandler]
  6. public class R2G_GetLoginKeyHandler : AMActorRpcHandler<Scene, R2G_GetLoginKey, G2R_GetLoginKey>
  7. {
  8. protected override async ETTask Run(Scene scene, R2G_GetLoginKey request, G2R_GetLoginKey response, Action reply)
  9. {
  10. long key = RandomHelper.RandInt64();
  11. scene.GetComponent<GateSessionKeyComponent>().Add(key, request.Account);
  12. response.Key = key;
  13. reply();
  14. await ETTask.CompletedTask;
  15. }
  16. }
  17. }