This commit is contained in:
aozhiwei 2020-11-13 16:35:10 +08:00
parent d18fe64a8c
commit 0ee069bbc9
4 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,7 @@
package main
const (
IM_GAMECONF_CREATE = 100
)
const SESSION_KEY = "f3a6a9a5-217a-4079-ab99-b5d69b8212be"

View File

@ -126,6 +126,7 @@ func (this *RiskMgr) ForceGameConf(gameId int32, channel int32) *GameConf {
this.gameHashMutex.Lock()
defer this.gameHashMutex.Unlock()
if val, ok := this.gameHash[q5.MkInt64(gameId, channel)]; ok {
val.Active()
return val
} else {
gameConf := new(GameConf)
@ -133,6 +134,7 @@ func (this *RiskMgr) ForceGameConf(gameId int32, channel int32) *GameConf {
gameConf.channel = channel
gameConf.Init()
this.gameHash[q5.MkInt64(gameId, channel)] = gameConf
gameConf.Active()
return gameConf
}
}
@ -225,6 +227,7 @@ func (this *RiskMgr) __opsSyncConf(w* http.ResponseWriter, r *http.Request) {
q5.ResponseErr(w, 1, "数据不存在")
return
}
gameConf.SyncConf()
q5.ResponseOk(w)
}

View File

@ -10,6 +10,9 @@ import (
type GameConf struct {
gameId int32
channel int32
syncTimes int64
lastSyncTime int64
ipWhiteList map[string]int32
ipWhiteListMutex sync.RWMutex
@ -256,3 +259,9 @@ func (this* GameConf) GetBlockObj() *q5.XObject {
blockObj.SetXValue("curr_unsafezone_times", q5.NewXInt64(this.unSafeZoneBlockTimes))*/
return blockObj.AsXObject()
}
func (this* GameConf) Active() {
}
func (this* GameConf) SyncConf() {
}

2
third_party/f5 vendored

@ -1 +1 @@
Subproject commit ce7a0fd64c609c9205c0532c31743a7f99906653
Subproject commit 8f0700f501db978d79167ec246c4aedb36e99b8a