diff --git a/core/redis/login.go b/core/redis/login.go index c2d2a1a..b4c5c39 100644 --- a/core/redis/login.go +++ b/core/redis/login.go @@ -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_" diff --git a/login/login.go b/login/login.go index cbde08f..8173723 100644 --- a/login/login.go +++ b/login/login.go @@ -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 diff --git a/shard/join.go b/shard/join.go index 4a2cd0b..b0b9a04 100644 --- a/shard/join.go +++ b/shard/join.go @@ -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) }