道具出售金额用int64

This commit is contained in:
sk 2024-08-24 15:49:07 +08:00
parent 4c0c6f7c2b
commit a040d30354
1 changed files with 5 additions and 4 deletions

View File

@ -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