1
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
昔念
2026-04-20 01:02:57 +08:00
parent 04038cd16b
commit d517c822ef
3 changed files with 9 additions and 9 deletions

View File

@@ -5,7 +5,6 @@ import (
"blazing/common/data/xmlres"
"blazing/common/utils"
"blazing/cool"
"encoding/json"
"blazing/modules/config/model"
"blazing/modules/config/service"
@@ -154,11 +153,10 @@ type PetInfo struct {
}
func (pet *PetInfo) ConfigBoss(bm model.PetBaseConfig) {
var color data.GlowFilter
err := json.Unmarshal([]byte(bm.Color), &color)
if err == nil && color.Alpha != 0 {
pet.ShinyInfo = append(pet.ShinyInfo, color)
if bm.ColorID > 0 {
if color := service.NewShinyService().GetShiny(int(bm.ColorID)); color != nil {
pet.ShinyInfo = append(pet.ShinyInfo, *color)
}
}
if bm.Skin > 0 {
pet.SkinID = uint32(bm.Skin)