1
This commit is contained in:
parent
cab594d969
commit
175c94fbc9
@ -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)
|
v, ok := this.MetaMgr.GetMetaById(MT_BLOCK_PROVINCE_CITY, 1).(*MtwBlockProvinceCity)
|
||||||
if ok {
|
if ok {
|
||||||
return v
|
return v
|
||||||
|
@ -9,8 +9,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type RiskMgr struct {
|
type RiskMgr struct {
|
||||||
fixedBlockProvinceCityHash map[string]int32
|
fixedBlockRegionHash map[string]int32
|
||||||
fixedBlockProvinceCityHashMutex sync.RWMutex
|
fixedBlockRegionHashMutex sync.RWMutex
|
||||||
|
|
||||||
accessKeyId string
|
accessKeyId string
|
||||||
accessSecret string
|
accessSecret string
|
||||||
@ -33,15 +33,15 @@ type RiskMgr struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this* RiskMgr) Init() *RiskMgr {
|
func (this* RiskMgr) Init() *RiskMgr {
|
||||||
this.fixedBlockProvinceCityHashMutex.Lock()
|
this.fixedBlockRegionHashMutex.Lock()
|
||||||
this.gameHashMutex.Lock()
|
this.gameHashMutex.Lock()
|
||||||
defer this.fixedBlockProvinceCityHashMutex.Unlock()
|
defer this.fixedBlockRegionHashMutex.Unlock()
|
||||||
defer this.gameHashMutex.Unlock()
|
defer this.gameHashMutex.Unlock()
|
||||||
|
|
||||||
this.fixedBlockProvinceCityHash = make(map[string]int32)
|
this.fixedBlockRegionHash = make(map[string]int32)
|
||||||
this.gameHash = make(map[int64]*GameConf)
|
this.gameHash = make(map[int64]*GameConf)
|
||||||
for _, val := range G.MetaMgr.GetFixedBlockProvinceCity().GetList() {
|
for _, val := range G.MetaMgr.GetFixedBlockRegion().GetList() {
|
||||||
this.fixedBlockProvinceCityHash[val] = 1
|
this.fixedBlockRegionHash[val] = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
this.accessKeyId = G.MetaMgr.GetAliKey().GetAccessKeyid()
|
this.accessKeyId = G.MetaMgr.GetAliKey().GetAccessKeyid()
|
||||||
|
@ -151,7 +151,7 @@ func (this* GameConf) Init() {
|
|||||||
for _, val := range G.MetaMgr.GetLaunchBlackList().GetList() {
|
for _, val := range G.MetaMgr.GetLaunchBlackList().GetList() {
|
||||||
this.launchBlackList[val] = 1
|
this.launchBlackList[val] = 1
|
||||||
}
|
}
|
||||||
for _, val := range G.MetaMgr.GetFixedBlockProvinceCity().GetList() {
|
for _, val := range G.MetaMgr.GetFixedBlockRegion().GetList() {
|
||||||
this.blockProvinceCityHash[val] = 1
|
this.blockProvinceCityHash[val] = 1
|
||||||
}
|
}
|
||||||
this.lastActiveTime = f5.App.NowUnix()
|
this.lastActiveTime = f5.App.NowUnix()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user