1
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
昔念
2026-02-21 17:41:49 +08:00
parent 379e3c8ce6
commit f404a92387
4 changed files with 33 additions and 16 deletions

View File

@@ -43,7 +43,7 @@ func (s *ShinyService) ModifyBefore(ctx context.Context, method string, param g.
}
return nil
}
func (s *ShinyService) RandShiny(id uint32) *model.ColorfulSkin {
func (s *ShinyService) RandShiny(id uint32) *data.GlowFilter {
var ret []model.ColorfulSkin
@@ -64,19 +64,19 @@ func (s *ShinyService) RandShiny(id uint32) *model.ColorfulSkin {
m.Increment("usage_count", 1)
}
return &v
return &v.Color
}
}
r := model.GenerateRandomOffspringMatrix()
var t data.GlowFilter
var ret1 model.ColorfulSkin
var t = data.GetDef()
t.ColorMatrixFilter = r.Get()
ret1.Color = t
return &ret1
return &t
}
func (s *ShinyService) RandomByWeightShiny(id uint32) *model.ColorfulSkin {
func (s *ShinyService) RandomByWeightShiny(id uint32) *data.GlowFilter {
var ret []model.ColorfulSkin
@@ -102,7 +102,7 @@ func (s *ShinyService) RandomByWeightShiny(id uint32) *model.ColorfulSkin {
m.Increment("refresh_count", 1)
}
return &r
return &r.Color
}
func (s *ShinyService) GetShiny(id int) *data.GlowFilter {

View File

@@ -218,14 +218,14 @@ func (pet *PetInfo) Cure() {
func (pet *PetInfo) FixShiny() {
co := service.NewShinyService().RandShiny(pet.ID)
pet.ShinyInfo = append(pet.ShinyInfo, co.Color)
pet.ShinyInfo = append(pet.ShinyInfo, *co)
}
// 比重融合
func (pet *PetInfo) RandomByWeightShiny() {
co := service.NewShinyService().RandomByWeightShiny(pet.ID)
pet.ShinyInfo = append(pet.ShinyInfo, co.Color)
pet.ShinyInfo = append(pet.ShinyInfo, *co)
}
func (pet *PetInfo) IsShiny() bool {