Skip to content

Commit a05ebd3

Browse files
committed
[修改]1. 修改消息处理器的逻辑检查
1 parent a22772c commit a05ebd3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

GameFrameX.Core/Hotfix/HotfixModule.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ private bool AddRpcHandler(Type type)
284284
private bool AddTcpHandler(Type type)
285285
{
286286
var attribute = (MessageMappingAttribute)type.GetCustomAttribute(typeof(MessageMappingAttribute), true);
287-
if (attribute.IsNull())
287+
if (attribute == null)
288288
{
289289
return false;
290290
}
@@ -302,7 +302,7 @@ private bool AddTcpHandler(Type type)
302302

303303
if (!classFullName.EndsWith(GlobalConst.ComponentHandlerNameSuffix))
304304
{
305-
throw new Exception($"组件代理必须以[{GlobalConst.ComponentHandlerNameSuffix}]结尾,{classFullName}");
305+
throw new Exception($"消息处理器 必须以[{GlobalConst.ComponentHandlerNameSuffix}]结尾,{classFullName}");
306306
}
307307

308308
if (_tcpHandlerTypes.Contains(attribute.MessageType))
@@ -312,7 +312,7 @@ private bool AddTcpHandler(Type type)
312312
}
313313

314314
var msgIdField = (MessageTypeHandlerAttribute)attribute.MessageType.GetCustomAttribute(typeof(MessageTypeHandlerAttribute), true);
315-
if (msgIdField.IsNull())
315+
if (msgIdField == null)
316316
{
317317
return false;
318318
}

0 commit comments

Comments
 (0)