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