|
|
@@ -293,7 +293,7 @@ type RoleLogicOuter interface {
|
|
|
//pay
|
|
|
CheckRushShopInfoGet(goodsType, goodsId, count int32) bool
|
|
|
PayInfoGet(goodsType, goodsId, count int32, rushStage, rushRound int32, cpOrderId uint64, sdkOrderId string)
|
|
|
- OnPayCallback(payRewardInfo *serverproto.PayOrderSaveInfo, bSave bool, bAck bool)
|
|
|
+ OnPayCallback(payRewardInfo *serverproto.PayOrderSaveInfo, bSave bool, bAck, bcash bool)
|
|
|
OnPayCallback2(cpOrderId uint64)
|
|
|
CheckOrderInfo(payRewardInfo *serverproto.PayOrderSaveInfo) bool
|
|
|
|
|
|
@@ -3695,7 +3695,7 @@ func (this *Role) PayInfoGet(goodsType, goodsId, count int32, rushStage, rushRou
|
|
|
//内网PC模式下直接购买成功
|
|
|
ackMsg.Error = int32(serverproto.ErrorCode_ERROR_PAY_PRODUCTION_MODE)
|
|
|
this.ReplayGate(ackMsg, true)
|
|
|
- this.OnPayCallback(payOrderInfo, false, false)
|
|
|
+ this.OnPayCallback(payOrderInfo, false, 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
|
|
|
} else if service.GetServiceConfig().Node.AuthMode == AUTHMODE_ACTIVE {
|
|
|
@@ -4011,10 +4011,13 @@ func (this *Role) payInfoGet(goodsType, goodsId, count int32, rushStage, rushRou
|
|
|
return serverproto.ErrorCode_ERROR_OK, payRewardInfo
|
|
|
}
|
|
|
|
|
|
-func (this *Role) OnPayCallback(payRewardInfo *serverproto.PayOrderSaveInfo, bSave bool, bAck bool) {
|
|
|
+func (this *Role) OnPayCallback(payRewardInfo *serverproto.PayOrderSaveInfo, bSave bool, bAck, bCash bool) {
|
|
|
//获取充值奖励
|
|
|
var addItemList = map[int32]int32{}
|
|
|
for idx := 0; idx < len(payRewardInfo.RewardList); idx++ {
|
|
|
+ if bCash && (payRewardInfo.RewardList[idx].Key == int32(serverproto.ResType_Res_ROCoin) || payRewardInfo.RewardList[idx].Key == int32(serverproto.ResType_Res_VipExp)) {
|
|
|
+ continue
|
|
|
+ }
|
|
|
addItemList[payRewardInfo.RewardList[idx].Key] += payRewardInfo.RewardList[idx].Value
|
|
|
}
|
|
|
if this.GetRoleBag().CanAddItemList(addItemList) == serverproto.ErrorCode_ERROR_OK {
|
|
|
@@ -4096,8 +4099,10 @@ func (this *Role) OnPayCallback(payRewardInfo *serverproto.PayOrderSaveInfo, bSa
|
|
|
this.ReplayGate(ntfMsg, true)
|
|
|
|
|
|
//充值金额 payRewardInfo.Amount
|
|
|
- // 充值成功后的系统相关处理
|
|
|
- this.GetRoleBase().AddPayRecharge(payRewardInfo)
|
|
|
+ // 充值成功后的系统相关处理,代金券购买的不计入
|
|
|
+ if bCash {
|
|
|
+ this.GetRoleBase().AddPayRecharge(payRewardInfo)
|
|
|
+ }
|
|
|
////////
|
|
|
if bSave {
|
|
|
payRewardInfo.OrderState = int32(serverproto.PayOrderState_EPayOrderState_PayOkReward)
|
|
|
@@ -4147,7 +4152,7 @@ func (this *Role) GMPay(amount float32) {
|
|
|
Amount: amount,
|
|
|
OrderProcessTime: util.GetTimeMilliseconds(),
|
|
|
}
|
|
|
- this.OnPayCallback(payRewardInfo, false, false)
|
|
|
+ this.OnPayCallback(payRewardInfo, false, false, false)
|
|
|
}
|
|
|
|
|
|
func (this *Role) GMCalAttr() {
|