Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
a6bbad1bef
@ -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{
|
||||||
|
@ -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"` // 台子技能
|
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 打造次数
|
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"` // 炉子温度
|
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"`
|
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"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user