条件过滤
This commit is contained in:
parent
218f1d5665
commit
a0393cfc02
@ -743,7 +743,7 @@ func (this *ModuleBase) FormatRes(res []*cfg.Gameatn) (ret []*cfg.Gameatn) {
|
||||
}
|
||||
}
|
||||
for k, v := range attrs {
|
||||
if v >= 0 {
|
||||
if v > 0 {
|
||||
ret = append(ret, &cfg.Gameatn{
|
||||
A: "attr",
|
||||
T: k,
|
||||
@ -753,7 +753,7 @@ func (this *ModuleBase) FormatRes(res []*cfg.Gameatn) (ret []*cfg.Gameatn) {
|
||||
|
||||
}
|
||||
for k, v := range items {
|
||||
if v >= 0 {
|
||||
if v > 0 {
|
||||
ret = append(ret, &cfg.Gameatn{
|
||||
A: "item",
|
||||
T: k,
|
||||
|
@ -79,22 +79,28 @@ func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEq
|
||||
}
|
||||
// 是否是精益打造
|
||||
if req.Quality > 0 {
|
||||
if len(reelcfg.RefineCos) > 0 {
|
||||
costRes = append(costRes, reelcfg.RefineCos...)
|
||||
}
|
||||
bQuality = true
|
||||
}
|
||||
// 校验是不是装备定制打造
|
||||
if req.SuiteId != 0 {
|
||||
if req.Position == -1 {
|
||||
if len(reelcfg.CustomizedCos1) > 0 {
|
||||
if errdata = this.module.CheckRes(session, reelcfg.CustomizedCos1); errdata != nil {
|
||||
return
|
||||
}
|
||||
costRes = append(costRes, reelcfg.CustomizedCos1...)
|
||||
}
|
||||
} else {
|
||||
if len(reelcfg.CustomizedCos2) > 0 {
|
||||
if errdata = this.module.CheckRes(session, reelcfg.CustomizedCos2); errdata != nil {
|
||||
return
|
||||
}
|
||||
costRes = append(costRes, reelcfg.CustomizedCos2...)
|
||||
}
|
||||
}
|
||||
// 随机权重 获取等级
|
||||
index := this.module.modelStove.GetRandEquipLv(reelcfg.CustomizedLvDistribution)
|
||||
if int32(len(reelcfg.CustomizedLv)) > index {
|
||||
|
Loading…
Reference in New Issue
Block a user