``` refactor(pet): 优化宠物特性随机逻辑并修复宠物删除数组操作

This commit is contained in:
1
2025-12-30 02:15:33 +00:00
parent 94391abe5f
commit f91b88e90f
5 changed files with 17 additions and 21 deletions

View File

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