挂机自动打关卡修改==============同bt

tcx_xiyou_dev
wangzhenxing 2024-06-04 19:24:48 +08:00
parent 195fb8bfd4
commit 15c9bd1b77
1 changed files with 33 additions and 20 deletions

View File

@ -70,6 +70,8 @@ function this.InitData(msg)
cd=cd-1 cd=cd-1
if cd<=0 or bossHp<=0 then if cd<=0 or bossHp<=0 then
--LogError("发送小兵挂机战斗请求======================================================") --LogError("发送小兵挂机战斗请求======================================================")
local curConfig=ConfigManager.GetConfigData(ConfigName.SoldierStageConfig,FightPointPassManager.soldierLayerId)
if curConfig.OpenRule[1][2]<=GetOpenServerDayNum() then
NetManager.SoldierFightCheckRequest(0,function (msg) NetManager.SoldierFightCheckRequest(0,function (msg)
local lvConfig=ConfigManager.GetConfigData(ConfigName.SoldierStageConfig,FightPointPassManager.soldierLayerId) local lvConfig=ConfigManager.GetConfigData(ConfigName.SoldierStageConfig,FightPointPassManager.soldierLayerId)
@ -97,6 +99,17 @@ function this.InitData(msg)
end end
end end
end) end)
else
cd=curConfig.Time
bossHp=curConfig.Hp
if PlayerPrefs.GetInt("SmallSoldierFailed"..PlayerManager.uid)~=FightPointPassManager.soldierLayerId then
if not GuideManager.IsInMainGuide() and UIManager.GetOpenPanel(UIName.BattlePanel)==nil and UIManager.GetOpenPanel(UIName.BattleWinPopup)==nil then
UIManager.OpenPanel(UIName.SmallSoldierFailPop)
end
PlayerPrefs.SetInt("SmallSoldierFailed"..PlayerManager.uid,FightPointPassManager.soldierLayerId)
end
end
end end
end end