From 0e0f2094407eb061c566bfb92d0b5d7a42a23988 Mon Sep 17 00:00:00 2001
From: jiaoyangna <3046463818@qq.com>
Date: Tue, 28 Dec 2021 13:37:30 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8E=A2=E7=B4=A2=E6=97=B6=E9=97=B4=E9=80=89?=
=?UTF-8?q?=E6=8B=A9=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../~Lua/Modules/Explore/ExploreManager.lua | 1 -
.../Popup/View/GeneralPopup_SelectExploreTime.lua | 13 ++++++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Assets/ManagedResources/~Lua/Modules/Explore/ExploreManager.lua b/Assets/ManagedResources/~Lua/Modules/Explore/ExploreManager.lua
index d1f380f2a8..333bdd6ee1 100644
--- a/Assets/ManagedResources/~Lua/Modules/Explore/ExploreManager.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Explore/ExploreManager.lua
@@ -176,7 +176,6 @@ function this.InitMapUserInfosData(data,mapId)
singleUserData.lv = data[i].level
singleUserData.formationId = i
singleUserData.hp = 0
- LogGreen("data[i].uid:"..data[i].uid.." PlayerManager.uid:"..PlayerManager.uid)
if singleUserData.uid == PlayerManager.uid then
myData = singleUserData
else
diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_SelectExploreTime.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_SelectExploreTime.lua
index 265a917b4d..8081b64f2b 100644
--- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_SelectExploreTime.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_SelectExploreTime.lua
@@ -80,7 +80,14 @@ function this:OnShow(_parent,...)
this.name.text = string.format("探索目标:%s",this.mapData.name)
this.icon.sprite = this.spLoader:LoadSprite(GetSpriteNameByItemId(this.mapData.cost[1]))
this.haveNum = BagManager.GetItemCountById(this.mapData.cost[1])
- this.slider.value = math.floor(this.haveNum/this.mapData.cost[2]/60)
+ local num = math.floor(this.haveNum/(this.mapData.cost[2]*60))
+ local sliderValue = 0
+ for i = 1,#this.timeList do
+ if num >= this.timeList[i] then
+ sliderValue = i
+ end
+ end
+ this.slider.value = sliderValue
this:Refresh()
end
@@ -94,9 +101,9 @@ function this:Refresh()
this.numTime.text = this.exploreTime.."小时"
local costnum = this.mapData.cost[2] * (this.exploreTime * 60)
if costnum < this.haveNum then
- this.num.text = string.format("%s/%s","00ff00",costnum,this.haveNum)
+ this.num.text = string.format("%s/%s","00ff00",costnum,this.haveNum)
else
- this.num.text = string.format("%s/%s","ff0000",costnum,this.haveNum)
+ this.num.text = string.format("%s/%s","ff0000",costnum,this.haveNum)
end
ForceRebuildLayout(this.cost.transform)
end