道具出售金额用int64
This commit is contained in:
parent
4c0c6f7c2b
commit
a040d30354
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue