Skip to content

Commit

Permalink
Another round of general bug fixes
Browse files Browse the repository at this point in the history
- Added Abyssal  Healing Potion.
- Fixed healing done targets on the breakdown window.
- Fixed hovering bars when the window is embed into the chat window.
  • Loading branch information
Tercioo committed Jul 1, 2020
1 parent 168056c commit 72ddfe8
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 18 deletions.
5 changes: 3 additions & 2 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
48 changes: 32 additions & 16 deletions classes/classe_heal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
12 changes: 12 additions & 0 deletions core/gears.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 72ddfe8

Please sign in to comment.