Skip to content

Commit ea814fe

Browse files
committed
fix(登录): 在登录流程中添加玩家ID绑定
添加了将玩家ID绑定到工作频道的逻辑,确保后续操作能正确识别玩家身份
1 parent e0d4c34 commit ea814fe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

GameFrameX.Hotfix/Logic/Player/Login/LoginComponentAgent.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ public async Task OnPlayerLogin(INetWorkChannel workChannel, ReqPlayerLogin reqL
5555
return;
5656
}
5757

58+
// 绑定玩家ID
59+
workChannel.SetData(GlobalConst.ActorIdKey, playerState.Id);
5860
var playerComponentAgent = await ActorManager.GetComponentAgent<PlayerComponentAgent>(playerState.Id);
5961
await playerComponentAgent.OnPlayerLogin(workChannel, playerState, response);
6062
}

0 commit comments

Comments
 (0)