1
This commit is contained in:
parent
8547844fa7
commit
b2ebe43b70
@ -160,9 +160,10 @@ func (this *playerMgr) apiAuthCb(hdr *f5.MsgHdr, msg *cs.CMLogin, rsp f5.HttpCli
|
||||
}
|
||||
hum := newPlayer()
|
||||
hum.init(pendingReq, &rspObj)
|
||||
// Add to online user
|
||||
//this.addPlayer(&player)
|
||||
//this.addSocketHash(hdr.GetSocket(), &player)
|
||||
this.accountIdHash[hum.GetAccountId()] = hum
|
||||
this.socketHash[pendingReq.hdr.GetSocket()] = hum
|
||||
rspMsg.ServerInfo = proto.String(mt.Table.IMCluster.GetServerInfo())
|
||||
GetWspListener().SendProxyMsg(hdr.Conn, hdr.SocketHandle, &rspMsg)
|
||||
/*
|
||||
// Add player profile
|
||||
playerProfile := &PlayerProfile{
|
||||
@ -235,10 +236,6 @@ func (this *playerMgr) GetPlayers() map[string]*player {
|
||||
return this.accountIdHash
|
||||
}
|
||||
|
||||
func (this *playerMgr) addPlayer(p *player) {
|
||||
this.accountIdHash[p.accountId] = p
|
||||
}
|
||||
|
||||
func (this *playerMgr) GetPlayerByAccountId(accountId string) *player {
|
||||
player, ok := this.accountIdHash[accountId]
|
||||
if ok {
|
||||
@ -271,10 +268,6 @@ func (this *playerMgr) getPlayerBySocket(socket f5.WspCliConn) *player {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *playerMgr) addSocketHash(wsp f5.WspCliConn, p *player) {
|
||||
this.socketHash[wsp] = p
|
||||
}
|
||||
|
||||
func (this *playerMgr) GetOnlineStatus(accountId string) int32 {
|
||||
player := this.GetPlayerByAccountId(accountId)
|
||||
if player != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user