添加开服天数开启功能引导检测
parent
4a845666d8
commit
286ea9fcb2
|
@ -1096,6 +1096,7 @@ function FightPointPassMainPanel:OnOpen(func)
|
|||
end
|
||||
end
|
||||
function FightPointPassMainPanel:OnFocus()
|
||||
GuideManager.CheckOpenServerGuide()
|
||||
GuideManager.CheckFuncGuide()
|
||||
local activityId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.FirstRecharge)
|
||||
if activityId and activityId~=0 and ActTimeCtrlManager.SingleFuncState(1) then
|
||||
|
|
|
@ -26,8 +26,7 @@ function this.InitData(msg)
|
|||
this.level=msg.level
|
||||
this.upEndTime=msg.upLvEndTime
|
||||
this.soliderAdd=msg.attackUp
|
||||
|
||||
LogError("msg.attackUp================================================================="..msg.attackUp)
|
||||
--LogError("msg.attackUp================================================================="..msg.attackUp)
|
||||
if msg.soldiers then
|
||||
for i=1,#msg.soldiers do
|
||||
local v= msg.soldiers[i]
|
||||
|
@ -65,12 +64,12 @@ function this.InitData(msg)
|
|||
bossHp=bossHp - this.GetCurrAllAttack()
|
||||
attackCD=0
|
||||
if bossHp<=0 then
|
||||
LogError("后台挂机boss被击败------------------------------------")
|
||||
-- LogError("后台挂机boss被击败------------------------------------")
|
||||
end
|
||||
end
|
||||
cd=cd-1
|
||||
if cd<=0 or bossHp<=0 then
|
||||
LogError("发送小兵挂机战斗请求======================================================")
|
||||
--LogError("发送小兵挂机战斗请求======================================================")
|
||||
NetManager.SoldierFightCheckRequest(0,function (msg)
|
||||
|
||||
local lvConfig=ConfigManager.GetConfigData(ConfigName.SoldierStageConfig,FightPointPassManager.soldierLayerId)
|
||||
|
@ -136,7 +135,7 @@ function this.GetCurrAllAttack()
|
|||
--LogError("add============================"..add.." math.floor(add*(1+this.soliderAdd/100)+0.5=="..math.floor(add*(1+this.soliderAdd/100)+0.5))
|
||||
allAttack=allAttack+ math.floor(add*(1+this.soliderAdd/100)+0.5)
|
||||
end
|
||||
LogError("挂机总伤害===================================================="..allAttack)
|
||||
--LogError("挂机总伤害===================================================="..allAttack)
|
||||
return allAttack
|
||||
end
|
||||
|
||||
|
|
|
@ -212,6 +212,7 @@ function this.InitData(guideData)
|
|||
for i = 1, #guideData do
|
||||
local guide = guideData[i]
|
||||
-- 强制引导只保存一条当前引导数据
|
||||
LogError("guide.type==========="..guide.type.." guide.id========="..guide.id)
|
||||
if guide.type == GuideType.Force then
|
||||
openDic[guide.type] = guide.id
|
||||
if guide.id ~= -1 then
|
||||
|
@ -221,6 +222,8 @@ function this.InitData(guideData)
|
|||
end
|
||||
elseif guide.type == GuideType.Check then -- 用于检测引导的网络延时不需要检测
|
||||
elseif guide.type == GuideType.Function then -- 功能引导类型 不是按类型对应id的方式不需要检测
|
||||
elseif guide.id==1 then
|
||||
openDic[guide.type] = 1
|
||||
else -- 功能引导会将所有功能引导的id通过type字段保存到后端
|
||||
funcDic[guide.type] = guide.id
|
||||
end
|
||||
|
@ -347,6 +350,17 @@ function this.ShowGuide(id, ...)
|
|||
UIManager.OpenPanel(UIName.GuidePanel, id, onGuideClose, ...)
|
||||
end
|
||||
|
||||
function this.CheckOpenServerGuide()
|
||||
for _, config in ConfigPairs(GlobalSystemConfig) do
|
||||
if config.IsOpen==1 and config.IfOpen and #config.IfOpen>0 and config.GuideId>0 then
|
||||
if CheckFunctionOpen(config.Id) and openDic[config.Id]==nil then
|
||||
LogError("添加开服天赋功能引导======================"..config.GuideId.." 功能======"..config.Name)
|
||||
table.insert(_FuncGuideList, config.GuideId)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- 同步引导数据到服务器
|
||||
function this.SyncServer(id) --同步到后端
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Guide.NextTrigger, id)
|
||||
|
|
|
@ -928,6 +928,7 @@ end
|
|||
|
||||
|
||||
function MainPanel:OnFocus()
|
||||
GuideManager.CheckOpenServerGuide()
|
||||
LogError("主界面在最上面=============================================================================")
|
||||
GuideManager.CheckFuncGuide()
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue