记牌器时间计算bug

This commit is contained in:
kxdd 2024-05-13 11:01:02 +08:00 committed by sk
parent c09c059b79
commit 45b05b1fe5
1 changed files with 5 additions and 1 deletions

View File

@ -4652,7 +4652,11 @@ func (this *Player) AddItemRecExpireTime(itemId int32, num, add int64, gainWay i
if this.ItemRecExpireTime == 0 {
this.ItemRecExpireTime = time.Now().Unix() + int64(itemData.Time)*3600*num
} else {
this.ItemRecExpireTime += int64(itemData.Time) * 3600 * num
if this.ItemRecExpireTime >= time.Now().Unix() {
this.ItemRecExpireTime += int64(itemData.Time) * 3600 * num
} else {
this.ItemRecExpireTime = time.Now().Unix() + int64(itemData.Time)*3600*num
}
}
}