From a040d3035411f2967a32be2d1ce750c78bd89d40 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Sat, 24 Aug 2024 15:49:07 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=93=E5=85=B7=E5=87=BA=E5=94=AE=E9=87=91?= =?UTF-8?q?=E9=A2=9D=E7=94=A8int64?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/action_bag.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/worldsrv/action_bag.go b/worldsrv/action_bag.go index ad535f0..3049b2f 100644 --- a/worldsrv/action_bag.go +++ b/worldsrv/action_bag.go @@ -286,12 +286,13 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e if isF { pack.RetCode = bag.OpResultCode_OPRC_Sucess if item.SaleGold > 0 { + n := int64(item.SaleGold) * int64(msg.ItemNum) if item.SaleType == 1 { - p.AddCoin(int64(item.SaleGold*msg.ItemNum), 0, common.GainWay_Item_Sale, "sys", remark) - pack.Coin = int64(item.SaleGold * msg.ItemNum) + p.AddCoin(n, 0, common.GainWay_Item_Sale, "sys", remark) + pack.Coin = n } else if item.SaleType == 2 { - p.AddDiamond(int64(item.SaleGold*msg.ItemNum), 0, common.GainWay_Item_Sale, "sys", remark) - pack.Diamond = int64(item.SaleGold * msg.ItemNum) + p.AddDiamond(n, 0, common.GainWay_Item_Sale, "sys", remark) + pack.Diamond = n } } pack.NowItemId = item.ItemId