移除测试代码

This commit is contained in:
meixiongfeng 2023-08-11 17:22:49 +08:00
parent 317731f2d1
commit a56e96c86f
4 changed files with 25 additions and 11 deletions

View File

@ -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
}

View File

@ -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 {

View File

@ -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 权重

View File

@ -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 权重