完善机器人

This commit is contained in:
flswld
2023-05-13 20:40:40 +08:00
parent 9f10142c47
commit 0bc54baf12
9 changed files with 163 additions and 62 deletions

View File

@@ -52,6 +52,10 @@ func GateLogin(dispatchInfo *DispatchInfo, accountInfo *AccountInfo, keyId strin
AccountUid: strconv.Itoa(int(accountInfo.AccountId)),
KeyId: uint32(keyIdInt),
ClientRandKey: clientSeedBase64,
AccountType: 1,
ChannelId: 1,
SubChannelId: 1,
PlatformType: 3,
})
protoMsg := <-session.RecvChan
if protoMsg.CmdId != cmd.GetPlayerTokenRsp {
@@ -92,5 +96,7 @@ func GateLogin(dispatchInfo *DispatchInfo, accountInfo *AccountInfo, keyId strin
key := make([]byte, 4096)
copy(key, xorKey[:])
session.XorKey = key
session.ClientVersionRandomKey = getPlayerTokenRsp.ClientVersionRandomKey
session.SecurityCmdBuffer = getPlayerTokenRsp.SecurityCmdBuffer
return session, nil
}