This commit is contained in:
@@ -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 返回表名
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user