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

This commit is contained in:
xinian
2026-02-10 23:06:41 +08:00
committed by cnb
parent cbfaef7fbb
commit 519f2c69a5
2 changed files with 9 additions and 6 deletions

View File

@@ -29,8 +29,11 @@ func (s *EggService) Get() (out *model.Egg) {
s.TestModel(s.Model).Scan(&out)
if out != nil {
BreedLeftTime := int64(out.Data.StartTime+out.CurEgg.EggID*uint32(time.Hour/1000000000)) - (time.Now().Unix())
if cool.Config.ServerInfo.IsVip != 0 {
BreedLeftTime = 0
}
//判断是否繁殖完成
if BreedLeftTime < 0 && out.Data.HatchState == 1 {
if BreedLeftTime <= 0 && out.Data.HatchState == 1 {
out.Data.HatchState = 2
} else {
out.Data.HatchLeftTime = uint32(BreedLeftTime)