Skip to content

Commit

Permalink
Details 11902
Browse files Browse the repository at this point in the history
  • Loading branch information
siweia committed Sep 10, 2023
1 parent ac8094a commit 311c201
Show file tree
Hide file tree
Showing 12 changed files with 152 additions and 121 deletions.
31 changes: 5 additions & 26 deletions Interface/AddOns/Details/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,8 @@
# Details! Damage Meter

## [Details.20230909.11901.155](https://github.com/Tercioo/Details-Damage-Meter/tree/Details.20230909.11901.155) (2023-09-09)
[Full Changelog](https://github.com/Tercioo/Details-Damage-Meter/compare/Details.20230825.11857.155...Details.20230909.11901.155)
## [Details.20230909.11902.155](https://github.com/Tercioo/Details-Damage-Meter/tree/Details.20230909.11902.155) (2023-09-09)
[Full Changelog](https://github.com/Tercioo/Details-Damage-Meter/compare/Details.20230909.11901.155...Details.20230909.11902.155)

- Change logs
- Updates
- Improved Augmented damage prediction.
- Lib Open Raid update
- Fix for ticket #595
- Merge pull request #600 from Flamanis/Unlock-Details-Streamer-for-use-on-Era
Unlock Details Streamer for use on Era
- Merge pull request #598 from Flamanis/Picture-Edit-Fixes
Change DF/pictureedit frame heirarchy
- Merge pull request #594 from Flamanis/Era-first-hit-fix
Remove spell id check for first hit
- Merge branch 'master' of https://github.com/Tercioo/Details-Damage-Meter
- Framework update
- Attempt to fix death log healing spam where a spell has multiple heals in the same second
- Merge pull request #588 from WillowGryph/ele-overload-parser-spells
Update parser.lua
- Update Details\_Streamer.lua
- Change DF/pictureedit frame heirarchy to allow for close button and Done button to work right
- Merge pull request #597 from Flamanis/Classic-Era-Backend-functions
Remove classic era checks for functions that were added.
- Remove classic era checks for functions that were added.
- Remove spell id check for first hit
- Update parser.lua
Added Elemental Shaman overload spells
- Fixed an issue with classicEra and Wrath game versions
- Buff Update now show buffs received from an Augmented Evoker and Priest's Power Infusion buff.
- Buff Update now show buffs received from an Augmented Evoker and Priest's Power Infusion buff.
2 changes: 1 addition & 1 deletion Interface/AddOns/Details/Details.toc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## SavedVariables: _detalhes_global, __details_backup
## SavedVariablesPerCharacter: _detalhes_database
## OptionalDeps: Ace3, LibSharedMedia-3.0, LibWindow-1.1, LibDBIcon-1.0, NickTag-1.0, LibDataBroker-1.1, LibGraph-2.0
## Version: #Details.20230909.11901.155
## Version: #Details.20230909.11902.155
## IconTexture: Interface\AddOns\Details\images\minimap

## X-Curse-Project-ID: 61284
Expand Down
2 changes: 1 addition & 1 deletion Interface/AddOns/Details/Details_Classic.toc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## SavedVariables: _detalhes_global, __details_backup
## SavedVariablesPerCharacter: _detalhes_database
## OptionalDeps: Ace3, LibSharedMedia-3.0, LibWindow-1.1, LibDBIcon-1.0, NickTag-1.0, LibDataBroker-1.1, LibItemUpgradeInfo-1.0, LibGroupInSpecT-1.1, LibCompress, LibGraph-2.0
## Version: #Details.20230909.11901.155
## Version: #Details.20230909.11902.155
## IconTexture: Interface\AddOns\Details\images\minimap

#@no-lib-strip@
Expand Down
2 changes: 1 addition & 1 deletion Interface/AddOns/Details/Details_Wrath.toc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## SavedVariables: _detalhes_global, __details_backup
## SavedVariablesPerCharacter: _detalhes_database
## OptionalDeps: Ace3, LibSharedMedia-3.0, LibWindow-1.1, LibDBIcon-1.0, NickTag-1.0, LibDataBroker-1.1, LibItemUpgradeInfo-1.0, LibGroupInSpecT-1.1, LibCompress, LibGraph-2.0
## Version: #Details.20230909.11901.155
## Version: #Details.20230909.11902.155
## IconTexture: Interface\AddOns\Details\images\minimap

#@no-lib-strip@
Expand Down
2 changes: 1 addition & 1 deletion Interface/AddOns/Details/Libs/DF/fw.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


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

Expand Down
11 changes: 9 additions & 2 deletions Interface/AddOns/Details/Libs/DF/icon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,12 @@ detailsFramework.IconMixin = {
end
end

self:AlignAuraIcons()
--if there's nothing to show, no need to align
if (not next(self.AuraCache)) then
self:Hide()
else
self:AlignAuraIcons()
end
end,

---@param self df_iconrow the parent frame
Expand Down Expand Up @@ -844,7 +849,9 @@ detailsFramework.IconMixin = {
end
end

width = width + (iconFrame.width * iconFrame:GetScale()) + xPadding
--icon.lua:847: attempt to perform arithmetic on field 'width'(a nil value)
--but .width is set on SetIconSimple and SetIcon, getting the width from the iconFrame it self instead from cache is the cache fails
width = width + ((iconFrame.width or iconFrame:GetWidth()) * iconFrame:GetScale()) + xPadding
end

if (self.options.center_alignment) then
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 100105
## Title: LuaServerDefinitions
## Notes: Development Tools
## Version: #Details.20230909.11901.155
## Version: #Details.20230909.11902.155

## X-Curse-Project-ID: 889573

Expand Down
4 changes: 2 additions & 2 deletions Interface/AddOns/Details/boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
local addonName, Details222 = ...
local version, build, date, tocversion = GetBuildInfo()

Details.build_counter = 11901
Details.alpha_build_counter = 11901 --if this is higher than the regular counter, use it instead
Details.build_counter = 11902
Details.alpha_build_counter = 11902 --if this is higher than the regular counter, use it instead
Details.dont_open_news = true
Details.game_version = version
Details.userversion = version .. " " .. Details.build_counter
Expand Down
98 changes: 66 additions & 32 deletions Interface/AddOns/Details/classes/class_utility.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

--lua locals
local _cstr = string.format
local _math_floor = math.floor
Expand All @@ -7,6 +8,7 @@ local pairs = pairs
local min = math.min
local unpack = unpack
local type = type

--api locals
local _GetSpellInfo = Details.getspellinfo
local GameTooltip = GameTooltip
Expand Down Expand Up @@ -1706,54 +1708,86 @@ end
function atributo_misc:ToolTipBuffUptime(instance, barFrame)
local owner = self.owner
if (owner and owner.classe) then
r, g, b = unpack(_detalhes.class_colors[owner.classe])
r, g, b = unpack(Details.class_colors[owner.classe])
else
r, g, b = unpack(_detalhes.class_colors[self.classe])
r, g, b = unpack(Details.class_colors[self.classe])
end

local actorTotal = self["buff_uptime"]
local actorTable = self.buff_uptime_spells._ActorTable

local buffsUsed = {}
local combatTime = instance.showing:GetCombatTime()
local buffUptimeSpells = self:GetSpellContainer("buff")
local buffUptimeTable = {}

if (buffUptimeSpells) then
for spellId, spellTable in buffUptimeSpells:ListSpells() do
if (not Details.BuffUptimeSpellsToIgnore[spellId]) then
local uptime = spellTable.uptime or 0
if (uptime > 0) then
buffUptimeTable[#buffUptimeTable+1] = {spellId, uptime}
end
end
end

for spellId, actor in pairs(actorTable) do
buffsUsed[#buffsUsed+1] = {spellId, actor.uptime or 0}
end
table.sort(buffsUsed, _detalhes.Sort2)
--check if this player has a augmentation buff container
local augmentedBuffContainer = self.received_buffs_spells
if (augmentedBuffContainer) then
for sourceNameSpellId, spellTable in augmentedBuffContainer:ListSpells() do
local sourceName, spellId = strsplit("@", sourceNameSpellId)
spellId = tonumber(spellId)
local spellName, _, spellIcon = Details.GetSpellInfo(spellId)

_detalhes:AddTooltipSpellHeaderText(Loc ["STRING_SPELLS"], headerColor, #buffsUsed, _detalhes.tooltip_spell_icon.file, unpack(_detalhes.tooltip_spell_icon.coords))
_detalhes:AddTooltipHeaderStatusbar(r, g, b, barAlha)
if (spellName) then
sourceName = detailsFramework:RemoveRealmName(sourceName)
local uptime = spellTable.uptime or 0
buffUptimeTable[#buffUptimeTable+1] = {spellId, uptime, sourceName}
end
end
end

local iconSizeInfo = _detalhes.tooltip.icon_size
local iconBorderInfo = _detalhes.tooltip.icon_border_texcoord
table.sort(buffUptimeTable, Details.Sort2)

if (#buffsUsed > 0) then
for i = 1, min(30, #buffsUsed) do
local spellTable = buffsUsed[i]
local percent = spellTable[2] / combatTime * 100
Details:AddTooltipSpellHeaderText(Loc ["STRING_SPELLS"], headerColor, #buffUptimeTable, Details.tooltip_spell_icon.file, unpack(Details.tooltip_spell_icon.coords))
Details:AddTooltipHeaderStatusbar(r, g, b, barAlha)

if (spellTable[2] > 0 and percent < 99.5) then
local spellName, _, spellIcon = _GetSpellInfo(spellTable[1])
local iconSizeInfo = Details.tooltip.icon_size
local iconBorderInfo = Details.tooltip.icon_border_texcoord

local minutes, seconds = floor(spellTable[2] / 60), floor(spellTable[2] % 60)
if (spellTable[2] >= combatTime) then
--GameCooltip:AddLine(nome_magia, minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)", nil, "gray", "gray")
--GameCooltip:AddStatusBar (100, nil, 1, 0, 1, .3, false)
if (#buffUptimeTable > 0) then
for i = 1, min(30, #buffUptimeTable) do
local uptimeTable = buffUptimeTable[i]

elseif (minutes > 0) then
GameCooltip:AddLine(spellName, minutes .. "m " .. seconds .. "s" .. " (" .. _cstr("%.1f", percent) .. "%)")
_detalhes:AddTooltipBackgroundStatusbar(false, percent)
local spellId = uptimeTable[1]
local uptime = uptimeTable[2]
local sourceName = uptimeTable[3]

else
GameCooltip:AddLine(spellName, seconds .. "s" .. " (" .. _cstr("%.1f", percent) .. "%)")
_detalhes:AddTooltipBackgroundStatusbar(false, percent)
end
local uptimePercent = uptime / combatTime * 100

if (uptime > 0 and uptimePercent < 99.5) then
local spellName, _, spellIcon = _GetSpellInfo(spellId)

if (sourceName) then
spellName = spellName .. " [" .. sourceName .. "]"
end

GameCooltip:AddIcon(spellIcon, nil, nil, iconSizeInfo.W, iconSizeInfo.H, iconBorderInfo.L, iconBorderInfo.R, iconBorderInfo.T, iconBorderInfo.B)
if (uptime <= combatTime) then
local minutes, seconds = math.floor(uptime / 60), math.floor(uptime % 60)
if (minutes > 0) then
GameCooltip:AddLine(spellName, minutes .. "m " .. seconds .. "s" .. " (" .. format("%.1f", uptimePercent) .. "%)")
Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, sourceName and "green")
else
GameCooltip:AddLine(spellName, seconds .. "s" .. " (" .. format("%.1f", uptimePercent) .. "%)")
Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, sourceName and "green")
end

GameCooltip:AddIcon(spellIcon, nil, nil, iconSizeInfo.W, iconSizeInfo.H, iconBorderInfo.L, iconBorderInfo.R, iconBorderInfo.T, iconBorderInfo.B)
end
end
end
else
GameCooltip:AddLine(Loc ["STRING_NO_SPELL"])
end
else
Details:AddTooltipSpellHeaderText(Loc ["STRING_SPELLS"], headerColor, #buffUptimeTable, Details.tooltip_spell_icon.file, unpack(Details.tooltip_spell_icon.coords))
Details:AddTooltipHeaderStatusbar(r, g, b, barAlha)
GameCooltip:AddLine(Loc ["STRING_NO_SPELL"])
end

Expand Down
6 changes: 5 additions & 1 deletion Interface/AddOns/Details/core/control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
local _tempo = time()
local _
local addonName, Details222 = ...
local detailsFramework = DetailsFramework

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--local pointers
Expand Down Expand Up @@ -1629,7 +1630,7 @@
GameCooltip:AddStatusBar (100, 1, 0, 0, 0, 0.8)
end

function Details:AddTooltipBackgroundStatusbar (side, value, useSpark)
function Details:AddTooltipBackgroundStatusbar (side, value, useSpark, statusBarColor)
Details.tooltip.background [4] = 0.8
Details.tooltip.icon_size.W = Details.tooltip.line_height
Details.tooltip.icon_size.H = Details.tooltip.line_height
Expand Down Expand Up @@ -1661,6 +1662,9 @@

if (not side) then
local r, g, b, a = unpack(Details.tooltip.bar_color)
if (statusBarColor) then
r, g, b, a = detailsFramework:ParseColors(statusBarColor)
end
local rBG, gBG, bBG, aBG = unpack(Details.tooltip.background)
GameCooltip:AddStatusBar (value, 1, r, g, b, a, useSpark, {value = 100, color = {rBG, gBG, bBG, aBG}, texture = [[Interface\AddOns\Details\images\bar_serenity]]})

Expand Down
Loading

0 comments on commit 311c201

Please sign in to comment.