|
@@ -11,28 +11,28 @@ namespace ET.Server
|
|
|
|
|
|
|
|
public static async ETTask Add(this LocationProxyComponent self, int type, long key, ActorId actorId)
|
|
public static async ETTask Add(this LocationProxyComponent self, int type, long key, ActorId actorId)
|
|
|
{
|
|
{
|
|
|
- Log.Info($"location proxy add {key}, {actorId} {TimeHelper.ServerNow()}");
|
|
|
|
|
|
|
+ Log.Info($"location proxy add {key}, {actorId} {self.Fiber().TimeInfo.ServerNow()}");
|
|
|
await self.Root().GetComponent<ActorSenderComponent>().Call(GetLocationSceneId(key),
|
|
await self.Root().GetComponent<ActorSenderComponent>().Call(GetLocationSceneId(key),
|
|
|
new ObjectAddRequest() { Type = type, Key = key, ActorId = actorId });
|
|
new ObjectAddRequest() { Type = type, Key = key, ActorId = actorId });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public static async ETTask Lock(this LocationProxyComponent self, int type, long key, ActorId actorId, int time = 60000)
|
|
public static async ETTask Lock(this LocationProxyComponent self, int type, long key, ActorId actorId, int time = 60000)
|
|
|
{
|
|
{
|
|
|
- Log.Info($"location proxy lock {key}, {actorId} {TimeHelper.ServerNow()}");
|
|
|
|
|
|
|
+ Log.Info($"location proxy lock {key}, {actorId} {self.Fiber().TimeInfo.ServerNow()}");
|
|
|
await self.Root().GetComponent<ActorSenderComponent>().Call(GetLocationSceneId(key),
|
|
await self.Root().GetComponent<ActorSenderComponent>().Call(GetLocationSceneId(key),
|
|
|
new ObjectLockRequest() { Type = type, Key = key, ActorId = actorId, Time = time });
|
|
new ObjectLockRequest() { Type = type, Key = key, ActorId = actorId, Time = time });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public static async ETTask UnLock(this LocationProxyComponent self, int type, long key, ActorId oldActorId, ActorId newActorId)
|
|
public static async ETTask UnLock(this LocationProxyComponent self, int type, long key, ActorId oldActorId, ActorId newActorId)
|
|
|
{
|
|
{
|
|
|
- Log.Info($"location proxy unlock {key}, {newActorId} {TimeHelper.ServerNow()}");
|
|
|
|
|
|
|
+ Log.Info($"location proxy unlock {key}, {newActorId} {self.Fiber().TimeInfo.ServerNow()}");
|
|
|
await self.Root().GetComponent<ActorSenderComponent>().Call(GetLocationSceneId(key),
|
|
await self.Root().GetComponent<ActorSenderComponent>().Call(GetLocationSceneId(key),
|
|
|
new ObjectUnLockRequest() { Type = type, Key = key, OldActorId = oldActorId, NewActorId = newActorId });
|
|
new ObjectUnLockRequest() { Type = type, Key = key, OldActorId = oldActorId, NewActorId = newActorId });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public static async ETTask Remove(this LocationProxyComponent self, int type, long key)
|
|
public static async ETTask Remove(this LocationProxyComponent self, int type, long key)
|
|
|
{
|
|
{
|
|
|
- Log.Info($"location proxy add {key}, {TimeHelper.ServerNow()}");
|
|
|
|
|
|
|
+ Log.Info($"location proxy add {key}, {self.Fiber().TimeInfo.ServerNow()}");
|
|
|
await self.Root().GetComponent<ActorSenderComponent>().Call(GetLocationSceneId(key),
|
|
await self.Root().GetComponent<ActorSenderComponent>().Call(GetLocationSceneId(key),
|
|
|
new ObjectRemoveRequest() { Type = type, Key = key });
|
|
new ObjectRemoveRequest() { Type = type, Key = key });
|
|
|
}
|
|
}
|