无尽副本修改提交

dev_chengFeng
jiaoyangna 2021-05-26 22:00:33 +08:00
parent 92633b6913
commit 35d0927881
7 changed files with 16 additions and 24 deletions

View File

@ -84,9 +84,7 @@ function this.UpdateEliteCarbonTicketData()
this.remainTime = this.remainTime - dt this.remainTime = this.remainTime - dt
if this.remainTime < 0 then if this.remainTime < 0 then
local ownNumber = BagManager.GetItemCountById(UpViewRechargeType.EliteCarbonTicket) local ownNumber = BagManager.GetItemCountById(UpViewRechargeType.EliteCarbonTicket)
if ownNumber < this.gameSetting[1].HeroTimes then this.UpdateEliteCarbonTicketRequest({28})
this.UpdateEliteCarbonTicketRequest({28})
end
end end
end end

View File

@ -85,7 +85,9 @@ function this.On_Btn2_Click()
if this.root.order>=1 then if this.root.order>=1 then
FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList, FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList,
FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos) FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos)
LogGreen("#FormationManager.formationList[this.root.curFormationIndex].teamHeroInfos:"..#FormationManager.formationList[this.root.curFormationIndex].teamHeroInfos) table.sort(FormationManager.formationList[this.root.curFormationIndex].teamHeroInfos,function(a,b)
return a.position < b.position
end)
EndLessMapManager.formation = FormationManager.formationList[this.root.curFormationIndex].teamHeroInfos EndLessMapManager.formation = FormationManager.formationList[this.root.curFormationIndex].teamHeroInfos
this.root:ClosePanel() this.root:ClosePanel()
else else

View File

@ -548,6 +548,7 @@ function this.InitHeroHp(msg, func)
if msg and #msg.heroInfo > 0 then if msg and #msg.heroInfo > 0 then
for i = 1, #msg.heroInfo do for i = 1, #msg.heroInfo do
local heroData = msg.heroInfo[i] local heroData = msg.heroInfo[i]
local allEquipAddProVal= HeroManager.CalculateWarAllProVal(heroData.heroId) local allEquipAddProVal= HeroManager.CalculateWarAllProVal(heroData.heroId)
local maxHp = allEquipAddProVal[3] local maxHp = allEquipAddProVal[3]
local hp = heroData.hp / 10000 local hp = heroData.hp / 10000
@ -638,6 +639,9 @@ function this.RrefreshFormation()
table.insert(tempList,v) table.insert(tempList,v)
end end
end end
table.sort(tempList,function(a,b)
return a.position < b.position
end)
FormationManager.formationList[FormationTypeDef.FORMATION_ENDLESS_MAP].teamHeroInfos = tempList FormationManager.formationList[FormationTypeDef.FORMATION_ENDLESS_MAP].teamHeroInfos = tempList
this.formation = FormationManager.formationList[FormationTypeDef.FORMATION_ENDLESS_MAP].teamHeroInfos this.formation = FormationManager.formationList[FormationTypeDef.FORMATION_ENDLESS_MAP].teamHeroInfos
end end

View File

@ -382,6 +382,7 @@ end
function EndLessMapView:RefreshTargetRoote() function EndLessMapView:RefreshTargetRoote()
this.curMission = EndLessMapManager.GetRewardData() this.curMission = EndLessMapManager.GetRewardData()
LogGreen(this.curMission.state.." this.curMission.state")
if this.curMission.state == 0 then if this.curMission.state == 0 then
this.TargetBtn1.gameObject:SetActive(false) this.TargetBtn1.gameObject:SetActive(false)
this.TargetBtn2.gameObject:SetActive(true) this.TargetBtn2.gameObject:SetActive(true)
@ -392,7 +393,7 @@ function EndLessMapView:RefreshTargetRoote()
if this.curMission.index == #EndLessMapManager.mission and this.curMission.state == 2 then if this.curMission.index == #EndLessMapManager.mission and this.curMission.state == 2 then
this.TargetRootText.text = "已完成全部任务" this.TargetRootText.text = "已完成全部任务"
else else
this.TargetRootText.text = string.format("%s<color=#FFFFFF>(%s/%s)</color>",this.curMission.Desc,this.curMission.progress,this.curMission.value) this.TargetRootText.text = string.format("%s<color=#FFFFFF>(%s/%s)</color>",this.curMission.Desc,this.curMission.value,this.curMission.value)
end end
end end
end end
@ -402,7 +403,6 @@ function EndLessMapView:SetShiQiValue()
local itemCount = BagManager.GetItemCountById(EndLessMapManager.shiQiValue) local itemCount = BagManager.GetItemCountById(EndLessMapManager.shiQiValue)
local id, lv = EndLessMapManager.GetShiQiValue() local id, lv = EndLessMapManager.GetShiQiValue()
local oldId = 0 local oldId = 0
LogGreen("lv:"..lv.." EndLessMapManager.moraleLv:"..EndLessMapManager.moraleLv)
if lv ~= EndLessMapManager.moraleLv then if lv ~= EndLessMapManager.moraleLv then
isShow = true isShow = true
oldId = EndLessMapManager.moraleLv oldId = EndLessMapManager.moraleLv
@ -414,7 +414,6 @@ function EndLessMapView:SetShiQiValue()
this.shiQiLv.text = lv.."" this.shiQiLv.text = lv..""
this.shiQifillAmount.fillAmount = (endlessMorale[id].Exp and endlessMorale[id].Exp[2] > 0) and itemCount/endlessMorale[id].Exp[2] or 1 this.shiQifillAmount.fillAmount = (endlessMorale[id].Exp and endlessMorale[id].Exp[2] > 0) and itemCount/endlessMorale[id].Exp[2] or 1
LogGreen("isShow:"..tostring(isShow))
if isShow then if isShow then
--士气等级提升 --士气等级提升
isShow = false isShow = false

View File

@ -740,7 +740,7 @@ function this.RefreshMapData(buffer)
local data = buffer:DataByte() local data = buffer:DataByte()
local msg = MapInfoProto_pb.EndlessMapChange() local msg = MapInfoProto_pb.EndlessMapChange()
msg:ParseFromString(data) msg:ParseFromString(data)
Log("推送的世界ID " .. msg.mapId) LogGreen("推送的世界ID " .. msg.mapId)
EndLessMapManager.openMapId = msg.mapId EndLessMapManager.openMapId = msg.mapId
end end

View File

@ -5,11 +5,7 @@ local GameSetting = ConfigManager.GetConfigData(ConfigName.GameSetting, 1)
local _TimeCheckFunc = { local _TimeCheckFunc = {
[UpViewRechargeType.EliteCarbonTicket] = function() [UpViewRechargeType.EliteCarbonTicket] = function()
local ownNumber = BagManager.GetItemCountById(UpViewRechargeType.EliteCarbonTicket) local ownNumber = BagManager.GetItemCountById(UpViewRechargeType.EliteCarbonTicket)
if ownNumber < CarbonManager.gameSetting[1].HeroTimes then return CarbonManager.remainTime
return CarbonManager.remainTime
else -- 数量已满返回 -1
return -1
end
end, end,
-- [UpViewRechargeType.MonsterCampTicket] = function() -- [UpViewRechargeType.MonsterCampTicket] = function()
-- if MonsterCampManager.IsNeedSupply() then -- if MonsterCampManager.IsNeedSupply() then
@ -41,22 +37,17 @@ local _TimeCheckFunc = {
end, end,
[UpViewRechargeType.ActPower] = function() [UpViewRechargeType.ActPower] = function()
local curCount = EndLessMapManager.GetLeftMapEnergy() local curCount = EndLessMapManager.GetLeftMapEnergy()
local maxCount = PrivilegeManager.GetPrivilegeNumber(20)
local itemData = BagManager.GetItemById(UpViewRechargeType.ActPower) local itemData = BagManager.GetItemById(UpViewRechargeType.ActPower)
if not itemData then if not itemData then
return return
end end
if curCount < maxCount then
local nextFreshTime = itemData.nextFlushTime local nextFreshTime = itemData.nextFlushTime
local remationTime = nextFreshTime - PlayerManager.serverTime local remationTime = nextFreshTime - PlayerManager.serverTime
LogGreen("remationTime:"..remationTime)
if remationTime > 0 then if remationTime > 0 then
return remationTime return remationTime
end end
-- 需要刷新数量
return -2 return -2
else -- 数量已满返回 -1
return -1
end
end, end,
[UpViewRechargeType.Energy] = function() [UpViewRechargeType.Energy] = function()
local curCount = BagManager.GetItemCountById(UpViewRechargeType.Energy) local curCount = BagManager.GetItemCountById(UpViewRechargeType.Energy)
@ -144,15 +135,10 @@ function AutoRecoverManager.GetRecoverTime(itemId)
return _TimeCheckFunc[itemId]() return _TimeCheckFunc[itemId]()
end end
function AutoRecoverManager.CostRecoverItem(itemId, num, maxNum) function AutoRecoverManager.CostRecoverItem(itemId, num, maxNum)
if this.IsAutoRecover(itemId) then if this.IsAutoRecover(itemId) then
local curCount = BagManager.GetItemCountById(itemId) local curCount = BagManager.GetItemCountById(itemId)
if curCount >= maxNum then if curCount >= maxNum then
end end
end end
end end

View File

@ -102,7 +102,10 @@ function this.SetScrollPre(root,data)
local pregress = Util.GetGameObject(root,"getRewardProgress") local pregress = Util.GetGameObject(root,"getRewardProgress")
if pregress then if pregress then
if curType == 2 then if curType == 2 then
pregress.gameObject:SetActive(true)
pregress:GetComponent("Text").text = "("..(MonsterCampManager.monsterWave - 1).."/"..data.Id..")" pregress:GetComponent("Text").text = "("..(MonsterCampManager.monsterWave - 1).."/"..data.Id..")"
else
pregress.gameObject:SetActive(false)
end end
end end
info.text=data.info --string.format( Language[11483],data.Count,MapTrialManager.GetKilCount(),data.Count) info.text=data.info --string.format( Language[11483],data.Count,MapTrialManager.GetKilCount(),data.Count)