1
This commit is contained in:
parent
a6200b2778
commit
4d844dbea0
@ -39,6 +39,7 @@ type Player interface {
|
||||
|
||||
type PlayerMgr interface {
|
||||
GetPlayerByAccountId(string) Player
|
||||
ForceCreatePlayer(string, string) Player
|
||||
}
|
||||
|
||||
type Mail interface {
|
||||
|
@ -7,10 +7,10 @@ import (
|
||||
|
||||
func CaAuth(c *gin.Context) {
|
||||
accountId := c.DefaultQuery("account_id", "")
|
||||
//_ := c.DefaultQuery("session_id", "")
|
||||
sessionId := c.DefaultQuery("session_id", "")
|
||||
hum := GetPlayerMgr().GetPlayerByAccountId(accountId)
|
||||
if hum == nil {
|
||||
|
||||
hum = GetPlayerMgr().ForceCreatePlayer(accountId, sessionId)
|
||||
}
|
||||
hum.Lock()
|
||||
c.Next()
|
||||
|
@ -18,3 +18,7 @@ func (this *playerMgr) UnInit() {
|
||||
func (this *playerMgr) GetPlayerByAccountId() common.Player {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *playerMgr) ForceCreatePlayer(string, string) common.Player {
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user