竞技场fix

This commit is contained in:
Fang 2023-07-05 10:51:07 +08:00
parent d4237d18b9
commit c07a54b828
5 changed files with 31 additions and 8 deletions

View File

@ -247,12 +247,16 @@ function ArenaMatchUI:onClickRematch()
end)
else
-- 钻石
local cost = DataManager.ArenaData:getRematchConstGem()
local params ={
content = I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_25, DataManager.ArenaData:getRematchConstGem()),
content = I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_25, cost),
boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL,
costId = GConst.ItemConst.ITEM_ID_GEM,
costNum = DataManager.ArenaData:getRematchConstGem(),
costNum = cost,
okFunc = function()
if not GFunc.checkCost(GConst.ItemConst.ITEM_ID_GEM, cost, true) then
return
end
ModuleManager.ArenaManager:reqOverCD(false)
self:showMatchLoading()
end,

View File

@ -251,14 +251,21 @@ function BattleResultUI:refreshArenaNode()
function(value)
local maxScore = DataManager.ArenaData:getGradingScoreTotal(value)
local curScore = DataManager.ArenaData:getGradingScore(value)
if maxScore then
self.arenaImgProp.value = curScore/maxScore
self.arenaTxProg:setText(math.floor(curScore).."/"..maxScore)
else
self.arenaImgProp.value = 1
self.arenaTxProg:setText(math.floor(curScore))
end
end,
totalScore, 1.5)
self.arenaSequence:Append(tween)
self.arenaSequence:AppendCallback(function()
self.arenaTxGrading:setText(DataManager.ArenaData:getGradingName(curId))
if lastId ~= curId then
self:refreshArenaGradingSpine(curId)
end
self.arenaSequence = nil
end)

View File

@ -147,8 +147,13 @@ function ArenaComp:refreshShow()
local gradingNumName = DataManager.ArenaData:getGradingNumName(gradingId)
self.txSeason:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_3, DataManager.ArenaData:getSeason()))
self.txGarding:setText(DataManager.ArenaData:getGradingName(gradingId))
if maxScore then
self.txProg:setText(curScore.."/"..maxScore)
self.imgProg:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER).value = curScore/maxScore
else
self.txProg:setText(curScore)
self.imgProg:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER).value = 1
end
if self.spineGrading then
self.spineGrading:destroy()

View File

@ -75,6 +75,9 @@ function MainComp:refreshModule(selectModule)
end
elseif self.curModuleType == GConst.MainCityConst.MAIN_MODULE.DUNGEON then
-- 切换到活动副本
elseif self.curModuleType == GConst.MainCityConst.MAIN_MODULE.ARENA then
-- 切换到竞技场
ModuleManager.ArenaManager:reqArenaInfo()
end
self:refreshHeroFormationVisible()
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.CHANGE_MAIN_COMP_MODULE, self.curModuleType)

View File

@ -221,7 +221,11 @@ end
function ArenaData:getGradingScoreTotal(score)
local max = self:getGradingMaxScore(score)
local min = self:getGradingMinScore(score)
if max and min then
return max - min
else
return nil
end
end
-- 获取段位图标名(大段位区分)