ObjectLockRequestHandler.cs 448 B

123456789101112131415
  1. using System;
  2. using ETModel;
  3. namespace ETHotfix
  4. {
  5. [MessageHandler(AppType.Location)]
  6. public class ObjectLockRequestHandler : AMRpcHandler<ObjectLockRequest, ObjectLockResponse>
  7. {
  8. protected override async ETTask Run(Session session, ObjectLockRequest request, ObjectLockResponse response, Action reply)
  9. {
  10. Game.Scene.GetComponent<LocationComponent>().Lock(request.Key, request.InstanceId, request.Time).Coroutine();
  11. reply();
  12. }
  13. }
  14. }