加输出日志
This commit is contained in:
parent
7bde16235f
commit
07cd30e7a0
@ -166,7 +166,7 @@ func (this *MCompConfigure) GetGroupDataByLottery(lotteryId int32, vipLv int32,
|
|||||||
}
|
}
|
||||||
|
|
||||||
groupID = szID[comm.GetRandW(szW)] // 获得小组ID
|
groupID = szID[comm.GetRandW(szW)] // 获得小组ID
|
||||||
fmt.Printf("获得小组ID :%d", groupID)
|
fmt.Printf("大组类型为1的,获得小组ID :%d,dropID:%d", groupID, lotteryId)
|
||||||
key := int64(lotteryId)<<31 + int64(groupID)
|
key := int64(lotteryId)<<31 + int64(groupID)
|
||||||
// 小组ID 类型判断
|
// 小组ID 类型判断
|
||||||
if this.Stype[key] == 1 { // 该小组的道具为权重掉落,必定从N个道具中随机出1个道具
|
if this.Stype[key] == 1 { // 该小组的道具为权重掉落,必定从N个道具中随机出1个道具
|
||||||
@ -197,6 +197,7 @@ func (this *MCompConfigure) GetGroupDataByLottery(lotteryId int32, vipLv int32,
|
|||||||
} else if this.Stype[key] == 2 { // 该小组中的道具为概率掉落,每个道具都会随机一次是否会掉落(单位为千分比)
|
} else if this.Stype[key] == 2 { // 该小组中的道具为概率掉落,每个道具都会随机一次是否会掉落(单位为千分比)
|
||||||
for _, v := range this._groupType2[key] {
|
for _, v := range this._groupType2[key] {
|
||||||
if _data := this.GetLotterConfById(v); _data != nil { // 权重赋值
|
if _data := this.GetLotterConfById(v); _data != nil { // 权重赋值
|
||||||
|
fmt.Printf("大组类型1小组类型2获得道具 :%v, 该道具Cid:%d", _data.Itemid, v)
|
||||||
if _data.Itemwt >= comm.GetRandNum(1, 1000) { // 命中
|
if _data.Itemwt >= comm.GetRandNum(1, 1000) { // 命中
|
||||||
count := comm.GetRandNum(_data.Min, _data.Max)
|
count := comm.GetRandNum(_data.Min, _data.Max)
|
||||||
items = append(items, &cfg.Gameatn{
|
items = append(items, &cfg.Gameatn{
|
||||||
@ -222,8 +223,10 @@ func (this *MCompConfigure) GetGroupDataByLottery(lotteryId int32, vipLv int32,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 类型为2 可能会同时获得多个组id
|
// 类型为2 可能会同时获得多个组id
|
||||||
for k, v := range gourp {
|
for k, v := range gourp {
|
||||||
|
fmt.Printf("大组类型为2的,获得小组ID :%d,dropID:%d", k, v.Id)
|
||||||
if v.Itemwt >= comm.GetRandNum(0, 1000) { // 命中
|
if v.Itemwt >= comm.GetRandNum(0, 1000) { // 命中
|
||||||
szGroupID = append(szGroupID, k)
|
szGroupID = append(szGroupID, k)
|
||||||
key := int64(lotteryId)<<31 + int64(k)
|
key := int64(lotteryId)<<31 + int64(k)
|
||||||
@ -254,6 +257,7 @@ func (this *MCompConfigure) GetGroupDataByLottery(lotteryId int32, vipLv int32,
|
|||||||
} else if this.Stype[key] == 2 {
|
} else if this.Stype[key] == 2 {
|
||||||
for _, v := range this._groupType2[key] {
|
for _, v := range this._groupType2[key] {
|
||||||
if _data := this.GetLotterConfById(v); _data != nil { // 权重赋值
|
if _data := this.GetLotterConfById(v); _data != nil { // 权重赋值
|
||||||
|
fmt.Printf("大组类型2小组类型2获得道具 :%v,该道具Cid:%d", _data.Itemid, v)
|
||||||
if _data.Itemwt >= comm.GetRandNum(1, 1000) { // 命中
|
if _data.Itemwt >= comm.GetRandNum(1, 1000) { // 命中
|
||||||
count := comm.GetRandNum(_data.Min, _data.Max)
|
count := comm.GetRandNum(_data.Min, _data.Max)
|
||||||
items = append(items, &cfg.Gameatn{
|
items = append(items, &cfg.Gameatn{
|
||||||
|
Loading…
Reference in New Issue
Block a user