四灵试炼修改提交

dev_chengFeng
jiaoyangna 2021-08-31 19:03:29 +08:00
parent d9bef4f49a
commit ad9e76bda5
6 changed files with 11 additions and 7 deletions

View File

@ -16,7 +16,6 @@ local canHelpPower = 0
local rate = 0
local waveId = 0
local curType = 0
local configData = {}
local redTrailType = {
[1] = RedPointType.PersonTrailHelp,
[2] = RedPointType.BuddishTrailHelp,
@ -79,7 +78,6 @@ function this:OnShow(_parent,...)
friendHelpHeros = args[3]
myHeros = args[4]
this:SetMyHeightPower()
configData = ConfigManager.GetConfigDataByDoubleKey(ConfigName.CampTowerConfig,"FloorId",waveId,"CampId",curType)
this.titleText.text = FourElementName[curType]
rate = tonumber(string.format("%.2f",ConfigManager.GetConfigData(ConfigName.CampTowerSetting,1).HelpFightMax / 10000))
canHelpPower = heightPower*rate

View File

@ -99,6 +99,10 @@ function FourElementMonsterCampPanel:BindEvent()
PopupTipPanel.ShowTip("今日挑战次数不足")
return
end
if not ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.CampTowerConfig,"CampId",curType,"FloorId",trailData.monsterWave + 1) then
PopupTipPanel.ShowTip("已通关全部层数,无法继续挑战")
return
end
if FormationManager.CheckFormationValid(curType + 2000) then
MonsterCampManager.ExecuteFightBattle(trailData.monsterWave + 1 ,0,function() this:OnShow() end,curType,true)
else

View File

@ -73,9 +73,7 @@ end
function MonsterCampMainPanel:OnShow()
local totalWaves = MonsterCampManager.GetFourElementTotalWave()
LogGreen(totalWaves.." totalWaves")
local nextWaves = SacredTreeManager.NextAttriFloor()
LogGreen(nextWaves.." nextWaves")
this.waveNum.text = MonsterCampManager.monsterWave
this.btnShenYingText.text = SacredTreeManager.CulAttri().."/"..#attriConfig.PropertyUnlcokLevels
this.shenYingProgressText.text = string.format("四灵试炼进度:%d/%d",totalWaves,nextWaves)

View File

@ -90,7 +90,10 @@ end
--得到从第1层到当前层的数据
function this.GetFourElementMonstersInfo(curType,curWave)
local monsterInfo = {}
local data = ConfigManager.GetConfigDataByDoubleKey(ConfigName.CampTowerConfig,"CampId",curType,"FloorId",curWave)
local data = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.CampTowerConfig,"CampId",curType,"FloorId",curWave)
if not data then
data = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.CampTowerConfig,"CampId",curType,"FloorId",curWave - 1)
end
for i = 1, curWave + data.UpLimitWave do
local tempData = this.GetFourElementMonsterInfoByWave(curType,i)
if tempData then
@ -101,7 +104,7 @@ function this.GetFourElementMonstersInfo(curType,curWave)
end
function this.GetFourElementMonsterInfoByWave(curType,wave)
local tempConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.CampTowerConfig,"CampId",curType,"FloorId",wave)
local tempConfig = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.CampTowerConfig,"CampId",curType,"FloorId",wave)
if not tempConfig then
return nil
end

View File

@ -103,6 +103,7 @@ function this.NextAttriFloor()
return num
end
end
return attriConfig.PropertyUnlcokLevels[#attriConfig.PropertyUnlcokLevels][2]
end
--获取当前等级加成的属性

View File

@ -120,7 +120,7 @@ function FourElementSingleWave:OnOpen()
else
x()
end
elseif self.data.wave == self.trailData.monsterWave + 1 then
elseif self.data.wave == self.trailData.monsterWave + 1 then
if self.trailData.canFightTime > 0 then
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.FOUR_ELEMENT, self.trailData.fourElementType,self.data.wave)
-- if LengthOfTable(FormationManager.GetWuJinFormationHeroIds(self.trailData.fourElementType + 2000)) > 0 then