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

This commit is contained in:
昔念
2026-02-09 01:29:33 +08:00
parent ffe3ff18bf
commit 2860bcfa5c
12 changed files with 319 additions and 64 deletions

View File

@@ -51,6 +51,7 @@ type EggInfo struct {
EggID uint32 `json:"eggID"` // 精灵蛋ID
MalePetID uint32 `json:"male"` // 雄性精灵ID
FeMalePetID uint32 `json:"female"` // 雌性精灵ID
//ShinyCode uint32 `struc:"skip"` //返回记录
}
// TableName 返回表名

View File

@@ -422,6 +422,9 @@ func GenPetInfo(
dv, natureId, abilityTypeEnum, level int, shinyid []data.GlowFilter,
gen int,
) *PetInfo {
if id == 0 {
return nil
}
// 创建随机源
//rng := rand.New(rand.NewSource(time.Now().UnixNano()))
@@ -447,6 +450,9 @@ func GenPetInfo(
if gen == -1 {
p.Gender = grand.N(1, 4)
if cool.Config.ServerInfo.IsVip != 0 {
p.Gender = grand.N(1, 2)
}
if p.Gender == 3 || p.Gender == 4 {
p.Gender = 0