From 62c2cad90745779f908df4582eab6156e089825d Mon Sep 17 00:00:00 2001 From: Tercioo Date: Sun, 12 May 2019 11:27:56 -0300 Subject: [PATCH] Framework update and few bug fixes --- Libs/DF/fw.lua | 2 +- Libs/DF/panel.lua | 16 ++++++++++++++-- classes/classe_damage.lua | 9 ++++++++- classes/classe_energy.lua | 2 +- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index fd4ada64..1755acdf 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -1,5 +1,5 @@ -local dversion = 148 +local dversion = 149 local major, minor = "DetailsFramework-1.0", dversion local DF, oldminor = LibStub:NewLibrary (major, minor) diff --git a/Libs/DF/panel.lua b/Libs/DF/panel.lua index facfc42a..a256d073 100644 --- a/Libs/DF/panel.lua +++ b/Libs/DF/panel.lua @@ -2151,9 +2151,9 @@ end ------------------------------------------------------------------------------------------------------------------------------------------------ -- ~prompt -function DF:ShowPromptPanel (message, func_true, func_false) +function DF:ShowPromptPanel (message, func_true, func_false, no_repeated, width) - if (not DF.prompt_panel) then + if (not DetailsFrameworkPromptSimple) then local f = CreateFrame ("frame", "DetailsFrameworkPromptSimple", UIParent) f:SetSize (400, 80) f:SetFrameStrata ("DIALOG") @@ -2227,6 +2227,18 @@ function DF:ShowPromptPanel (message, func_true, func_false) end assert (type (func_true) == "function" and type (func_false) == "function", "ShowPromptPanel expects two functions.") + + if (no_repeated) then + if (DF.promtp_panel:IsShown()) then + return + end + end + + if (width) then + DF.promtp_panel:SetWidth (width) + else + DF.promtp_panel:SetWidth (400) + end DF.promtp_panel.prompt:SetText (message) DF.promtp_panel.button_true.true_function = func_true diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index ec74d025..02c2f994 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -4602,7 +4602,14 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia) local misc_actor = info.instancia.showing (4, self:name()) if (misc_actor) then - local debuff_uptime = misc_actor.debuff_uptime_spells and misc_actor.debuff_uptime_spells._ActorTable [esta_magia.id] and misc_actor.debuff_uptime_spells._ActorTable [esta_magia.id].uptime + + local uptime_spellid = esta_magia.id + --if (uptime_spellid == 233490) then + -- uptime_spellid = 233496 + -- uptime_spellid = 233490 + --end + + local debuff_uptime = misc_actor.debuff_uptime_spells and misc_actor.debuff_uptime_spells._ActorTable [uptime_spellid] and misc_actor.debuff_uptime_spells._ActorTable [uptime_spellid].uptime if (debuff_uptime) then hits_string = hits_string .. " |cFFDDDD44(" .. _math_floor (debuff_uptime / info.instancia.showing:GetCombatTime() * 100) .. "% uptime)|r" end diff --git a/classes/classe_energy.lua b/classes/classe_energy.lua index 04078e64..fc6bd7c8 100644 --- a/classes/classe_energy.lua +++ b/classes/classe_energy.lua @@ -200,7 +200,7 @@ function atributo_energy:AtualizarResources (qual_barra, colocacao, instancia) local esta_barra = instancia.barras [qual_barra] if (not esta_barra) then - print ("DEBUG: problema com "..qual_barra.." "..lugar) + print ("DEBUG: problema com "..qual_barra.." "..colocacao) return end