条件过滤

This commit is contained in:
meixiongfeng 2023-06-20 14:50:09 +08:00
parent 218f1d5665
commit a0393cfc02
2 changed files with 15 additions and 9 deletions

View File

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

View File

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