From 35d09278812c71510bfb75898d8c3e18df7bc12a Mon Sep 17 00:00:00 2001
From: jiaoyangna <3046463818@qq.com>
Date: Wed, 26 May 2021 22:00:33 +0800
Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E5=B0=BD=E5=89=AF=E6=9C=AC=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../~Lua/Modules/Carbon/CarbonManager.lua | 4 +---
.../Modules/Formation/View/CarbonFormation.lua | 4 +++-
.../~Lua/Modules/Map/EndLessMapManager.lua | 4 ++++
.../~Lua/Modules/Map/View/EndLessMapView.lua | 5 ++---
.../~Lua/Modules/Net/IndicationManager.lua | 2 +-
.../~Lua/Modules/Player/AutoRecoverManager.lua | 18 ++----------------
.../~Lua/Modules/Popup/TrialRewardPopup.lua | 3 +++
7 files changed, 16 insertions(+), 24 deletions(-)
diff --git a/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua b/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua
index bfb8db5237..a8234f8791 100644
--- a/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua
@@ -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
diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua b/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua
index 6120343b0f..1b1cfec60c 100644
--- a/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua
@@ -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
diff --git a/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua b/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua
index c322650775..9dfe38bec7 100644
--- a/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua
@@ -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
diff --git a/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua b/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua
index 8e32502309..35d8908e8a 100644
--- a/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua
@@ -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(%s/%s)",this.curMission.Desc,this.curMission.progress,this.curMission.value)
+ this.TargetRootText.text = string.format("%s(%s/%s)",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
diff --git a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua
index d9555d3fd2..dad7dd2768 100644
--- a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua
@@ -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
diff --git a/Assets/ManagedResources/~Lua/Modules/Player/AutoRecoverManager.lua b/Assets/ManagedResources/~Lua/Modules/Player/AutoRecoverManager.lua
index 9d084b262b..15ab3ff7dd 100644
--- a/Assets/ManagedResources/~Lua/Modules/Player/AutoRecoverManager.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Player/AutoRecoverManager.lua
@@ -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
diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/TrialRewardPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/TrialRewardPopup.lua
index 5f2d33d4bf..1636afb7d4 100644
--- a/Assets/ManagedResources/~Lua/Modules/Popup/TrialRewardPopup.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Popup/TrialRewardPopup.lua
@@ -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)