显示bug修复

This commit is contained in:
xiekaidong 2023-08-03 09:47:21 +08:00
parent 24d90bfd1c
commit 4c8eff015e
2 changed files with 10 additions and 9 deletions

View File

@ -331,7 +331,6 @@ function BattleBaseController:onLinkChange()
elementTypeCount = elementTypeCount + count
end
local dmg = self:calExpectedInjury(mainElementType, elementTypeCount, dmgSkillId)
Logger.logHighlight(dmg)
local defMainUnitcomp = self:getCurOtherActionUnitComp()
if defMainUnitcomp then
local hp = defMainUnitcomp.unitEntity:getHp()
@ -1214,11 +1213,11 @@ end
function BattleBaseController:onLinkOver()
local hp = self.atkTeam:getMainUnit().unitEntity:getHp()
local hpPercent = self.atkTeam:getMainUnit().unitEntity:getMaxHp()
local hpPercent = self.atkTeam:getMainUnit().unitEntity:getHpPercent()
self.battleUI:setAtkHp(hp, hpPercent)
local hp = self.defTeam:getMainUnit().unitEntity:getHp()
local hpPercent = self.defTeam:getMainUnit().unitEntity:getMaxHp()
local hpPercent = self.defTeam:getMainUnit().unitEntity:getHpPercent()
self.battleUI:setDefHp(hp, hpPercent)
self.battleUI:hideAllSfxLine()

View File

@ -82,13 +82,15 @@ function SummonData:getSummonRewardByLv(summonType, level)
for _, reward in ipairs(rewards) do
local find = false
for index, rewardBase in ipairs(cfgInfo.box_lv_base) do
if reward.type == rewardBase.type and reward.id == rewardBase.id and reward.num > rewardBase.num then
if reward.type == rewardBase.type and reward.id == rewardBase.id and reward.num >= rewardBase.num then
local num = reward.num - rewardBase.num
table.insert(self.cacheSummonRewardByLv[level], {
id = reward.id,
type = reward.type,
num = num
})
if num ~= 0 then
table.insert(self.cacheSummonRewardByLv[level], {
id = reward.id,
type = reward.type,
num = num
})
end
find = true
break
end