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