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 := newPlayer()
|
||||||
hum.init(pendingReq, &rspObj)
|
hum.init(pendingReq, &rspObj)
|
||||||
// Add to online user
|
this.accountIdHash[hum.GetAccountId()] = hum
|
||||||
//this.addPlayer(&player)
|
this.socketHash[pendingReq.hdr.GetSocket()] = hum
|
||||||
//this.addSocketHash(hdr.GetSocket(), &player)
|
rspMsg.ServerInfo = proto.String(mt.Table.IMCluster.GetServerInfo())
|
||||||
|
GetWspListener().SendProxyMsg(hdr.Conn, hdr.SocketHandle, &rspMsg)
|
||||||
/*
|
/*
|
||||||
// Add player profile
|
// Add player profile
|
||||||
playerProfile := &PlayerProfile{
|
playerProfile := &PlayerProfile{
|
||||||
@ -235,10 +236,6 @@ func (this *playerMgr) GetPlayers() map[string]*player {
|
|||||||
return this.accountIdHash
|
return this.accountIdHash
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *playerMgr) addPlayer(p *player) {
|
|
||||||
this.accountIdHash[p.accountId] = p
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *playerMgr) GetPlayerByAccountId(accountId string) *player {
|
func (this *playerMgr) GetPlayerByAccountId(accountId string) *player {
|
||||||
player, ok := this.accountIdHash[accountId]
|
player, ok := this.accountIdHash[accountId]
|
||||||
if ok {
|
if ok {
|
||||||
@ -271,10 +268,6 @@ func (this *playerMgr) getPlayerBySocket(socket f5.WspCliConn) *player {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *playerMgr) addSocketHash(wsp f5.WspCliConn, p *player) {
|
|
||||||
this.socketHash[wsp] = p
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *playerMgr) GetOnlineStatus(accountId string) int32 {
|
func (this *playerMgr) GetOnlineStatus(accountId string) int32 {
|
||||||
player := this.GetPlayerByAccountId(accountId)
|
player := this.GetPlayerByAccountId(accountId)
|
||||||
if player != nil {
|
if player != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user