diff --git a/Assets/ManagedResources/~Lua/Modules/HomeLand/TrainBuildManager.lua b/Assets/ManagedResources/~Lua/Modules/HomeLand/TrainBuildManager.lua index 216305fc03..8bd956e6c5 100644 --- a/Assets/ManagedResources/~Lua/Modules/HomeLand/TrainBuildManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/HomeLand/TrainBuildManager.lua @@ -109,6 +109,12 @@ function this.GetServerData(msg,func) func() end end +function this.RemoveTrainHero(_heroId) + if CheckListIsContainValue1(this.trainHeroId,_heroId) then + table.removebyvalue(this.trainHeroId,_heroId) + LogError("成功移除特训英雄") + end +end --设置特训点信息 function this.SetBuildInfo(_info) @@ -120,7 +126,9 @@ function this.SetBuildInfo(_info) LogError("_info.startTime==================".._info.startTime.." _info.lv===".._info.lv) local singledata = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.TrainBuildLevel,"PoolID",_info.id,"level",_info.lv) if _info.startTime>0 then + this.BuildData[_info.id].endTime = _info.startTime+singledata.Time + LogError("singledata.time==========="..singledata.Time.." endtime===="..this.BuildData[_info.id].endTime) else this.BuildData[_info.id].endTime=0 end @@ -160,22 +168,7 @@ function this.ResumeCost(_data,_str,func) end func(data[16]) end ---检测当前停留 -function this.GetCurIndex() - for i = 1, 4 do - if this.EquipData[i].configData.Limit2 == EquipRankUp[this.levelProId].Level then - if this.EquipData[i].configData.Cost and this.EquipData[i].configData.Cost[1][2] <= BagManager.GetTotalItemNum(this.EquipData[i].configData.Cost[1][1]) then - this.curEquip = i - return - end - end - end -end ---检测按钮显示 -function this.GetCurIndexBtnsShow() - return this.EquipData[this.curEquip].configData.Limit2 == EquipRankUp[this.levelProId].Level -end --==============================红点检测============================== --烦人的红点检测(我决定1-4写一个、5写一个,6写一个、任务写一个、7移植过来,然后写个总的检测跑一遍所有) diff --git a/Assets/ManagedResources/~Lua/Modules/HomeLand/TrainSelectHeroPanel.lua b/Assets/ManagedResources/~Lua/Modules/HomeLand/TrainSelectHeroPanel.lua index 439bb6c741..3fb7e8062b 100644 --- a/Assets/ManagedResources/~Lua/Modules/HomeLand/TrainSelectHeroPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/HomeLand/TrainSelectHeroPanel.lua @@ -162,7 +162,7 @@ function this:SetUpHero() curValue=heroData.HeroTraining.hpExp end end - LogError("curvalue==========================="..curValue) + LogError("curvalue==========================="..curValue.." max=="..max.." buildData.dataSingle.Gain=="..buildData.dataSingle.Gain) local endTime=buildData.heroStarTime+math.ceil((max-curValue)/buildData.dataSingle.Gain)*60 leftTime=endTime-GetTimeStamp() this:SetTime(name) diff --git a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua index a053ca8bde..0d1375edb7 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua @@ -7645,9 +7645,10 @@ function NetManager.TrainingRequest(_id,_heroId,_type,_func) PopupTipPanel.ShowTip("英雄开始特训") elseif _type==2 then LogError("remove heroid==============".._heroId) - table.removebyvalue(TrainBuildManager.trainHeroId,_heroId) + --table.removebyvalue(TrainBuildManager.trainHeroId,_heroId) + TrainBuildManager.RemoveTrainHero(_heroId) PopupTipPanel.ShowTip("英雄特训结束") - LogError("TrainBuildManager.trainHeroId len==="..#TrainBuildManager.trainHeroId) + -- LogError("TrainBuildManager.trainHeroId len==="..#TrainBuildManager.trainHeroId) end if msg.training then HeroManager.SetHeroTraining(_heroId,msg.training)