|
|
@@ -3571,6 +3571,14 @@ func (this *Role) PayInfoGet(goodsType, goodsId, count int32, rushStage, rushRou
|
|
|
})
|
|
|
//this.role.AddRes(int32(serverproto.ResType_Res_VipExp), AddItemST{ItemCount: int32(vipExp)}, true)
|
|
|
}
|
|
|
+ if payOrderInfo.GoodsName == "czk" {
|
|
|
+ //内网PC模式下直接购买成功
|
|
|
+ ackMsg.Error = int32(serverproto.ErrorCode_ERROR_PAY_PRODUCTION_MODE)
|
|
|
+ this.ReplayGate(ackMsg, true)
|
|
|
+ this.OnPayCallback(payOrderInfo, false, false)
|
|
|
+ util.InfoF("uid=%v pc mode: shop:%v id:%v, count:%v, price:%v", this.GetUUid(), payOrderInfo.GoodsType, payOrderInfo.GoodsId, payOrderInfo.Count, payOrderInfo.Amount)
|
|
|
+ return
|
|
|
+ }
|
|
|
|
|
|
if service.GetServiceConfig().Node.AuthMode == AUTHMODE_PC {
|
|
|
//内网PC模式下直接购买成功
|
|
|
@@ -3704,24 +3712,30 @@ func (this *Role) payInfoGet(goodsType, goodsId, count int32, rushStage, rushRou
|
|
|
default:
|
|
|
return serverproto.ErrorCode_ERROR_FAIL, nil
|
|
|
}
|
|
|
-
|
|
|
+ payRewardInfo.GoodsName = service.GetServiceConfig().Node.PayCallBack
|
|
|
//检测是否有充值卡自动使用
|
|
|
num := this.GetItemNum(22512)
|
|
|
if num > 0 {
|
|
|
cfgData, ok := serverproto.ItemCfgLoader[22512]
|
|
|
+
|
|
|
if ok {
|
|
|
//有效期内
|
|
|
- if int64(this.roleBag.getItemById(22512).TimeStamp+uint32(cfgData.ItemTimeCd)) < util.GetTimeSeconds() {
|
|
|
- util.InfoF("buy shop amount:%v,card use:%v", payRewardInfo.Amount, cfgData.NatureType)
|
|
|
- if (payRewardInfo.Amount - float32(cfgData.NatureType)) <= 0 {
|
|
|
- payRewardInfo.Amount = 0
|
|
|
+ for k, itemData := range this.roleBag.itemList {
|
|
|
+ if itemData.ConfigId == 22512 {
|
|
|
+ if int64(itemData.TimeStamp+uint32(cfgData.ItemTimeCd)) < util.GetTimeSeconds() {
|
|
|
+ util.InfoF("buy shop amount:%v,card use:%v ,time1:%v ,time2:%v", payRewardInfo.Amount, cfgData.NatureType, itemData.TimeStamp, cfgData.ItemTimeCd)
|
|
|
+ if (payRewardInfo.Amount - float32(cfgData.NatureType)) <= 0 {
|
|
|
+ //payRewardInfo.Amount = 0
|
|
|
+ payRewardInfo.GoodsName = "czk" //充值卡
|
|
|
+ this.roleBag.DelItemById(k, 1, AddFrom_System)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- this.roleBag.DelItemById(22512, 1, AddFrom_System)
|
|
|
}
|
|
|
|
|
|
- payRewardInfo.GoodsName = service.GetServiceConfig().Node.PayCallBack
|
|
|
return serverproto.ErrorCode_ERROR_OK, payRewardInfo
|
|
|
}
|
|
|
|