Skip to content

Commit

Permalink
Fix for not finding the coords for nil when an enemy dies in battlegr…
Browse files Browse the repository at this point in the history
…ound
  • Loading branch information
Tercioo committed Mar 5, 2021
1 parent 3fa5a68 commit af696b4
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions classes/class_utility.lua
Original file line number Diff line number Diff line change
Expand Up @@ -604,13 +604,26 @@ function atributo_misc:DeadAtualizarBarra (morte, whichRowLine, colocacao, insta
esta_barra.icone_classe:SetTexture (instancia.row_info.spec_file)
esta_barra.icone_classe:SetTexCoord (_unpack (_detalhes.class_specs_coords [spec]))
else
esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [morte[4]])) --no tcoords on morte[4]
if (CLASS_ICON_TCOORDS [morte[4]]) then
esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [morte[4]]))
else
local texture, l, r, t, b = Details:GetUnknownClassIcon()
esta_barra.icone_classe:SetTexture(texture)
esta_barra.icone_classe:SetTexCoord(l, r, t, b)
end
end
else
esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [morte[4]]))
if (CLASS_ICON_TCOORDS [morte[4]]) then
esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [morte[4]]))
else
local texture, l, r, t, b = Details:GetUnknownClassIcon()
esta_barra.icone_classe:SetTexture(texture)
esta_barra.icone_classe:SetTexCoord(l, r, t, b)
end
end

esta_barra.icone_classe:SetVertexColor (1, 1, 1)

if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --> precisa atualizar o tooltip
Expand Down

0 comments on commit af696b4

Please sign in to comment.