diff --git a/boot.lua b/boot.lua index a735c6d64..d9a3a0449 100644 --- a/boot.lua +++ b/boot.lua @@ -4,8 +4,8 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 7345 - _detalhes.alpha_build_counter = 7345 --if this is higher than the regular counter, use it instead + _detalhes.build_counter = 7346 + _detalhes.alpha_build_counter = 7346 --if this is higher than the regular counter, use it instead _detalhes.game_version = "v8.3.0" _detalhes.userversion = "v8.3.0." .. _detalhes.build_counter _detalhes.realversion = 141 --core version, this is used to check API version for scripts and plugins (see alias below) @@ -448,6 +448,7 @@ do [250870] = true, --Coastal Healing Potion [250872] = true, --Coastal Rejuvenation Potion [6262] = true, --Warlock's Healthstone + [301308] = true, --Abyssal Healing Potion } --[[global]] DETAILS_HEALTH_POTION_ID = 250870 --[[global]] DETAILS_REJU_POTION_ID = 250872 diff --git a/classes/classe_heal.lua b/classes/classe_heal.lua index f394f1213..05d224327 100644 --- a/classes/classe_heal.lua +++ b/classes/classe_heal.lua @@ -2007,6 +2007,10 @@ function atributo_heal:MontaTooltipAlvos (esta_barra, index, instancia) total = self.total end + _detalhes:FormatCooltipForSpells() + GameCooltip:SetOwner(esta_barra, "bottom", "top", 4, -2) + GameCooltip:SetOption ("MinWidth", max(230, esta_barra:GetWidth()*0.98)) + --> add spells for spellid, tabela in _pairs (container) do for target_name, amount in _pairs (tabela ["targets" .. targets_key]) do @@ -2049,31 +2053,43 @@ function atributo_heal:MontaTooltipAlvos (esta_barra, index, instancia) local is_hps = info.instancia.sub_atributo == 2 if (is_hps) then - GameTooltip:AddLine (index..". "..inimigo) - GameTooltip:AddLine (Loc ["STRING_HEALING_HPS_FROM"] .. ":") - GameTooltip:AddLine (" ") + --GameTooltip:AddLine (index..". "..inimigo) + --GameTooltip:AddLine (Loc ["STRING_HEALING_HPS_FROM"] .. ":") + --GameTooltip:AddLine (" ") + _detalhes:AddTooltipSpellHeaderText (Loc ["STRING_HEALING_HPS_FROM"] .. ":", {1, 0.9, 0.0, 1}, 1, _detalhes.tooltip_spell_icon.file, unpack (_detalhes.tooltip_spell_icon.coords)) + _detalhes:AddTooltipHeaderStatusbar (1, 1, 1, 1) else - GameTooltip:AddLine (index..". "..inimigo) - GameTooltip:AddLine (Loc ["STRING_HEALING_FROM"] .. ":") - GameTooltip:AddLine (" ") + --GameTooltip:AddLine (index..". "..inimigo) + --GameTooltip:AddLine (Loc ["STRING_HEALING_FROM"] .. ":") + --GameTooltip:AddLine (" ") + _detalhes:AddTooltipSpellHeaderText (Loc ["STRING_HEALING_FROM"] .. ":", {1, 0.9, 0.0, 1}, 1, _detalhes.tooltip_spell_icon.file, unpack (_detalhes.tooltip_spell_icon.coords)) + _detalhes:AddTooltipHeaderStatusbar (1, 1, 1, 1) end - for index, tabela in _ipairs (habilidades) do - local nome, icone = tabela[1], tabela [3] - if (index < 8) then - if (is_hps) then - GameTooltip:AddDoubleLine (index..". |T"..icone..":0|t "..nome, _detalhes:comma_value (_math_floor (tabela[2]/meu_tempo)).." (".. _cstr ("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1) - else - GameTooltip:AddDoubleLine (index..". |T"..icone..":0|t "..nome, SelectedToKFunction (_, tabela[2]).." (".. _cstr ("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1) + local icon_size = _detalhes.tooltip.icon_size + local icon_border = _detalhes.tooltip.icon_border_texcoord + local topSpellHeal = habilidades[1] and habilidades[1][2] + + if (topSpellHeal) then + for index, tabela in _ipairs (habilidades) do + if (tabela [2] < 1) then + break end - else + + local spellName, spellIcon = tabela[1], tabela [3] + if (is_hps) then - GameTooltip:AddDoubleLine (index..". "..nome, _detalhes:comma_value (_math_floor (tabela[2]/meu_tempo)).." (".. _cstr ("%.1f", tabela[2]/total*100).."%)", .65, .65, .65, .65, .65, .65) + GameCooltip:AddLine (spellName, _detalhes:comma_value (_math_floor (tabela[2]/meu_tempo)).." (".. _cstr ("%.1f", tabela[2]/total*100).."%)") else - GameTooltip:AddDoubleLine (index..". "..nome, SelectedToKFunction (_, tabela[2]).." (".. _cstr ("%.1f", tabela[2]/total*100).."%)", .65, .65, .65, .65, .65, .65) + GameCooltip:AddLine (spellName, SelectedToKFunction (_, tabela[2]).." (".. _cstr ("%.1f", tabela[2]/total*100).."%)") end + + GameCooltip:AddIcon (spellIcon, nil, nil, icon_size.W + 4, icon_size.H + 4, icon_border.L, icon_border.R, icon_border.T, icon_border.B) + _detalhes:AddTooltipBackgroundStatusbar (false, tabela[2] / topSpellHeal * 100) end end + + GameCooltip:Show() return true diff --git a/core/gears.lua b/core/gears.lua index 2a52091cd..1bcf07620 100644 --- a/core/gears.lua +++ b/core/gears.lua @@ -173,9 +173,14 @@ end window1.baseframe:ClearAllPoints() window1.baseframe:SetParent (ChatFrame) + window1.rowframe:SetParent (window1.baseframe) window1.rowframe:ClearAllPoints() window1.rowframe:SetAllPoints() + + window1.windowSwitchButton:SetParent (window1.baseframe) + window1.windowSwitchButton:ClearAllPoints() + window1.windowSwitchButton:SetAllPoints() local y_up = window1.toolbar_side == 1 and -20 or 0 local y_down = (window1.show_statusbar and 14 or 0) + (window1.toolbar_side == 2 and 20 or 0) @@ -212,6 +217,13 @@ end window1.rowframe:SetParent (window1.baseframe) window2.rowframe:SetParent (window2.baseframe) + window1.windowSwitchButton:SetParent (window1.baseframe) + window1.windowSwitchButton:ClearAllPoints() + window1.windowSwitchButton:SetAllPoints() + window2.windowSwitchButton:SetParent (window2.baseframe) + window2.windowSwitchButton:ClearAllPoints() + window2.windowSwitchButton:SetAllPoints() + window1:LockInstance (true) window2:LockInstance (true)