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