This commit is contained in:
@@ -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 精灵特性信息结构
|
||||
|
||||
Reference in New Issue
Block a user