Skip to content

Commit

Permalink
v9213
Browse files Browse the repository at this point in the history
Fixed an issue where after reloading, overall data won't show the players nickname.
Fixed overkill damage on death log tooltip.
Fixed the percent bars for the healing done target on the player breakdown window.
Fixed an issue with resource tooltips.
And more...
  • Loading branch information
Tercioo committed Dec 10, 2021
1 parent 7adae64 commit 8be58e7
Show file tree
Hide file tree
Showing 15 changed files with 194 additions and 109 deletions.
2 changes: 1 addition & 1 deletion Libs/DF/fw.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


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

Expand Down
7 changes: 7 additions & 0 deletions Libs/DF/math.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ function DF:GetRangeValue (minValue, maxValue, percent)
return Lerp (minValue, maxValue, percent)
end

function DF:GetColorRangeValue(r1, g1, b1, r2, g2, b2, value)
local newR = DF:LerpNorm(r1, r2, value)
local newG = DF:LerpNorm(g1, g2, value)
local newB = DF:LerpNorm(b1, b2, value)
return newR, newG, newB
end

--dot product of two 2D Vectors
function DF:GetDotProduct (value1, value2)
return (value1.x * value2.x) + (value1.y * value2.y)
Expand Down
9 changes: 5 additions & 4 deletions Libs/DF/panel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7368,15 +7368,16 @@ DF.StatusBarFunctions = {
self:RunHooksForWidget ("OnHealthMaxChange", self, self.displayedUnit)
end

healthBarMetaFunctions.UpdateHealth = function (self)
healthBarMetaFunctions.UpdateHealth = function(self)
-- update max health regardless to avoid weird wrong values on UpdateMaxHealth sometimes
-- local maxHealth = UnitHealthMax (self.displayedUnit)
-- self:SetMinMaxValues (0, maxHealth)
-- self.currentHealthMax = maxHealth

local health = UnitHealth (self.displayedUnit)
self.oldHealth = self.currentHealth
local health = UnitHealth(self.displayedUnit)
self.currentHealth = health
PixelUtil.SetStatusBarValue (self, health)
PixelUtil.SetStatusBarValue(self, health)

self:RunHooksForWidget ("OnHealthChange", self, self.displayedUnit)
end
Expand Down Expand Up @@ -8410,7 +8411,7 @@ DF.CastFrameFunctions = {
self:SetAlpha (1)
self.Icon:SetTexture (texture)
self.Icon:Show()
self.Text:SetText (text)
self.Text:SetText (text or name)

if (self.Settings.ShowCastTime and self.Settings.CanLazyTick) then
self.percentText:Show()
Expand Down
12 changes: 9 additions & 3 deletions Libs/DF/schedules.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@

local DF = _G ["DetailsFramework"]
if (not DF or not DetailsFrameworkCanLoad) then
return
end


local DF = DetailsFramework
local C_Timer = _G.C_Timer
local unpack = _G.unpack

--make a namespace for schedules
DF.Schedules = {}
DF.Schedules = DF.Schedules or {}

--run a scheduled function with its payload
local triggerScheduledTick = function(tickerObject)
Expand Down Expand Up @@ -65,3 +67,7 @@ end
function DF.Schedules.SetName(object, name)
object.name = name
end

function DF.Schedules.RunNextTick(callback)
return DF.Schedules.After(0, callback)
end
4 changes: 4 additions & 0 deletions Libs/DF/spells.lua
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ if (IS_WOW_PROJECT_NOT_MAINLINE) then
DF.CooldownsBySpec[65][5588] = 5 --hammer of justice Rank 2
DF.CooldownsBySpec[65][5589] = 5 --hammer of justice Rank 3
DF.CooldownsBySpec[65][10308] = 5 --hammer of justice Rank 4
DF.CooldownsBySpec[65][10326] = 5 --Turn Evil
DF.CooldownsBySpec[65][20729] = 3 --blessing of sacrifice Rank 2
DF.CooldownsBySpec[65][27147] = 3 --blessing of sacrifice Rank 3
DF.CooldownsBySpec[65][27148] = 3 --blessing of sacrifice Rank 4
Expand All @@ -557,6 +558,7 @@ if (IS_WOW_PROJECT_NOT_MAINLINE) then
DF.CooldownsBySpec[66][5588] = 5 --hammer of justice Rank 2
DF.CooldownsBySpec[66][5589] = 5 --hammer of justice Rank 3
DF.CooldownsBySpec[66][10308] = 5 --hammer of justice Rank 4
DF.CooldownsBySpec[66][10326] = 5 --Turn Evil
DF.CooldownsBySpec[66][5599] = 3 --blessing of protection Rank 2
DF.CooldownsBySpec[66][10278] = 3 --blessing of protection Rank 3

Expand All @@ -570,6 +572,7 @@ if (IS_WOW_PROJECT_NOT_MAINLINE) then
DF.CooldownsBySpec[70][5588] = 5 --hammer of justice Rank 2
DF.CooldownsBySpec[70][5589] = 5 --hammer of justice Rank 3
DF.CooldownsBySpec[70][10308] = 5 --hammer of justice Rank 4
DF.CooldownsBySpec[70][10326] = 5 --Turn Evil
DF.CooldownsBySpec[70][5599] = 3 --blessing of protection Rank 2
DF.CooldownsBySpec[70][10278] = 3 --blessing of protection Rank 3
DF.CooldownsBySpec[70][20729] = 3 --blessing of sacrifice Rank 2
Expand Down Expand Up @@ -1055,6 +1058,7 @@ if (IS_WOW_PROJECT_NOT_MAINLINE) then
DF.CrowdControlSpells[5588] = "PALADIN" --hammer of justice Rank 2
DF.CrowdControlSpells[5589] = "PALADIN" --hammer of justice Rank 3
DF.CrowdControlSpells[10308] = "PALADIN" --hammer of justice Rank 4
DF.CrowdControlSpells[10326] = "PALADIN" --Turn Evil

DF.CrowdControlSpells[8124] = "PRIEST" --psychic scream Rank 2
DF.CrowdControlSpells[10888] = "PRIEST" --psychic scream Rank 3
Expand Down
13 changes: 10 additions & 3 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

local version, build, date, tocversion = GetBuildInfo()

_detalhes.build_counter = 9108
_detalhes.alpha_build_counter = 9108 --if this is higher than the regular counter, use it instead
_detalhes.bcc_counter = 29
_detalhes.build_counter = 9213
_detalhes.alpha_build_counter = 9213 --if this is higher than the regular counter, use it instead
_detalhes.bcc_counter = 30
_detalhes.dont_open_news = true
_detalhes.game_version = version
_detalhes.userversion = version .. _detalhes.build_counter
Expand All @@ -33,6 +33,13 @@ do
local Loc = _G.LibStub("AceLocale-3.0"):GetLocale( "Details" )

local news = {

{"v9.1.5.9213.145", "December 9th, 2021"},
"Fixed an issue where after reloading, overall data won't show the players nickname.",
"Fixed overkill damage on death log tooltip.",
"Fixed the percent bars for the healing done target on the player breakdown window.",
"Fixed an issue with resource tooltips.",

{"v9.1.5.9108.145", "November 02th, 2021"},
"Necrotic Wake: weapons damage does not count anymore for the player which uses it.",
"Necrotic Wake: a new 'fake player' is shown showing the damage done of all weapons during combat.",
Expand Down
2 changes: 2 additions & 0 deletions classes/class_damage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5306,6 +5306,8 @@ end
shadow.end_time = time()
end

shadow.displayName = actor.displayName or actor.nome

shadow.boss_fight_component = actor.boss_fight_component or shadow.boss_fight_component
shadow.fight_component = actor.fight_component or shadow.fight_component
shadow.grupo = actor.grupo or shadow.grupo
Expand Down
32 changes: 16 additions & 16 deletions classes/class_heal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1940,7 +1940,7 @@ function atributo_heal:MontaInfoHealingDone()
barra.on_focus = false
end

self:FocusLock (barra, tabela[1])
self:FocusLock(barra, tabela[1])

barra.other_actor = tabela [6]

Expand All @@ -1967,19 +1967,17 @@ function atributo_heal:MontaInfoHealingDone()
end

--> TOP CURADOS
local meus_inimigos = {}
local healedTargets = {}
tabela = self.targets
for target_name, amount in _pairs (tabela) do
_table_insert (meus_inimigos, {target_name, amount, amount / total*100})
_table_insert (healedTargets, {target_name, amount, amount / total*100})
end
_table_sort (meus_inimigos, _detalhes.Sort2)

local amt_alvos = #meus_inimigos
gump:JI_AtualizaContainerAlvos (amt_alvos)

local max_inimigos = meus_inimigos[1] and meus_inimigos[1][2] or 0

for index, tabela in _ipairs (meus_inimigos) do
_table_sort(healedTargets, _detalhes.Sort2)

gump:JI_AtualizaContainerAlvos(#healedTargets)
local topHealingDone = healedTargets[1] and healedTargets[1][2]

for index, tabela in _ipairs (healedTargets) do

local barra = info.barras2 [index]

Expand All @@ -1988,10 +1986,12 @@ function atributo_heal:MontaInfoHealingDone()
barra.textura:SetStatusBarColor (1, 1, 1, 1)
end

local healingDone = tabela[2]

if (index == 1) then
barra.textura:SetValue (100)
barra.textura:SetValue(100)
else
barra.textura:SetValue (tabela[2]/max_*100)
barra.textura:SetValue(healingDone / topHealingDone * 100)
end

local target_actor = instancia.showing (2, tabela[1])
Expand All @@ -2004,12 +2004,12 @@ function atributo_heal:MontaInfoHealingDone()
end

barra.lineText1:SetText (index .. ". " .. _detalhes:GetOnlyName (tabela[1]))
barra.textura:SetStatusBarColor (1, 1, 1, 1)
barra.textura:SetStatusBarColor(1, 1, 1, 1)

if (info.sub_atributo == 2) then
barra.lineText4:SetText (_detalhes:comma_value (_math_floor (tabela[2]/meu_tempo)) .." (" .. _cstr ("%.1f", tabela[3]) .. "%)")
barra.lineText4:SetText (_detalhes:comma_value (_math_floor (healingDone/meu_tempo)) .." (" .. _cstr ("%.1f", tabela[3]) .. "%)")
else
barra.lineText4:SetText (SelectedToKFunction (_, tabela[2]) .. " (" .. _cstr ("%.1f", tabela[3]) .. "%)")
barra.lineText4:SetText (SelectedToKFunction (_, healingDone) .. " (" .. _cstr ("%.1f", tabela[3]) .. "%)")
end

barra.minha_tabela = self
Expand Down
4 changes: 2 additions & 2 deletions classes/class_resources.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1344,8 +1344,8 @@ function atributo_energy:MontaTooltipAlvos (esta_barra, index)
end

local spellname, _, spellicon = _GetSpellInfo (spell [1])
GameTooltip:AddDoubleLine (spellname .. ": ", _detalhes:comma_value (spell [2]) .. " (" .. _cstr ("%.1f", (spell [2] / total_regenerado) * 100).."%)", 1, 1, 1, 1, 1, 1)
GameTooltip:AddTexture (icone_magia)
GameTooltip:AddDoubleLine(spellname .. ": ", _detalhes:comma_value (spell [2]) .. " (" .. _cstr ("%.1f", (spell [2] / total_regenerado) * 100).."%)", 1, 1, 1, 1, 1, 1)
GameTooltip:AddTexture(spellicon)
end
end

Expand Down
17 changes: 10 additions & 7 deletions classes/class_utility.lua
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,16 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown)
local critOrCrush = critical .. crushing

if (overkill > 0) then
--check the type of overkill that should be shown
--if show_totalhitdamage_on_overkill is true it'll show the total damage of the hit
--if false it shows the total damage of the hit minus the overkill
if (not _detalhes.show_totalhitdamage_on_overkill) then
amount = amount - overkill
end


--> deprecated as the parser now removes the overkill damage from total damage
--> this should now sum the overkill from [10] with the damage from [3]
--check the type of overkill that should be shown
--if show_totalhitdamage_on_overkill is true it'll show the total damage of the hit
--if false it shows the total damage of the hit minus the overkill
--if (not _detalhes.show_totalhitdamage_on_overkill) then
-- amount = amount - overkill
--end

overkill = " (" .. _detalhes:ToK (overkill) .. " |cFFFF8800overkill|r)"
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s |cFFFFFF00" .. spellname .. "|r (|cFFC6B0D9" .. source .. "|r)", "-" .. _detalhes:ToK (amount) .. critOrCrush .. overkill .. " (" .. hp .. "%)", 1, "white", "white")
else
Expand Down
36 changes: 14 additions & 22 deletions classes/container_segments.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,37 +113,29 @@ function historico:adicionar_overall (tabela)
_detalhes.tabela_overall.overall_enemy_name = "-- x -- x --"
end
end

--
if (_detalhes.tabela_overall.start_time == 0) then
--print ("start_time == 0 NO!")
_detalhes.tabela_overall:SetStartTime (tabela.start_time)
_detalhes.tabela_overall:SetEndTime (tabela.end_time)
else
--print ("start_time ~= 0 OKAY", tabela.start_time, _detalhes.tabela_overall:GetCombatTime(), tabela.start_time - _detalhes.tabela_overall:GetCombatTime())
_detalhes.tabela_overall:SetStartTime (tabela.start_time - _detalhes.tabela_overall:GetCombatTime())
_detalhes.tabela_overall:SetEndTime (tabela.end_time)
end

if (_detalhes.tabela_overall.data_inicio == 0) then
_detalhes.tabela_overall.data_inicio = _detalhes.tabela_vigente.data_inicio or 0
end
--


if (_detalhes.tabela_overall.start_time == 0) then
_detalhes.tabela_overall:SetStartTime (tabela.start_time)
_detalhes.tabela_overall:SetEndTime (tabela.end_time)
else
_detalhes.tabela_overall:SetStartTime (tabela.start_time - _detalhes.tabela_overall:GetCombatTime())
_detalhes.tabela_overall:SetEndTime (tabela.end_time)
end

if (_detalhes.tabela_overall.data_inicio == 0) then
_detalhes.tabela_overall.data_inicio = _detalhes.tabela_vigente.data_inicio or 0
end

_detalhes.tabela_overall:seta_data (_detalhes._detalhes_props.DATA_TYPE_END)

_detalhes:ClockPluginTickOnSegment()

for id, instance in _detalhes:ListInstances() do
if (instance:IsEnabled()) then
if (instance:GetSegment() == -1) then
instance:ForceRefresh()
--instance:RefreshMainWindow (true)
--print ("isntance", id, "overall updated.")
end
end
end

end

function _detalhes:ScheduleAddCombatToOverall (combat) --deprecated (15/03/2019)
Expand Down
Loading

0 comments on commit 8be58e7

Please sign in to comment.