This commit is contained in:
@@ -163,18 +163,17 @@ func (s *EggService) GetEgg() *model.PetInfo {
|
||||
|
||||
dv := grand.N(int(tt.Data.Intimacy+tt.CurEgg.EggID*2), 31)
|
||||
p := model.GenPetInfo(int(mpets), dv, -1, 0, 1, nil, -1)
|
||||
shinycont := 0
|
||||
|
||||
if mpets != tt.CurEgg.MalePetID && mpets != tt.CurEgg.FeMalePetID {
|
||||
shinycont = int(tt.CurEgg.EggID) * int(tt.CurEgg.EggID)
|
||||
shinycont := int(tt.CurEgg.EggID) * int(tt.CurEgg.EggID)
|
||||
if grand.Meet(shinycont, 100) {
|
||||
p.FixShiny()
|
||||
}
|
||||
}
|
||||
|
||||
if grand.Meet(shinycont, 100) {
|
||||
p.FixShiny()
|
||||
}
|
||||
//直接覆盖当前蛋
|
||||
tt.Data.HatchState = 0
|
||||
p.Generation = uint16(tt.CurEgg.EggID) + 1
|
||||
p.Generation = uint16(tt.CurEgg.EggID)
|
||||
tt.CurEgg = model.EggInfo{}
|
||||
s.dbm(s.Model).Save(tt)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user