特训升级修改
parent
b609eeb97c
commit
fcc7b09685
|
@ -109,6 +109,12 @@ function this.GetServerData(msg,func)
|
||||||
func()
|
func()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
function this.RemoveTrainHero(_heroId)
|
||||||
|
if CheckListIsContainValue1(this.trainHeroId,_heroId) then
|
||||||
|
table.removebyvalue(this.trainHeroId,_heroId)
|
||||||
|
LogError("成功移除特训英雄")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--设置特训点信息
|
--设置特训点信息
|
||||||
function this.SetBuildInfo(_info)
|
function this.SetBuildInfo(_info)
|
||||||
|
@ -120,7 +126,9 @@ function this.SetBuildInfo(_info)
|
||||||
LogError("_info.startTime==================".._info.startTime.." _info.lv===".._info.lv)
|
LogError("_info.startTime==================".._info.startTime.." _info.lv===".._info.lv)
|
||||||
local singledata = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.TrainBuildLevel,"PoolID",_info.id,"level",_info.lv)
|
local singledata = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.TrainBuildLevel,"PoolID",_info.id,"level",_info.lv)
|
||||||
if _info.startTime>0 then
|
if _info.startTime>0 then
|
||||||
|
|
||||||
this.BuildData[_info.id].endTime = _info.startTime+singledata.Time
|
this.BuildData[_info.id].endTime = _info.startTime+singledata.Time
|
||||||
|
LogError("singledata.time==========="..singledata.Time.." endtime===="..this.BuildData[_info.id].endTime)
|
||||||
else
|
else
|
||||||
this.BuildData[_info.id].endTime=0
|
this.BuildData[_info.id].endTime=0
|
||||||
end
|
end
|
||||||
|
@ -160,22 +168,7 @@ function this.ResumeCost(_data,_str,func)
|
||||||
end
|
end
|
||||||
func(data[16])
|
func(data[16])
|
||||||
end
|
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移植过来,然后写个总的检测跑一遍所有)
|
--烦人的红点检测(我决定1-4写一个、5写一个,6写一个、任务写一个、7移植过来,然后写个总的检测跑一遍所有)
|
||||||
|
|
|
@ -162,7 +162,7 @@ function this:SetUpHero()
|
||||||
curValue=heroData.HeroTraining.hpExp
|
curValue=heroData.HeroTraining.hpExp
|
||||||
end
|
end
|
||||||
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
|
local endTime=buildData.heroStarTime+math.ceil((max-curValue)/buildData.dataSingle.Gain)*60
|
||||||
leftTime=endTime-GetTimeStamp()
|
leftTime=endTime-GetTimeStamp()
|
||||||
this:SetTime(name)
|
this:SetTime(name)
|
||||||
|
|
|
@ -7645,9 +7645,10 @@ function NetManager.TrainingRequest(_id,_heroId,_type,_func)
|
||||||
PopupTipPanel.ShowTip("英雄开始特训")
|
PopupTipPanel.ShowTip("英雄开始特训")
|
||||||
elseif _type==2 then
|
elseif _type==2 then
|
||||||
LogError("remove heroid==============".._heroId)
|
LogError("remove heroid==============".._heroId)
|
||||||
table.removebyvalue(TrainBuildManager.trainHeroId,_heroId)
|
--table.removebyvalue(TrainBuildManager.trainHeroId,_heroId)
|
||||||
|
TrainBuildManager.RemoveTrainHero(_heroId)
|
||||||
PopupTipPanel.ShowTip("英雄特训结束")
|
PopupTipPanel.ShowTip("英雄特训结束")
|
||||||
LogError("TrainBuildManager.trainHeroId len==="..#TrainBuildManager.trainHeroId)
|
-- LogError("TrainBuildManager.trainHeroId len==="..#TrainBuildManager.trainHeroId)
|
||||||
end
|
end
|
||||||
if msg.training then
|
if msg.training then
|
||||||
HeroManager.SetHeroTraining(_heroId,msg.training)
|
HeroManager.SetHeroTraining(_heroId,msg.training)
|
||||||
|
|
Loading…
Reference in New Issue