diff --git a/modules/activity/module.go b/modules/activity/module.go index 4334c5ed4..fedbe04d5 100644 --- a/modules/activity/module.go +++ b/modules/activity/module.go @@ -278,7 +278,7 @@ func (this *Activity) HDCelebration(session comm.IUserSession, systemtype int32, // 天数 var idays int32 for i, v1 := range conf.Bosstype { - if v1 == systemtype || v1 == 0 { // bosstype 为0 表示所有的boss 类型都算 + if v1 == bosstype || v1 == 0 { // bosstype 为0 表示所有的boss 类型都算 idays = conf.Num[i] break } diff --git a/modules/pagoda/api_racechallenge.go b/modules/pagoda/api_racechallenge.go index 1d724f4cb..d3224f0e4 100644 --- a/modules/pagoda/api_racechallenge.go +++ b/modules/pagoda/api_racechallenge.go @@ -45,10 +45,15 @@ func (this *apiComp) ChallengeRace(session comm.IUserSession, req *pb.PagodaChal if curWeekDay == 0 { curWeekDay = 7 } - for _, v := range conf.Openingtime { - if v == curWeekDay { - timeCheckOk = true - break + + if len(conf.Openingtime) == 0 { + timeCheckOk = true + } else { + for _, v := range conf.Openingtime { + if v == curWeekDay { + timeCheckOk = true + break + } } } if !timeCheckOk { diff --git a/modules/stonehenge/configure.go b/modules/stonehenge/configure.go index cf77aadc5..e2fed2908 100644 --- a/modules/stonehenge/configure.go +++ b/modules/stonehenge/configure.go @@ -223,7 +223,8 @@ func (this *configureComp) GetEventGroupDataByLottery(lotterys ...int32) (event } } - } else if this.BtypeE[lotteryId] == 2 { // 该大组中的小组为概率掉落,每个小组都会随机一次是否会掉落(单位为千分比) + } + if this.BtypeE[lotteryId] == 2 { // 该大组中的小组为概率掉落,每个小组都会随机一次是否会掉落(单位为千分比) // 每个小组id 都随机取一次 var szGroupID []int32 // 获得的权重数组 gourp := make([]*cfg.GameEventlotteryData, 0) // key 小组ID value 权重 @@ -405,7 +406,8 @@ func (this *configureComp) GetRoomGroupDataByLottery(lotteryId int32) (rooms []i } return } - } else if this.BtypeR[lotteryId] == 2 { // 该大组中的小组为概率掉落,每个小组都会随机一次是否会掉落(单位为千分比) + } + if this.BtypeR[lotteryId] == 2 { // 该大组中的小组为概率掉落,每个小组都会随机一次是否会掉落(单位为千分比) // 每个小组id 都随机取一次 var szGroupID []int32 // 获得的权重数组 gourp := make([]*cfg.GameRoomlotteryData, 0) // key 小组ID value 权重 diff --git a/modules/tools/comp_configure.go b/modules/tools/comp_configure.go index 613004896..dad9a7d22 100644 --- a/modules/tools/comp_configure.go +++ b/modules/tools/comp_configure.go @@ -89,7 +89,6 @@ func (this *MCompConfigure) Init(service core.IService, module core.IModule, com this.SNum = make(map[int64]int32, 0) configure.RegisterConfigure(game_lottery, cfg.NewGameLottery, this.LoadGroupData) - this.GetGroupDataByLottery(30020, 0, 1) return } @@ -106,6 +105,7 @@ func (this *MCompConfigure) LoadGroupData() { this.Btype = make(map[int32]int32, 0) this.Stype = make(map[int64]int32, 0) this.SNum = make(map[int64]int32, 0) + var tmp int64 for _, value := range configure.GetDataList() { key := int64(value.Lotteryid)<<31 + int64(value.Groupid) this._group[key] = append(this._group[key], value.Id) @@ -135,9 +135,15 @@ func (this *MCompConfigure) LoadGroupData() { this.SNum[key] = value.Groupnum } if this.Btype[value.Lotteryid] == 1 { - this._lotteryType1[value.Lotteryid] = append(this._lotteryType1[value.Lotteryid], value.Id) + if tmp != key { + this._lotteryType1[value.Lotteryid] = append(this._lotteryType1[value.Lotteryid], value.Id) + tmp = key + } } else if this.Btype[value.Lotteryid] == 2 { - this._lotteryType2[value.Lotteryid] = append(this._lotteryType2[value.Lotteryid], value.Id) + if tmp != key { + this._lotteryType2[value.Lotteryid] = append(this._lotteryType2[value.Lotteryid], value.Id) + tmp = key + } } if this.Stype[key] == 1 { // 小组ID为1 @@ -234,7 +240,8 @@ func (this *MCompConfigure) GetGroupDataByLottery(lotteryId int32, vipLv int32, } return } - } else if this.Btype[lotteryId] == 2 { // 该大组中的小组为概率掉落,每个小组都会随机一次是否会掉落(单位为千分比) + } + if this.Btype[lotteryId] == 2 { // 该大组中的小组为概率掉落,每个小组都会随机一次是否会掉落(单位为千分比) // 每个小组id 都随机取一次 var szGroupID []int32 // 获得的权重数组 gourp := make([]*cfg.GameLotteryData, 0) // key 小组ID value 权重