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

@ -11,6 +11,7 @@ import (
type LoginMetadata struct {
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

@ -288,6 +288,7 @@ func (server *LoginServer) ShardSelect(peer *protocol.CNPeer, pkt protocol.Packe
server.redisHndlr.QueueLogin(key, redis.LoginMetadata{
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)
}