Merge remote-tracking branch 'fork/master'

This commit is contained in:
andrew6180
2024-06-10 08:55:07 -07:00
46 changed files with 1283 additions and 63 deletions
@@ -6,7 +6,7 @@ local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
local unpack = unpack
local GetTime = GetTime
local CreateFrame = CreateFrame
local GetSpellLink = GetSpellLink
local GetSpellLink = GetSpellLink or C_Spell.GetSpellLink --api local
local GetSpellInfo = GetSpellInfo
local _GetSpellInfo = Details.GetSpellInfo
local GameTooltip = GameTooltip
@@ -6,8 +6,8 @@ local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
local unpack = unpack
local GetTime = GetTime
local CreateFrame = CreateFrame
local GetSpellLink = GetSpellLink
local GetSpellInfo = GetSpellInfo
local GetSpellLink = GetSpellLink or C_Spell.GetSpellLink
local GetSpellInfo = Details222.GetSpellInfo
local _GetSpellInfo = Details.GetSpellInfo
local GameTooltip = GameTooltip
local IsShiftKeyDown = IsShiftKeyDown
@@ -6,8 +6,8 @@ local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
local unpack = unpack
local GetTime = GetTime
local CreateFrame = CreateFrame
local GetSpellLink = GetSpellLink
local GetSpellInfo = GetSpellInfo
local GetSpellLink = GetSpellLink or C_Spell.GetSpellLink --api local
local GetSpellInfo = Details222.GetSpellInfo
local _GetSpellInfo = Details.GetSpellInfo
local GameTooltip = GameTooltip
local IsShiftKeyDown = IsShiftKeyDown
@@ -115,7 +115,7 @@ local onEnterSpellTarget = function(targetFrame)
end
---@type number the top value of targets
local topValue = targets[1] and targets[1][2] or 0
local topValue = math.max(targets[1] and targets[1][2] or 0, 0.001)
local cooltip = GameCooltip
cooltip:Preset(2)
@@ -172,6 +172,7 @@ local onEnterSpellBar = function(spellBar, motion) --parei aqui: precisa por nom
end
spellsTab.currentSpellBar = spellBar
Details222.FocusedSpellId = spellBar.spellId
---@type instance
local instance = spellsTab.GetInstance()
@@ -336,10 +337,15 @@ local onEnterSpellBar = function(spellBar, motion) --parei aqui: precisa por nom
local normalAverage = spellTable.n_total / math.max(normalHitsAmt, 0.0001)
blockLine3.leftText:SetText(Loc ["STRING_AVERAGE"] .. ": " .. Details:CommaValue(normalAverage))
local tempo = (elapsedTime * spellTable.n_total) / math.max(spellTable.total, 0.001)
local normalAveragePercent = spellBar.average / normalAverage * 100
local normalTempoPercent = normalAveragePercent * tempo / 100
blockLine3.rightText:SetText(Loc ["STRING_HPS"] .. ": " .. Details:CommaValue(spellTable.n_total / normalTempoPercent))
local normalHPS = 0
if (spellTable.n_total > 0) then
local tempo = (elapsedTime * spellTable.n_total) / math.max(spellTable.total, 0.001)
local normalAveragePercent = spellBar.average / normalAverage * 100
local normalTempoPercent = normalAveragePercent * tempo / 100
normalHPS = spellTable.n_total / normalTempoPercent
end
blockLine3.rightText:SetText(Loc ["STRING_HPS"] .. ": " .. Details:CommaValue(normalHPS))
end
---@type number
@@ -364,10 +370,15 @@ local onEnterSpellBar = function(spellBar, motion) --parei aqui: precisa por nom
local critAverage = spellTable.c_total / math.max(criticalHitsAmt, 0.0001)
blockLine3.leftText:SetText(Loc ["STRING_AVERAGE"] .. ": " .. Details:CommaValue(critAverage))
local tempo = (elapsedTime * spellTable.c_total) / math.max(spellTable.total, 0.001)
local critAveragePercent = spellBar.average / critAverage * 100
local critTempoPercent = critAveragePercent * tempo / 100
blockLine3.rightText:SetText(Loc ["STRING_HPS"] .. ": " .. Details:CommaValue(spellTable.c_total / critTempoPercent))
local critHPS = 0
if (spellTable.c_total > 0) then
local tempo = (elapsedTime * spellTable.c_total) / math.max(spellTable.total, 0.001)
local critAveragePercent = spellBar.average / critAverage * 100
local critTempoPercent = critAveragePercent * tempo / 100
critHPS = spellTable.c_total / critTempoPercent
end
blockLine3.rightText:SetText(Loc ["STRING_HPS"] .. ": " .. Details:CommaValue(critHPS))
end
---@type number
@@ -6,8 +6,8 @@ local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
local unpack = unpack
local GetTime = GetTime
local CreateFrame = CreateFrame
local GetSpellLink = GetSpellLink
local GetSpellInfo = GetSpellInfo
local GetSpellLink = GetSpellLink or C_Spell.GetSpellLink --api local
local GetSpellInfo = Details222.GetSpellInfo
local _GetSpellInfo = Details.GetSpellInfo
local GameTooltip = GameTooltip
local IsShiftKeyDown = IsShiftKeyDown
@@ -148,7 +148,7 @@ local updateTargetBar = function(targetBar, index, combatObject, scrollFrame, he
textIndex = textIndex + 1
elseif (header.name == "percent") then
targetBar.percent = value / totalValue * 100 --totalValue is nil
targetBar.percent = value / math.max(totalValue, 0.001) * 100 --totalValue is nil
---@type string
local percentFormatted = string.format("%.1f", targetBar.percent) .. "%"
text:SetText(percentFormatted)
@@ -605,4 +605,4 @@ function spellsTab.CreateTargetBar(self, index) --~create ~target ~createtarget
targetBar:AlignWithHeader(self.Header, "left")
return targetBar
end
end
@@ -8,8 +8,8 @@ local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
local unpack = unpack
local GetTime = GetTime
local CreateFrame = CreateFrame
local GetSpellLink = GetSpellLink
local GetSpellInfo = GetSpellInfo
local GetSpellLink = GetSpellLink or C_Spell.GetSpellLink --api local
local GetSpellInfo = Details222.GetSpellInfo
local _GetSpellInfo = Details.GetSpellInfo
local GameTooltip = GameTooltip
local IsShiftKeyDown = IsShiftKeyDown
+1 -1
View File
@@ -161,7 +161,7 @@ end
isReady, normalizedPercent, timeLeft, charges, minValue, maxValue, currentValue = openRaidLib.GetCooldownStatusFromCooldownInfo(cooldownInfo)
end)
if (not bRunOkay) then
local spellName = GetSpellInfo(spellId)
local spellName = Details222.GetSpellInfo(spellId)
--print("error on cooldown update:", unitName, spellName, errorText)
return
end
+5 -2
View File
@@ -736,7 +736,10 @@ function Details:CreateCurrentDpsFrame(parent, name)
local dpsBarFrame = DetailsArenaDpsBars.splitBar
--a percenntagem na barra esta sendo setada corretamente, porem a animação não esta funcrtionando ainda
local percentValue = teamGreenDps / totalDamage
local percentValue = 0
if (totalDamage > 0) then
percentValue = teamGreenDps / totalDamage
end
percentValue = Saturate(percentValue)
--print(percentValue)
@@ -940,4 +943,4 @@ function DetailsTestSplitBar()
loopTime = 0.1
end
end)
end
end
+1
View File
@@ -1,6 +1,7 @@
local Details = _G.Details
local C_Timer = _G.C_Timer
local GetSpellInfo = Details.GetSpellInfo
local libwindow = LibStub("LibWindow-1.1")
function Details:OpenEventTrackerOptions(bFromOptionsPanel)
+3
View File
@@ -1,7 +1,10 @@
local Details = _G.Details
local addonName, Details222 = ...
local L = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
local GetSpellInfo = Details222.GetSpellInfo
--default weaktable
Details.weaktable = {__mode = "v"}
+2 -1
View File
@@ -1930,7 +1930,8 @@ local lineScript_Onmouseup = function(self, button)
if (self.mouse_down and (self.mouse_down+0.4 > GetTime() and (x == self.x and y == self.y)) or (x == self.x and y == self.y)) then
if (self.button == "LeftButton" or self.button == "MiddleButton") then
if (instanceObject.atributo == 5 or bIsShiftDown) then
--Temporary disabling of Resource breakdowns since not implemented
if (instanceObject.atributo == 5 or instanceObject.atributo == 3 or bIsShiftDown) then
--report
if (instanceObject.atributo == 5 and bIsShiftDown) then
local custom = instanceObject:GetCustomObject()
+10 -2
View File
@@ -18,6 +18,9 @@ local C_Timer = C_Timer
local GameTooltip = GameTooltip
local SOUNDKIT = SOUNDKIT
local GetItemInfo = GetItemInfo or C_Item.GetItemInfo
local GetDetailedItemLevelInfo = GetDetailedItemLevelInfo or C_Item.GetDetailedItemLevelInfo --C_Item.GetDetailedItemLevelInfo does not return a table
local Loc = _G.LibStub("AceLocale-3.0"):GetLocale("Details")
local mythicDungeonCharts = Details222.MythicPlus.Charts.Listener
@@ -84,7 +87,10 @@ _G.MythicDungeonFrames = mythicDungeonFrames
--frame to handle loot events
local lootFrame = CreateFrame("frame", "DetailsEndOfMythicLootFrame", UIParent)
lootFrame:RegisterEvent("BOSS_KILL")
lootFrame:RegisterEvent("ENCOUNTER_LOOT_RECEIVED")
if (C_EventUtils.IsEventValid("ENCOUNTER_LOOT_RECEIVED")) then
lootFrame:RegisterEvent("ENCOUNTER_LOOT_RECEIVED")
end
--register the loot players looted at the end of the mythic dungeon
lootFrame.LootCache = {}
@@ -170,7 +176,7 @@ lootFrame:SetScript("OnEvent", function(self, event, ...)
effectiveILvl = effectiveILvl,
itemQuality = itemQuality, --this is a number
itemID = itemID,
time = time()
time = GetTime()
}
table.insert(lootFrame.LootCache[unitName], lootCacheTable)
@@ -902,6 +908,8 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel()
readyFrame.RantingLabel = rantingLabel
end --end of creating of the readyFrame
--< end of mythic+ end of run frame creation >--
--mythic+ finished, showing the readyFrame for the user
local readyFrame = mythicDungeonFrames.ReadyFrame
readyFrame:Show()
+2 -2
View File
@@ -6387,7 +6387,7 @@ do
spellname_entry:SetPoint("left", spellname, "right", 2, 0)
local spellid_entry_func = function(arg1, arg2, spellid)
local spellname, _, icon = GetSpellInfo(spellid)
local spellname, _, icon = _GetSpellInfo(spellid)
if (spellname) then
spellname_entry:SetText(spellname)
addframe.spellIconButton.icon.texture = icon
@@ -7203,4 +7203,4 @@ do
tinsert(Details.optionsSection, buildSection)
end
--]=]
--]=]
+2 -2
View File
@@ -221,7 +221,7 @@ function Details.Survey.OpenSpellCategoryScreen()
local spellId = spellTable[1]
--get a line
local line = self:GetLine(i)
local spellName, _, spellIcon = GetSpellInfo(spellId)
local spellName, _, spellIcon = Details.GetSpellInfo(spellId)
line.Icon:SetTexture(spellIcon)
line.Icon:SetTexCoord(.1, .9, .1, .9)
line.SpellNameText.text = spellName
@@ -361,4 +361,4 @@ function Details.Survey.OpenSpellCategoryScreen()
DetailsSpellCategoryFrame.SpellScroll:RefreshScroll()
DetailsSpellCategoryFrame:Show()
end
end
+2 -2
View File
@@ -1958,7 +1958,7 @@ local empty_other_values = {}
function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, triggertype, auratype, other_values)
if (not spellname) then
spellname = select(1, GetSpellInfo(spellid))
spellname = select(1, _detalhes.GetSpellInfo(spellid))
end
Details:Destroy(empty_other_values)
@@ -2783,4 +2783,4 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
DetailsAuraPanel:Show()
DetailsPluginContainerWindow.OpenPlugin (DetailsAuraPanel)
end
end