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