道具创建时读取过期时间

This commit is contained in:
liwei1dao 2022-07-28 18:11:42 +08:00
parent 2b4e932c6e
commit 3df44c2554

View File

@ -323,6 +323,9 @@ func (this *ModelItemsComp) addItemToUserPack(uid string, items []*pb.DB_UserIte
CTime: time.Now().Unix(),
IsNewItem: isNew,
}
if conf.Time > 0 {
grid.ETime = time.Now().Add(time.Minute * time.Duration(conf.Time)).Unix()
}
items = append(items, grid)
add = append(add, grid)
leftnum = 0
@ -337,6 +340,9 @@ func (this *ModelItemsComp) addItemToUserPack(uid string, items []*pb.DB_UserIte
CTime: time.Now().Unix(),
IsNewItem: isNew,
}
if conf.Time > 0 {
grid.ETime = time.Now().Add(time.Minute * time.Duration(conf.Time)).Unix()
}
items = append(items, grid)
add = append(add, grid)
index++