We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67c758c commit 1984c97Copy full SHA for 1984c97
GameFrameX.Hotfix/Logic/Role/Login/ReqPlayerLoginHandler.cs
@@ -6,6 +6,17 @@ namespace GameFrameX.Hotfix.Logic.Role.Login;
6
[MessageMapping(typeof(ReqPlayerLogin))]
7
internal class ReqPlayerLoginHandler : PlayerComponentHandler<PlayerComponentAgent>
8
{
9
+ protected override Task InitActor()
10
+ {
11
+ if (ActorId <= 0 && Message is ReqPlayerLogin reqPlayerLogin)
12
13
+ NetWorkChannel.SetData(GlobalConst.ActorIdKey, reqPlayerLogin.Id);
14
+ ActorId = reqPlayerLogin.Id;
15
+ }
16
+
17
+ return base.InitActor();
18
19
20
protected override async Task ActionAsync()
21
22
await ComponentAgent.OnPlayerLogin(NetWorkChannel, Message as ReqPlayerLogin);
0 commit comments