From 07cd30e7a04b1d2aace73c74b162fa4f0e4c91d3 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 13 Apr 2023 11:31:52 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8A=A0=E8=BE=93=E5=87=BA=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/comp_configure.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/comp_configure.go b/modules/comp_configure.go index 91c124dfb..97acd945d 100644 --- a/modules/comp_configure.go +++ b/modules/comp_configure.go @@ -166,7 +166,7 @@ func (this *MCompConfigure) GetGroupDataByLottery(lotteryId int32, vipLv int32, } 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) // 小组ID 类型判断 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 { // 该小组中的道具为概率掉落,每个道具都会随机一次是否会掉落(单位为千分比) for _, v := range this._groupType2[key] { if _data := this.GetLotterConfById(v); _data != nil { // 权重赋值 + fmt.Printf("大组类型1小组类型2获得道具 :%v, 该道具Cid:%d", _data.Itemid, v) if _data.Itemwt >= comm.GetRandNum(1, 1000) { // 命中 count := comm.GetRandNum(_data.Min, _data.Max) items = append(items, &cfg.Gameatn{ @@ -222,8 +223,10 @@ func (this *MCompConfigure) GetGroupDataByLottery(lotteryId int32, vipLv int32, } } } + // 类型为2 可能会同时获得多个组id for k, v := range gourp { + fmt.Printf("大组类型为2的,获得小组ID :%d,dropID:%d", k, v.Id) if v.Itemwt >= comm.GetRandNum(0, 1000) { // 命中 szGroupID = append(szGroupID, 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 { for _, v := range this._groupType2[key] { if _data := this.GetLotterConfById(v); _data != nil { // 权重赋值 + fmt.Printf("大组类型2小组类型2获得道具 :%v,该道具Cid:%d", _data.Itemid, v) if _data.Itemwt >= comm.GetRandNum(1, 1000) { // 命中 count := comm.GetRandNum(_data.Min, _data.Max) items = append(items, &cfg.Gameatn{ From f2d17bed05f2aaa55394edaa33f8ad269c445118 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 13 Apr 2023 12:27:19 +0800 Subject: [PATCH 2/2] update --- pb/smithy_db.pb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pb/smithy_db.pb.go b/pb/smithy_db.pb.go index 17f2bf217..6bd6c33f5 100644 --- a/pb/smithy_db.pb.go +++ b/pb/smithy_db.pb.go @@ -88,7 +88,7 @@ type DBStove struct { Skill map[int32]int32 `protobuf:"bytes,5,rep,name=skill,proto3" json:"skill" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 台子技能 Forge map[int32]int32 `protobuf:"bytes,6,rep,name=forge,proto3" json:"forge" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key 套装类型 value 打造次数 Temperature int32 `protobuf:"varint,7,opt,name=temperature,proto3" json:"temperature"` // 炉子温度 - RecoveTime int64 `protobuf:"varint,8,opt,name=recoveTime,proto3" json:"recoveTime"` // 恢复满时间 + RecoveTime int64 `protobuf:"varint,8,opt,name=recoveTime,proto3" json:"recoveTime" bson:"recoveTime"` //恢复满时间 Hit map[int32]int32 `protobuf:"bytes,9,rep,name=hit,proto3" json:"hit" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` }