This commit is contained in:
aozhiwei 2021-01-07 11:37:43 +08:00
parent cab594d969
commit 175c94fbc9
3 changed files with 9 additions and 9 deletions

View File

@ -131,7 +131,7 @@ func (this *MetaMgr) GetLaunchBlackList() *MtwLaunchBlackList {
}
}
func (this *MetaMgr) GetFixedBlockProvinceCity() *MtwBlockProvinceCity {
func (this *MetaMgr) GetFixedBlockRegion() *MtwBlockProvinceCity {
v, ok := this.MetaMgr.GetMetaById(MT_BLOCK_PROVINCE_CITY, 1).(*MtwBlockProvinceCity)
if ok {
return v

View File

@ -9,8 +9,8 @@ import (
)
type RiskMgr struct {
fixedBlockProvinceCityHash map[string]int32
fixedBlockProvinceCityHashMutex sync.RWMutex
fixedBlockRegionHash map[string]int32
fixedBlockRegionHashMutex sync.RWMutex
accessKeyId string
accessSecret string
@ -33,15 +33,15 @@ type RiskMgr struct {
}
func (this* RiskMgr) Init() *RiskMgr {
this.fixedBlockProvinceCityHashMutex.Lock()
this.fixedBlockRegionHashMutex.Lock()
this.gameHashMutex.Lock()
defer this.fixedBlockProvinceCityHashMutex.Unlock()
defer this.fixedBlockRegionHashMutex.Unlock()
defer this.gameHashMutex.Unlock()
this.fixedBlockProvinceCityHash = make(map[string]int32)
this.fixedBlockRegionHash = make(map[string]int32)
this.gameHash = make(map[int64]*GameConf)
for _, val := range G.MetaMgr.GetFixedBlockProvinceCity().GetList() {
this.fixedBlockProvinceCityHash[val] = 1
for _, val := range G.MetaMgr.GetFixedBlockRegion().GetList() {
this.fixedBlockRegionHash[val] = 1
}
this.accessKeyId = G.MetaMgr.GetAliKey().GetAccessKeyid()

View File

@ -151,7 +151,7 @@ func (this* GameConf) Init() {
for _, val := range G.MetaMgr.GetLaunchBlackList().GetList() {
this.launchBlackList[val] = 1
}
for _, val := range G.MetaMgr.GetFixedBlockProvinceCity().GetList() {
for _, val := range G.MetaMgr.GetFixedBlockRegion().GetList() {
this.blockProvinceCityHash[val] = 1
}
this.lastActiveTime = f5.App.NowUnix()