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

This commit is contained in:
xinian
2026-02-17 22:36:18 +08:00
committed by cnb
parent ac0318b3f4
commit 756edc1cdd
8 changed files with 72 additions and 16 deletions

View File

@@ -5,6 +5,7 @@ import (
"blazing/common/data/xmlres"
"blazing/common/utils"
"blazing/cool"
"blazing/logic/service/player"
"blazing/modules/config/service"
"errors"
"fmt"
@@ -222,15 +223,31 @@ func (pet *PetInfo) RandShiny() {
//g.Dump(ttt.ShinyInfo)
// ttt.Shiny = 0 //待确认是否刷新异色
}
// 强制选色
func (pet *PetInfo) FixShiny() {
co := service.NewShinyService().FixShiny(pet.ID)
if co != nil {
pet.ShinyInfo = append(pet.ShinyInfo, co.Color)
} else {
r := player.GenerateRandomOffspringMatrix()
var t data.GlowFilter
t.ColorMatrixFilter = r.Get()
pet.ShinyInfo = append(pet.ShinyInfo, t)
}
//o.ShinyInfo[0].ColorMatrixFilter = GenerateRandomOffspringMatrix().Get()
//g.Dump(ttt.ShinyInfo)
// ttt.Shiny = 0 //待确认是否刷新异色
}
// 比重融合
func (pet *PetInfo) RandomByWeightShiny() {
co := service.NewShinyService().RandomByWeightShiny(pet.ID)
if co != nil {
pet.ShinyInfo = append(pet.ShinyInfo, co.Color)
}
}
func (pet *PetInfo) IsShiny() bool {
@@ -354,7 +371,7 @@ func calculateExperience(level uint32, baseValue uint32) int64 {
// 总经验是两部分之和,并向上取整
totalExp := math.Ceil(partA + partB)
return int64(totalExp)
return int64(totalExp)
}
// PetEffectInfo 精灵特性信息结构