无尽副本修改提交
parent
92633b6913
commit
35d0927881
|
@ -84,9 +84,7 @@ function this.UpdateEliteCarbonTicketData()
|
|||
this.remainTime = this.remainTime - dt
|
||||
if this.remainTime < 0 then
|
||||
local ownNumber = BagManager.GetItemCountById(UpViewRechargeType.EliteCarbonTicket)
|
||||
if ownNumber < this.gameSetting[1].HeroTimes then
|
||||
this.UpdateEliteCarbonTicketRequest({28})
|
||||
end
|
||||
this.UpdateEliteCarbonTicketRequest({28})
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -85,7 +85,9 @@ function this.On_Btn2_Click()
|
|||
if this.root.order>=1 then
|
||||
FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList,
|
||||
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
|
||||
this.root:ClosePanel()
|
||||
else
|
||||
|
|
|
@ -548,6 +548,7 @@ function this.InitHeroHp(msg, func)
|
|||
if msg and #msg.heroInfo > 0 then
|
||||
for i = 1, #msg.heroInfo do
|
||||
local heroData = msg.heroInfo[i]
|
||||
|
||||
local allEquipAddProVal= HeroManager.CalculateWarAllProVal(heroData.heroId)
|
||||
local maxHp = allEquipAddProVal[3]
|
||||
local hp = heroData.hp / 10000
|
||||
|
@ -638,6 +639,9 @@ function this.RrefreshFormation()
|
|||
table.insert(tempList,v)
|
||||
end
|
||||
end
|
||||
table.sort(tempList,function(a,b)
|
||||
return a.position < b.position
|
||||
end)
|
||||
FormationManager.formationList[FormationTypeDef.FORMATION_ENDLESS_MAP].teamHeroInfos = tempList
|
||||
this.formation = FormationManager.formationList[FormationTypeDef.FORMATION_ENDLESS_MAP].teamHeroInfos
|
||||
end
|
||||
|
|
|
@ -382,6 +382,7 @@ end
|
|||
|
||||
function EndLessMapView:RefreshTargetRoote()
|
||||
this.curMission = EndLessMapManager.GetRewardData()
|
||||
LogGreen(this.curMission.state.." this.curMission.state")
|
||||
if this.curMission.state == 0 then
|
||||
this.TargetBtn1.gameObject:SetActive(false)
|
||||
this.TargetBtn2.gameObject:SetActive(true)
|
||||
|
@ -392,7 +393,7 @@ function EndLessMapView:RefreshTargetRoote()
|
|||
if this.curMission.index == #EndLessMapManager.mission and this.curMission.state == 2 then
|
||||
this.TargetRootText.text = "已完成全部任务"
|
||||
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
|
||||
|
@ -402,7 +403,6 @@ function EndLessMapView:SetShiQiValue()
|
|||
local itemCount = BagManager.GetItemCountById(EndLessMapManager.shiQiValue)
|
||||
local id, lv = EndLessMapManager.GetShiQiValue()
|
||||
local oldId = 0
|
||||
LogGreen("lv:"..lv.." EndLessMapManager.moraleLv:"..EndLessMapManager.moraleLv)
|
||||
if lv ~= EndLessMapManager.moraleLv then
|
||||
isShow = true
|
||||
oldId = EndLessMapManager.moraleLv
|
||||
|
@ -414,7 +414,6 @@ function EndLessMapView:SetShiQiValue()
|
|||
this.shiQiLv.text = lv.."级"
|
||||
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
|
||||
--士气等级提升
|
||||
isShow = false
|
||||
|
|
|
@ -740,7 +740,7 @@ function this.RefreshMapData(buffer)
|
|||
local data = buffer:DataByte()
|
||||
local msg = MapInfoProto_pb.EndlessMapChange()
|
||||
msg:ParseFromString(data)
|
||||
Log("推送的世界ID " .. msg.mapId)
|
||||
LogGreen("推送的世界ID " .. msg.mapId)
|
||||
EndLessMapManager.openMapId = msg.mapId
|
||||
end
|
||||
|
||||
|
|
|
@ -5,11 +5,7 @@ local GameSetting = ConfigManager.GetConfigData(ConfigName.GameSetting, 1)
|
|||
local _TimeCheckFunc = {
|
||||
[UpViewRechargeType.EliteCarbonTicket] = function()
|
||||
local ownNumber = BagManager.GetItemCountById(UpViewRechargeType.EliteCarbonTicket)
|
||||
if ownNumber < CarbonManager.gameSetting[1].HeroTimes then
|
||||
return CarbonManager.remainTime
|
||||
else -- 数量已满返回 -1
|
||||
return -1
|
||||
end
|
||||
return CarbonManager.remainTime
|
||||
end,
|
||||
-- [UpViewRechargeType.MonsterCampTicket] = function()
|
||||
-- if MonsterCampManager.IsNeedSupply() then
|
||||
|
@ -41,22 +37,17 @@ local _TimeCheckFunc = {
|
|||
end,
|
||||
[UpViewRechargeType.ActPower] = function()
|
||||
local curCount = EndLessMapManager.GetLeftMapEnergy()
|
||||
local maxCount = PrivilegeManager.GetPrivilegeNumber(20)
|
||||
local itemData = BagManager.GetItemById(UpViewRechargeType.ActPower)
|
||||
if not itemData then
|
||||
return
|
||||
end
|
||||
if curCount < maxCount then
|
||||
local nextFreshTime = itemData.nextFlushTime
|
||||
local remationTime = nextFreshTime - PlayerManager.serverTime
|
||||
LogGreen("remationTime:"..remationTime)
|
||||
if remationTime > 0 then
|
||||
return remationTime
|
||||
end
|
||||
-- 需要刷新数量
|
||||
return -2
|
||||
else -- 数量已满返回 -1
|
||||
return -1
|
||||
end
|
||||
end,
|
||||
[UpViewRechargeType.Energy] = function()
|
||||
local curCount = BagManager.GetItemCountById(UpViewRechargeType.Energy)
|
||||
|
@ -144,15 +135,10 @@ function AutoRecoverManager.GetRecoverTime(itemId)
|
|||
return _TimeCheckFunc[itemId]()
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function AutoRecoverManager.CostRecoverItem(itemId, num, maxNum)
|
||||
if this.IsAutoRecover(itemId) then
|
||||
local curCount = BagManager.GetItemCountById(itemId)
|
||||
if curCount >= maxNum then
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -102,7 +102,10 @@ function this.SetScrollPre(root,data)
|
|||
local pregress = Util.GetGameObject(root,"getRewardProgress")
|
||||
if pregress then
|
||||
if curType == 2 then
|
||||
pregress.gameObject:SetActive(true)
|
||||
pregress:GetComponent("Text").text = "("..(MonsterCampManager.monsterWave - 1).."/"..data.Id..")"
|
||||
else
|
||||
pregress.gameObject:SetActive(false)
|
||||
end
|
||||
end
|
||||
info.text=data.info --string.format( Language[11483],data.Count,MapTrialManager.GetKilCount(),data.Count)
|
||||
|
|
Loading…
Reference in New Issue