diff --git a/Server/Hotfix/Module/Actor/ActorMessageSenderSystem.cs b/Server/Hotfix/Module/Actor/ActorMessageSenderSystem.cs index 93990d9fb0ce397159a47a50ef6d605e096f323a..e3c4cde0d8b4ab880e3af3e0d82925923031c839 100644 --- a/Server/Hotfix/Module/Actor/ActorMessageSenderSystem.cs +++ b/Server/Hotfix/Module/Actor/ActorMessageSenderSystem.cs @@ -148,15 +148,6 @@ namespace ETHotfix // 发送成功 switch (response.Error) { - case ErrorCode.ERR_Success: - self.LastSendTime = TimeHelper.Now(); - self.FailTimes = 0; - - self.WaitingTasks.Dequeue(); - - task.Tcs?.SetResult(response); - - return; case ErrorCode.ERR_NotFoundActor: // 如果没找到Actor,重试 ++self.FailTimes; @@ -179,11 +170,21 @@ namespace ETHotfix .GetComponent().IPEndPoint; self.AllowGet(); return; - default: - // 其它错误 + + case ErrorCode.ERR_ActorNoMailBoxComponent: self.Error = response.Error; self.GetParent().Remove(self.Id); return; + + default: + self.LastSendTime = TimeHelper.Now(); + self.FailTimes = 0; + + self.WaitingTasks.Dequeue(); + + task.Tcs?.SetResult(response); + + return; } } diff --git a/Server/Hotfix/Module/Message/InnerMessageDispatcher.cs b/Server/Hotfix/Module/Message/InnerMessageDispatcher.cs index 166b34923c0df72dc1e689a05d982dcc2a8433a6..867bfe532682b04d046c1255bc3a472d7fdbc8e9 100644 --- a/Server/Hotfix/Module/Message/InnerMessageDispatcher.cs +++ b/Server/Hotfix/Module/Message/InnerMessageDispatcher.cs @@ -32,11 +32,11 @@ namespace ETHotfix { ActorResponse response = new ActorResponse { - Error = ErrorCode.ERR_ActorNoActorComponent, + Error = ErrorCode.ERR_ActorNoMailBoxComponent, RpcId = iActorMessage.RpcId }; session.Reply(response); - Log.Error($"actor没有挂载ActorComponent组件: {entity.GetType().Name} {entity.Id}"); + Log.Error($"actor没有挂载MailBoxComponent组件: {entity.GetType().Name} {entity.Id}"); return; } diff --git a/Unity/Assets/Scripts/Module/Message/ErrorCode.cs b/Unity/Assets/Scripts/Module/Message/ErrorCode.cs index 20d66b16b58b8841fc435a6509b22d53af8b2555..4e7ce514b5dcb9a9d442830e8e12c5ccd14696ae 100644 --- a/Unity/Assets/Scripts/Module/Message/ErrorCode.cs +++ b/Unity/Assets/Scripts/Module/Message/ErrorCode.cs @@ -4,7 +4,7 @@ namespace ETModel { public const int ERR_Success = 0; public const int ERR_NotFoundActor = 2; - public const int ERR_ActorNoActorComponent = 3; + public const int ERR_ActorNoMailBoxComponent = 3; public const int ERR_ActorTimeOut = 4; public const int ERR_AccountOrPasswordError = 102;