``` refactor(pet): 优化宠物特性随机逻辑并修复宠物删除数组操作
This commit is contained in:
@@ -46,7 +46,7 @@ func (s *PetFusionService) Data(p1, p2, rand uint32) uint32 {
|
||||
return 0
|
||||
}
|
||||
pets := s.def()
|
||||
res := pets[grand.Intn(len(pets)-1)]
|
||||
res := pets[grand.Intn(len(pets))]
|
||||
rr := grand.Intn(100)
|
||||
if rr < int(res.Probability+int32(rand)) {
|
||||
return uint32(res.ResultPetID)
|
||||
|
||||
Reference in New Issue
Block a user