From 614cdb06e5ba759572b7da021da2d4f0c6c17b8c Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Sat, 4 Jul 2020 14:31:47 -0300 Subject: [PATCH] Fixed auto hide on pet battles --- core/parser.lua | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/core/parser.lua b/core/parser.lua index 6abf2fedb..01e65c405 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -5186,9 +5186,9 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 for index, instance in _ipairs (_detalhes.tabela_instancias) do if (instance.ativa) then if (_detalhes.debug) then - _detalhes:Msg ("(debug 1) hidding windows for Pet Battle.") + _detalhes:Msg ("(debug) hidding windows for Pet Battle.") end - instance:SetWindowAlphaForCombat (true, true) + instance:SetWindowAlphaForCombat (true, true, 0) end end end @@ -5197,17 +5197,10 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 _detalhes.pet_battle = false for index, instance in _ipairs (_detalhes.tabela_instancias) do if (instance.ativa) then - if (instance.hide_in_combat_type == 1) then - if (_detalhes.debug) then - _detalhes:Msg ("(debug 1) restoring windows after Pet Battle.") - end - instance:SetWindowAlphaForCombat() - else - if (_detalhes.debug) then - _detalhes:Msg ("(debug 2) restoring windows after Pet Battle.") - end - instance:AdjustAlphaByContext(true) + if (_detalhes.debug) then + _detalhes:Msg ("(debug) Pet Battle finished, calling AdjustAlphaByContext().") end + instance:AdjustAlphaByContext(true) end end end