Skip to content

Commit b9dbbb0

Browse files
committed
[修改]1. 修改发送消息的适配
1 parent e745abb commit b9dbbb0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,16 @@ public async Task OnLogin(INetWorkChannel workChannel, ReqLogin reqLogin)
1818
{
1919
ErrCode = (int)ResultCode.Failed
2020
};
21-
await workChannel.WriteAsync(respErrorCode, reqLogin.UniId, (int)OperationStatusCode.AccountCannotBeNull);
21+
await workChannel.WriteAsync(respErrorCode, (int)OperationStatusCode.AccountCannotBeNull);
2222
return;
2323
}
2424

2525

26-
var loginCompAgent = await ActorManager.GetComponentAgent<LoginComponentAgent>();
27-
var loginState = await loginCompAgent.OwnerComponent.OnLogin(reqLogin);
26+
var loginState = await OwnerComponent.OnLogin(reqLogin);
2827
if (loginState == null)
2928
{
3029
var accountId = ActorIdGenerator.GetActorId(ActorType.Account);
31-
loginState = await loginCompAgent.OwnerComponent.Register(accountId, reqLogin);
30+
loginState = await OwnerComponent.Register(accountId, reqLogin);
3231
}
3332

3433
//添加到session
@@ -48,7 +47,7 @@ public async Task OnLogin(INetWorkChannel workChannel, ReqLogin reqLogin)
4847
Id = loginState.Id,
4948
RoleName = Utility.Random.GetRandom(1, 100).ToString(),
5049
};
51-
await workChannel.WriteAsync(respLogin, reqLogin.UniId);
50+
await workChannel.WriteAsync(respLogin);
5251

5352
//加入在线玩家
5453
var serverComp = await ActorManager.GetComponentAgent<ServerComponentAgent>();

0 commit comments

Comments
 (0)