|
|
@@ -17,6 +17,7 @@ local YunYingLogic = require("yunying.YunYingLogic")
|
|
|
local SceneHandler = require("scene.Handler")
|
|
|
local ObjHuman = require("core.ObjHuman")
|
|
|
local BuyLogic = require("topup.BuyLogic")
|
|
|
+local CommonDefine = require("common.CommonDefine")
|
|
|
|
|
|
local NEWFIRST_CHARGE_TYPE1 = 1 -- 1元
|
|
|
local NEWFIRST_CHARGE_TYPE2 = 2 -- 8元
|
|
|
@@ -41,7 +42,7 @@ local tBuyID2Speed =
|
|
|
}
|
|
|
|
|
|
local NEWFIRST_DAY = 3 -- 奖励天数,策划也没配置,直接写死吧
|
|
|
-local OPENNEWLV = 9 -- 等级9开
|
|
|
+local OPENNEWLV = 12 -- 等级9开
|
|
|
|
|
|
-- 状态
|
|
|
NEWFIRST_STATE_CANT_GET = 0 -- 不可领
|
|
|
@@ -71,7 +72,7 @@ local function isCorrectChanel(human)
|
|
|
return false
|
|
|
end
|
|
|
|
|
|
- if human.phpChanelID == 1 then --暂时写死
|
|
|
+ if human.phpChanelID == CommonDefine.CHANNEL_TAG_MUZI then
|
|
|
return true
|
|
|
end
|
|
|
|
|
|
@@ -139,9 +140,6 @@ end
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
local function getNeedList(isNew)
|
|
|
local startIdx, endIdx = 1, 3
|
|
|
if isNew then
|
|
|
@@ -187,8 +185,6 @@ local function getNeedList(isNew)
|
|
|
return tNewFirstChargeCof, tPrizeDataByTypeDay
|
|
|
end
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-- 初始化对应类型的DB类型数据
|
|
|
local function NewFirstCharge_InitDBByType(human, nType)
|
|
|
if not human.db.newFirstCharge then
|
|
|
@@ -637,7 +633,6 @@ function updateDaily(human, funcID)
|
|
|
end
|
|
|
end
|
|
|
|
|
|
-
|
|
|
-- 是否已激活首充
|
|
|
function isActive(human, YYInfo, funcConfig)
|
|
|
return not isOpen(human, YYInfo, funcConfig)
|
|
|
@@ -652,4 +647,36 @@ end
|
|
|
function NewFirstCharge_GMClear(human)
|
|
|
human.db.newFirstCharge = nil
|
|
|
print("[NewFirstCharge_GMClear] 清空完成")
|
|
|
+end
|
|
|
+
|
|
|
+-- 是否购买了所有的新首充礼包
|
|
|
+function IsBuyAllgift(human)
|
|
|
+ local newFirstChargeData = human.db.newFirstCharge
|
|
|
+ if not newFirstChargeData or not next(newFirstChargeData) then
|
|
|
+ return false
|
|
|
+ end
|
|
|
+
|
|
|
+ local bl = true
|
|
|
+ -- 旧礼包判断,1~3为旧礼包的类型
|
|
|
+ for i=1, 3 do
|
|
|
+ if not newFirstChargeData[i] or newFirstChargeData[i].nBuyTime <= 0 then
|
|
|
+ bl = false
|
|
|
+ break
|
|
|
+ end
|
|
|
+ end
|
|
|
+
|
|
|
+ if bl then
|
|
|
+ return true
|
|
|
+ end
|
|
|
+
|
|
|
+ -- 新礼包判断, 4~6为新礼包的类型
|
|
|
+ bl = true
|
|
|
+ for i=4, 6 do
|
|
|
+ if not newFirstChargeData[i] or newFirstChargeData[i].nBuyTime <= 0 then
|
|
|
+ bl = false
|
|
|
+ break
|
|
|
+ end
|
|
|
+ end
|
|
|
+
|
|
|
+ return bl
|
|
|
end
|