Skip to content

Commit 8c3b3d4

Browse files
committed
[修改]1. 修改ActorType的类型定义
1 parent c461b1e commit 8c3b3d4

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

GameFrameX.Hotfix/Common/Events/EventDispatcherExtensions.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using GameFrameX.Core.Abstractions;
33
using GameFrameX.Core.Abstractions.Agent;
44
using GameFrameX.Core.Abstractions.Events;
5+
using GameFrameX.Hotfix.Logic.Server.Server;
56

67
namespace GameFrameX.Hotfix.Common.Events
78
{
@@ -18,12 +19,18 @@ public static void Dispatch(this IComponentAgent agent, int evtId, Param args =
1819
// 自己处理
1920
SelfHandle(agent, evtId, evt);
2021

21-
if ((EventId)evtId > EventId.RoleSeparator && agent.OwnerType > ActorType.Separator)
22+
if ((EventId)evtId > EventId.RoleSeparator && agent.OwnerType > (ushort)ActorType.Separator)
2223
{
2324
// 全局非玩家事件,抛给所有玩家
24-
/*agent.Tell(()
25-
=> ServerComponentAgent.OnlineRoleForeach(role
26-
=> role.Dispatch(evtId, args)));*/
25+
agent.Tell(()
26+
=>
27+
{
28+
return ServerComponentAgent.OnlineRoleForeach(role
29+
=>
30+
{
31+
role.Dispatch(evtId, args);
32+
});
33+
});
2734
}
2835
}
2936

0 commit comments

Comments
 (0)