From 45b05b1fe583443657f03ff000711ddb729f4498 Mon Sep 17 00:00:00 2001 From: kxdd <39694055+shaojiayao@users.noreply.github.com> Date: Mon, 13 May 2024 11:01:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=B0=E7=89=8C=E5=99=A8=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E8=AE=A1=E7=AE=97bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/player.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/worldsrv/player.go b/worldsrv/player.go index 4152837..8bdf096 100644 --- a/worldsrv/player.go +++ b/worldsrv/player.go @@ -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 + } } }