include AccountID in loginMetadata

This commit is contained in:
unknown 2023-06-22 18:12:31 -05:00
parent d42a34535b
commit 1da82ac750
3 changed files with 7 additions and 5 deletions

View File

@ -9,8 +9,9 @@ import (
)
type LoginMetadata struct {
FEKey []byte `json:",omitempty"`
PlayerID int32 `json:",omitempty"`
FEKey []byte `json:",omitempty"`
PlayerID int32 `json:",omitempty"`
AccountID int `json:",omitempty"`
}
// we store login queues into redis with the name "loginMetadata_<serialKey>"

View File

@ -286,8 +286,9 @@ func (server *LoginServer) ShardSelect(peer *protocol.CNPeer, pkt protocol.Packe
// share the login attempt
server.redisHndlr.QueueLogin(key, redis.LoginMetadata{
FEKey: peer.FE_key,
PlayerID: int32(selection.IPC_UID),
FEKey: peer.FE_key,
PlayerID: int32(selection.IPC_UID),
AccountID: peer.AccountID,
})
// craft response

View File

@ -49,7 +49,7 @@ func (server *ShardServer) RequestEnter(peer *protocol.CNPeer, pkt protocol.Pack
peer.FE_key = loginData.FEKey
peer.SetActiveKey(protocol.USE_FE)
log.Printf("Player %d (AccountID %d) entered\n", resp.IID, loginData.PlayerID)
log.Printf("Player %d (AccountID %d) entered\n", resp.IID, loginData.AccountID)
return peer.Send(protocol.P_FE2CL_REP_PC_ENTER_SUCC, resp)
}