Browse Source

增加部分购买项不计入累充

gitxsm 3 tháng trước cách đây
mục cha
commit
a5385d5e6f

+ 6 - 2
script/module/absAct/CommonActLoginGift.lua

@@ -145,7 +145,11 @@ function isActive(human, YYInfo, funcConfig)
     return not isOpen(human, YYInfo, funcConfig)
 end
 
-function onCharge(human, price, funcID, buyID, buyNum)
+function onCharge(human, nBuyID, buyNum)
+    if isOpenAct(human, COMMONACT_LOGINGIFT_ID) then
+        return
+    end
+
     local actData = getActData(human)
     local buyGiftType = actData and actData.buyGiftType
     if buyGiftType then
@@ -156,7 +160,7 @@ function onCharge(human, price, funcID, buyID, buyNum)
 
     for giftType, giftCfgArr in pairs(type_2_cfg) do
         local singleCfg = giftCfgArr[1]
-        if singleCfg.buyId == buyID then
+        if singleCfg.buyId == nBuyID then
             updateBuyGiftType(human, giftType)
             updateRedDot(human)
             CommonActLoginGift_Query(human)

+ 15 - 1
script/module/topup/BuyLogic.lua

@@ -49,6 +49,8 @@ local OneKillGiftLogic = require("present.OneKillGift")
 local OpenServerGiftPackage = require("present.OpenServerGiftPackage")
 local CommonDefine = require("common.CommonDefine")
 local ZhuanpanGift = require("zhuanpan.ZhuanpanGift")
+local VoucherInvest = require("voucher.VoucherInvest")
+local CommonActLoginGift = require("absAct.CommonActLoginGift")
 
 BUY_CODE_NORMAL = 0   -- 正常调平台的充值接口
 BUY_CODE_WX_KEFU = 1  -- 微信小程序客服充值接口
@@ -363,9 +365,21 @@ end
 
 function cmd.zhuanpanGift(human, buyConf, isFirst, buyCnt, buyNum)
 	local nBuyID = buyConf.id
-	ZhuanpanGift.onCharge(human, nBuyID, buyNum)
+	VoucherInvest.onCharge(human, nBuyID, buyNum)
 end
 
+
+function cmd.VoucherInvest(human, buyConf, isFirst, buyCnt, buyNum)
+	local nBuyID = buyConf.id
+	VoucherInvest.onCharge(human, nBuyID, buyNum)
+end
+
+function cmd.CommonActLoginGift(human, buyConf, isFirst, buyCnt, buyNum)
+	local nBuyID = buyConf.id
+	CommonActLoginGift.onCharge(human, nBuyID, buyNum)
+end
+
+
 -------------------------------- cmd结束 ----------------------------------
 
 function checkBuy(human, ret)

+ 2 - 2
script/module/voucher/VoucherInvest.lua

@@ -171,7 +171,7 @@ function isRed(human)
     return false
 end
 
-function onCharge(human, price, funcID, buyID)
+function onCharge(human, nBuyID, buyNum)
     if not isOpen(human) then
         return
     end
@@ -183,7 +183,7 @@ function onCharge(human, price, funcID, buyID)
     local voucherInvestData = getData(human)
     local nowRound = voucherInvestData.nowRound
     local buyId = getBuyIdByRound(nowRound)
-    if buyId ~= buyID then
+    if buyId ~= nBuyID then
         return
     end