道具创建时读取过期时间
This commit is contained in:
parent
2b4e932c6e
commit
3df44c2554
@ -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++
|
||||
|
Loading…
Reference in New Issue
Block a user