商城兑换娃娃
This commit is contained in:
parent
ad8b3fe1ce
commit
532ff64d3b
|
@ -35,7 +35,7 @@ const (
|
|||
OpResultCode_OPRC_JCoinNotEnough OpResultCode = 8 //金券不足
|
||||
OpResultCode_OPRC_VipLevelNotEnough OpResultCode = 9 //Vip等级不足
|
||||
OpResultCode_OPRC_NotSIMCode OpResultCode = 10 //兑换码不足
|
||||
OpResultCode_OPRC_DCoinNotEnough OpResultCode = 11 //娃娃卡不足
|
||||
OpResultCode_OPRC_DCoinNotEnough OpResultCode = 11 //娃娃积分不足
|
||||
)
|
||||
|
||||
// Enum value maps for OpResultCode.
|
||||
|
|
|
@ -14,7 +14,7 @@ enum OpResultCode {
|
|||
OPRC_JCoinNotEnough = 8;//金券不足
|
||||
OPRC_VipLevelNotEnough = 9;//Vip等级不足
|
||||
OPRC_NotSIMCode = 10;//兑换码不足
|
||||
OPRC_DCoinNotEnough = 11;//娃娃卡不足
|
||||
OPRC_DCoinNotEnough = 11;//娃娃积分不足
|
||||
}
|
||||
// 商城
|
||||
enum SPacketID {
|
||||
|
|
|
@ -795,6 +795,7 @@ func (this *ShopMgr) GetExchangeData(platform string, id int32) *ExchangeShopInf
|
|||
JPrice: info.JPrice,
|
||||
Cash: info.Cash,
|
||||
Id: info.Id,
|
||||
DPrice: info.DPrice,
|
||||
})
|
||||
}
|
||||
var telData []*shop.TelChargeData
|
||||
|
@ -926,7 +927,7 @@ func (this *ShopMgr) Exchange(p *Player, goodsId int32, username, mobile, commen
|
|||
}
|
||||
if info.DPrice > 0 {
|
||||
n := int64(info.DPrice * num)
|
||||
item := BagMgrSingleton.GetItem(p.SnId, common.ItemIDJCard)
|
||||
item := BagMgrSingleton.GetItem(p.SnId, common.ItemDollCard)
|
||||
if item != nil && item.ItemNum >= n {
|
||||
BagMgrSingleton.AddItems(&model.AddItemParam{
|
||||
Platform: p.Platform,
|
||||
|
|
Loading…
Reference in New Issue