1
This commit is contained in:
parent
19df707e84
commit
fc0b397007
@ -233,26 +233,27 @@ func (this *playerMgr) GetPlayerByAccountId(accountId string) common.Player {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *playerMgr) GetPlayerBySocket(socket f5.WspCliConn) common.Player {
|
||||||
|
hum := this.internalGetPlayerBySocket(socket)
|
||||||
|
if hum != nil {
|
||||||
|
return hum
|
||||||
|
} else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (this *playerMgr) internalGetPlayerByAccountId(accountId string) *player {
|
func (this *playerMgr) internalGetPlayerByAccountId(accountId string) *player {
|
||||||
player, ok := this.accountIdHash[accountId]
|
hum, ok := this.accountIdHash[accountId]
|
||||||
if ok {
|
if ok {
|
||||||
return player
|
return hum
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *playerMgr) internalGetPlayerBySocket(socket f5.WspCliConn) *player {
|
func (this *playerMgr) internalGetPlayerBySocket(socket f5.WspCliConn) *player {
|
||||||
player, ok := this.socketHash[socket]
|
hum, ok := this.socketHash[socket]
|
||||||
if ok {
|
if ok {
|
||||||
return player
|
return hum
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *playerMgr) getPlayerBySocket(socket f5.WspCliConn) *player {
|
|
||||||
player, ok := this.socketHash[socket]
|
|
||||||
if ok {
|
|
||||||
return player
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user