From 4fd3ef80d767c656f3a0ab1fd17b4e03fdf5b926 Mon Sep 17 00:00:00 2001 From: hahwu <31872165+hahwu@users.noreply.github.com> Date: Tue, 14 Apr 2026 22:17:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BB=BA=E9=80=A0=E6=89=93=E6=8A=98=E7=9A=84?= =?UTF-8?q?=E5=AE=A0=E7=89=A9=E5=B8=81=E5=90=91=E4=B8=8A=E5=8F=96=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/game/mod/decorate/Decorate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/game/mod/decorate/Decorate.go b/src/server/game/mod/decorate/Decorate.go index bf0e2de5..7fb9d4f0 100644 --- a/src/server/game/mod/decorate/Decorate.go +++ b/src/server/game/mod/decorate/Decorate.go @@ -98,7 +98,7 @@ func (d *Decorate) GetDecorateCostItem(areaId, decorateId int, decorateOffIsExis id := decorateCfg.GetIdBySenceAndLv(areaId, decorateId) if decorateOffIsExist { offRate := limitedTimeEventCfg.GetDecorateOffDiscount(areaId, decorateId) - itemNum = int(math.Round(float64(itemNum) * float64(offRate) / 100)) + itemNum = int(math.Ceil(float64(itemNum) * float64(offRate) / 100)) } items := []*item.Item{item.NewItem(item.ITEM_STAR_ID, itemNum)} partCostInfo := d.PartCost[id] @@ -157,7 +157,7 @@ func (d *Decorate) DecorateAll(star int, decorateOffIsExist bool) ([]*item.Item, needStar := decorateCfg.GetStarCost(d.AreaId, v) if decorateOffIsExist { offRate := limitedTimeEventCfg.GetDecorateOffDiscount(d.AreaId, v) - needStar = int(math.Round(float64(needStar) * float64(offRate) / 100)) + needStar = int(math.Ceil(float64(needStar) * float64(offRate) / 100)) } if star < needStar { break