Skip to content

Commit

Permalink
Merge pull request #614 from cont1nuity/master
Browse files Browse the repository at this point in the history
Fix `extraStatusbar` showing in wrong views (non-player-dmg)
  • Loading branch information
Tercioo authored Oct 4, 2023
2 parents ce8dc1b + f3af2b0 commit 115ccf7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions classes/class_damage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2994,8 +2994,8 @@ end
---@param onEnterFunc function?
---@param onLeaveFunc function?
function Details:ShowExtraStatusbar(thisLine, amount, extraAmount, totalAmount, topAmount, instanceObject, onEnterFunc, onLeaveFunc)
if (extraAmount and extraAmount > 0) then
local extraStatusbar = thisLine.extraStatusbar
local extraStatusbar = thisLine.extraStatusbar
if (extraAmount and extraAmount > 0 and instanceObject.atributo == 1 and instanceObject.sub_atributo == 1) then
local initialOffset = 0
local icon_offset_x, icon_offset_y = unpack(instanceObject.row_info.icon_offset)

Expand Down Expand Up @@ -3034,6 +3034,8 @@ function Details:ShowExtraStatusbar(thisLine, amount, extraAmount, totalAmount,
extraStatusbar.defaultAlpha = 0.1
end
extraStatusbar:Show()
else
extraStatusbar:Hide()
end
end

Expand Down
1 change: 1 addition & 0 deletions classes/class_instance.lua
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ local instanceMixins = {
thisBar.minha_tabela = nil
thisBar.animacao_fim = 0
thisBar.animacao_fim2 = 0
if thisBar.extraStatusbar then thisBar.extraStatusbar:Hide() end
end

if (instance.rolagem) then
Expand Down
1 change: 1 addition & 0 deletions core/windows.lua
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@
esta_barra.minha_tabela = nil
esta_barra.animacao_fim = 0
esta_barra.animacao_fim2 = 0
if esta_barra.extraStatusbar then esta_barra.extraStatusbar:Hide() end
end

if (instancia.rolagem) then
Expand Down

0 comments on commit 115ccf7

Please sign in to comment.