1
This commit is contained in:
parent
3a216a6795
commit
d6d2a25c7c
@ -150,11 +150,11 @@ func (this *playerMgr) apiAuthCb(hdr *f5.MsgHdr, msg *cs.CMLogin, rsp f5.HttpCli
|
|||||||
|
|
||||||
hum := new(player)
|
hum := new(player)
|
||||||
hum.init(pendingReq)
|
hum.init(pendingReq)
|
||||||
this.addPlayer(hum)
|
this.accountIdHash[hum.GetAccountId()] = hum
|
||||||
this.addSocketHash(hdr.GetSocket(), hum)
|
this.socketHash[pendingReq.hdr.GetSocket()] = hum
|
||||||
|
|
||||||
serverInfo := mt.Table.HallCluster.GetIp() + ":" + q5.ToString(mt.Table.HallCluster.GetListenPort())
|
rspMsg.ServerInfo = proto.String(
|
||||||
rspMsg.ServerInfo = &serverInfo
|
mt.Table.HallCluster.GetIp() + ":" + q5.ToString(mt.Table.HallCluster.GetListenPort()))
|
||||||
GetWspListener().SendProxyMsg(hdr.Conn, hdr.SocketHandle, &rspMsg)
|
GetWspListener().SendProxyMsg(hdr.Conn, hdr.SocketHandle, &rspMsg)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,10 +182,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 {
|
||||||
@ -202,10 +198,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) ProcessCMMsg(handler *cs.CsNetMsgHandler, hdr *f5.MsgHdr) {
|
func (this* playerMgr) ProcessCMMsg(handler *cs.CsNetMsgHandler, hdr *f5.MsgHdr) {
|
||||||
switch handler.HandlerId {
|
switch handler.HandlerId {
|
||||||
case constant.PLAYER_MGR_HANDLER_ID:
|
case constant.PLAYER_MGR_HANDLER_ID:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user