This commit is contained in:
aozhiwei 2020-11-16 13:33:21 +08:00
parent 86075b587b
commit 6533a253fa
2 changed files with 15 additions and 1 deletions

View File

@ -59,7 +59,11 @@ func (this* RiskMgr) Init() *RiskMgr {
func (params* q5.XParams) { func (params* q5.XParams) {
this.OutputLog() this.OutputLog()
}) })
f5.App.RegisterIMMsgHandle(IM_GAMECONF_CREATE, func (msgId int16, params *q5.XParams) {
G.RiskMgr.OnGameConfCreate(
params.Sender.GetInt32(),
params.Param1.GetInt32())
})
return this return this
} }
@ -246,3 +250,9 @@ func (this *RiskMgr) __opsInfo(w* http.ResponseWriter, r *http.Request) {
respObj.SetXObject("block", gameConf.GetBlockObj()) respObj.SetXObject("block", gameConf.GetBlockObj())
q5.Response(w, respObj.ToJsonStr()) q5.Response(w, respObj.ToJsonStr())
} }
/*
安装定时器定时更新逻辑
*/
func (this *RiskMgr) OnGameConfCreate(gameId int32, channel int32) {
}

View File

@ -155,6 +155,10 @@ func (this* GameConf) Init() {
this.blockProvinceCityHash[val] = 1 this.blockProvinceCityHash[val] = 1
} }
this.lastActiveTime = f5.App.NowUnix() this.lastActiveTime = f5.App.NowUnix()
f5.App.AddIMMsg(IM_GAMECONF_CREATE, new(q5.XParams).Init(func (params* q5.XParams) {
params.Sender.SetInt32(this.gameId)
params.Param1.SetInt32(this.channel)
}))
} }
func (this* GameConf) IsBlockZone(country string, province string, city string) bool { func (this* GameConf) IsBlockZone(country string, province string, city string) bool {