1
This commit is contained in:
@@ -33,7 +33,7 @@ func (s *PetFusionMaterialService) Data(Material1 [4]uint32) uint32 {
|
||||
|
||||
cacheKey := strings.Join(gconv.Strings(Material1[:]), ":")
|
||||
println(cacheKey, "获取融合id")
|
||||
fusions := service.DictInfoServiceS.GetData("fusion")
|
||||
fusions := service.NewDictInfoService().GetData("fusion")
|
||||
|
||||
for _, v := range Material1 {
|
||||
// if v < 10000 {
|
||||
@@ -57,12 +57,12 @@ func (s *PetFusionMaterialService) Data(Material1 [4]uint32) uint32 {
|
||||
"material4": Material1[3],
|
||||
"is_enable": 1,
|
||||
}
|
||||
m.Where(condition) .Scan(&effect)
|
||||
m.Where(condition).Scan(&effect)
|
||||
//这时候有可能效果是空的,那么这时候就再次查询默认的特性,保证每次必会生成一个数据库有的特性
|
||||
//也许这个时候的特性配方就是随机从数据库中查找一个特性
|
||||
|
||||
if effect == nil {
|
||||
effect2s := service.DictInfoServiceS.GetData("effect")
|
||||
effect2s := service.NewDictInfoService().GetData("effect")
|
||||
for _, v := range effect2s {
|
||||
return gconv.Uint32(v.Value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user