Skip to content

Commit

Permalink
Framework update and few bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed May 12, 2019
1 parent cc57155 commit 62c2cad
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Libs/DF/fw.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

local dversion = 148
local dversion = 149
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)

Expand Down
16 changes: 14 additions & 2 deletions Libs/DF/panel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion classes/classe_damage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion classes/classe_energy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 <instancia.esta_barra> "..qual_barra.." "..lugar)
print ("DEBUG: problema com <instancia.esta_barra> "..qual_barra.." "..colocacao)
return
end

Expand Down

0 comments on commit 62c2cad

Please sign in to comment.