|
|
@@ -14,6 +14,7 @@
|
|
|
|
|
|
isBuy = nil, -- 购买指定项后,值为true
|
|
|
loginDays = nil, 购买指定项后才统计的登录天数
|
|
|
+ isShowTips = nil, 用来记录客户端是否弹出过提示, 弹出过后为true
|
|
|
}
|
|
|
]=]--
|
|
|
|
|
|
@@ -30,6 +31,7 @@ local EliteDefine = require("battle.EliteDefine")
|
|
|
local BuyLogic = require("topup.BuyLogic")
|
|
|
local RoleSystemLogic = require("roleSystem.RoleSystemLogic")
|
|
|
local RoleSystemDefine = require("roleSystem.RoleSystemDefine")
|
|
|
+local RoleSystemConfig = require("excel.roleSystem").roleSystem
|
|
|
|
|
|
|
|
|
local LOGTYPE = "BreakThroughTheme"
|
|
|
@@ -61,6 +63,11 @@ local function addLoginDays(human)
|
|
|
human.db.breakThroughData.loginDays = (human.db.breakThroughData.loginDays or 0) + 1
|
|
|
end
|
|
|
|
|
|
+local function updateShowTipsState(human, state)
|
|
|
+ human.db.breakThroughData = human.db.breakThroughData or {}
|
|
|
+ human.db.breakThroughData.isShowTips = state
|
|
|
+end
|
|
|
+
|
|
|
|
|
|
|
|
|
local function isBuy(human)
|
|
|
@@ -210,6 +217,23 @@ local function getAdvancedReward(human)
|
|
|
entranceCloseCheck(human)
|
|
|
end
|
|
|
|
|
|
+-- 通知客户端弹出提示
|
|
|
+local function showTips(human)
|
|
|
+ local systemCfg = RoleSystemConfig[RoleSystemDefine.ROLE_SYS_ID_112]
|
|
|
+ if human.db.lv < systemCfg.lv then
|
|
|
+ return
|
|
|
+ end
|
|
|
+
|
|
|
+ local breakThroughData = getData(human)
|
|
|
+ if breakThroughData and breakThroughData.isShowTips then
|
|
|
+ return
|
|
|
+ end
|
|
|
+
|
|
|
+ local msgRet = Msg.gc.GC_BREATHROUGHTHEME_SHOW_TIPS
|
|
|
+ msgRet.tipState = 1
|
|
|
+ Msg.send(msgRet, human.fd)
|
|
|
+end
|
|
|
+
|
|
|
|
|
|
|
|
|
-- 外部调用, 是否显示入口, 领取完所有免费/付费奖励, 入口才关闭
|
|
|
@@ -273,6 +297,11 @@ function updateDaily(human)
|
|
|
end
|
|
|
end
|
|
|
|
|
|
+-- 外部调用, 登录
|
|
|
+function onLogin(human)
|
|
|
+ showTips(human)
|
|
|
+end
|
|
|
+
|
|
|
-- 外部调用,充值
|
|
|
function charge(human, nAllPrice, buyID)
|
|
|
local var = BreakThroughThemeConfig.var[1]
|
|
|
@@ -306,7 +335,10 @@ function StageUpdate(human)
|
|
|
redDotUpdate(human)
|
|
|
end
|
|
|
|
|
|
-
|
|
|
+-- 外部调用,升级
|
|
|
+function onLvUp(human)
|
|
|
+ showTips(human)
|
|
|
+end
|
|
|
|
|
|
|
|
|
-- 闯关阵容查询
|
|
|
@@ -422,4 +454,9 @@ function BreakThrough_GetReward(human, rewardType)
|
|
|
elseif rewardType == 2 then
|
|
|
getAdvancedReward(human)
|
|
|
end
|
|
|
+end
|
|
|
+
|
|
|
+-- 客户端通知服务器已经弹出过提示了
|
|
|
+function BreakThrough_UpdateShowTipsState(human)
|
|
|
+ updateShowTipsState(human, true)
|
|
|
end
|