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
+1 -1
View File
@@ -1,6 +1,6 @@
local dversion = 538
local dversion = 539
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary(major, minor)
+6 -1
View File
@@ -6,7 +6,12 @@ if (not detailsFramework or not DetailsFrameworkCanLoad) then
end
local unpack = unpack
local CreateFrame = CreateFrame
local G_CreateFrame = _G.CreateFrame
local CreateFrame = function (frameType , name, parent, template, id)
local frame = G_CreateFrame(frameType , name, parent, template, id)
detailsFramework:Mixin(frame, detailsFramework.FrameFunctions)
return frame
end
local PixelUtil = PixelUtil
local GetTime = GetTime
local GetSpellInfo = GetSpellInfo
+14
View File
@@ -825,4 +825,18 @@ detailsFramework.StatusBarFunctions = {
GetBorderColor = function(self)
return
end,
}
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--frame mixin
local createTexture = CreateFrame('Frame').CreateTexture -- need a local "original" CreateFrame
detailsFramework.FrameFunctions = {
CreateTexture = function(self, name, drawLayer, templateName, subLevel)
local texture = createTexture(self, name, drawLayer, templateName, subLevel)
-- pixel perfection
texture:SetTexelSnappingBias(0)
texture:SetSnapToPixelGrid(false)
return texture
end,
}
+1
View File
@@ -4722,6 +4722,7 @@ function detailsFramework:CreateBorderFrame(parent, name)
local parentName = name or ("DetailsFrameworkBorderFrame" .. tostring(math.random(1, 100000000)))
local f = CreateFrame("frame", parentName, parent, "BackdropTemplate")
detailsFramework:Mixin(f, detailsFramework.FrameFunctions)
f:SetFrameLevel(f:GetFrameLevel()+1)
f:SetAllPoints()
+7 -1
View File
@@ -14,7 +14,13 @@ local unpack = table.unpack or unpack --lua local
local type = type --lua local
local floor = math.floor --lua local
local loadstring = loadstring --lua local
local CreateFrame = CreateFrame
local G_CreateFrame = _G.CreateFrame
local CreateFrame = function (frameType , name, parent, template, id)
local frame = G_CreateFrame(frameType , name, parent, template, id)
detailsFramework:Mixin(frame, detailsFramework.FrameFunctions)
frame:SetClipsChildren(false)
return frame
end
local UnitHealth = UnitHealth
local UnitHealthMax = UnitHealthMax
+4
View File
@@ -10,6 +10,10 @@ end
local openRaidLib = LibStub:GetLibrary("LibOpenRaid-1.0")
-- TWW compat
-- TODO: Remove when TWW is released
local GetItemInfo = GetItemInfo or C_Item.GetItemInfo
local CONST_FRACTION_OF_A_SECOND = 0.01
local CONST_COOLDOWN_TYPE_OFFENSIVE = 1
File diff suppressed because it is too large Load Diff
+82 -5
View File
@@ -1,8 +1,8 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--global name declaration
--local _StartDebugTime = debugprofilestop() print(debugprofilestop() - _StartDebugTime)
--test if the packager will deploy to wago
--https://github.com/LuaLS/lua-language-server/wiki/Annotations#documenting-types
--updated the lib open raid for v11
local _ = nil
_G.Details = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
@@ -18,8 +18,8 @@
local addonName, Details222 = ...
local version = GetBuildInfo()
Details.build_counter = 12755
Details.alpha_build_counter = 12755 --if this is higher than the regular counter, use it instead
Details.build_counter = 12801
Details.alpha_build_counter = 12801 --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
@@ -161,6 +161,41 @@
--aura scanner
Details222.AuraScan = {}
local GetSpellInfo = GetSpellInfo or C_Spell.GetSpellInfo
Details222.GetSpellInfo = GetSpellInfo
local UnitBuff = UnitBuff or C_UnitAuras.GetBuffDataByIndex
Details222.UnitBuff = UnitBuff
local UnitDebuff = UnitDebuff or C_UnitAuras.GetDebuffDataByIndex
Details222.UnitDebuff = UnitDebuff
if (DetailsFramework.IsWarWow()) then
Details222.GetSpellInfo = function(...)
local result = GetSpellInfo(...)
if result then
return result.name, 1, result.iconID
end
end
Details222.UnitBuff = function(unitToken, index, filter)
local auraData = C_UnitAuras.GetBuffDataByIndex(unitToken, index, filter)
if (not auraData) then
return nil
end
return AuraUtil.UnpackAuraData(auraData)
end
Details222.UnitDebuff = function(unitToken, index, filter)
local auraData = C_UnitAuras.GetDebuffDataByIndex(unitToken, index, filter)
if (not auraData) then
return nil
end
return AuraUtil.UnpackAuraData(auraData)
end
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--initialization stuff
local _
@@ -172,6 +207,15 @@ do
local Loc = _G.LibStub("AceLocale-3.0"):GetLocale("Details")
local news = {
{"v10.2.7.12800.156", "June 06th, 2024"},
"Added transliteration for pet names in Cyrillic.",
"Fixed an error with extra power bars (alternate power) on cataclysm classic.",
"Fixed a rare error shown as 'combat already deleted' when trying to reset data.",
"Fixed an issue which was preventing to open the death recap window.",
"Fixed cataclysm classic attempting to calculate Evoker buffs.",
"Fixed battleground problems with cataclysm classic. (Flamanis)",
"Fixed an issue with player nicknames not showing properly when the player isn't inside a guild. (Flamanis)",
{"v10.2.7.12755.156", "May 19th, 2024"},
"Pet names on tooltips are now transliterate from Cyrillic.",
"Default segments amount are now 25 and save 15, users with different amount set won't have their settings changed.",
@@ -1240,7 +1284,7 @@ do
--check if this is a spellId
local spellId = tonumber(value)
if (spellId) then
local spellInfo = {GetSpellInfo(spellId)}
local spellInfo = {Details222.GetSpellInfo(spellId)}
if (type(spellInfo[1]) == "string") then
return Details:Dump(spellInfo)
end
@@ -1794,4 +1838,37 @@ function Details:DestroyActor(actorObject, actorContainer, combatObject, callSta
--leave a trace that the actor has been deleted
actorObject.__destroyed = true
actorObject.__destroyedBy = debugstack(callStackDepth or 2, 1, 0)
end
end
local restrictedAddons = {
'!!WWAddOnsFix',
}
local restrictedAddonFrame = CreateFrame('frame')
restrictedAddonFrame:RegisterEvent('PLAYER_ENTERING_WORLD')
local function disableRestrictedAddons()
for _, addonName in pairs(restrictedAddons) do
if C_AddOns.GetAddOnEnableState(addonName) ~= 0 then
StaticPopupDialogs["DETAILS_RESTRICTED_ADDON"] = {
text = "You are running " .. addonName .. " which is incompatible with Details! Damage Meter. It must be disabled for Details to function properly.",
button1 = "Disable " .. addonName,
button2 = "Disable Details!",
OnAccept = function()
C_AddOns.DisableAddOn(addonName)
ReloadUI()
end,
OnCancel = function()
C_AddOns.DisableAddOn('Details')
ReloadUI()
end,
timeout = 0,
whileDead = true,
}
StaticPopup_Show("DETAILS_RESTRICTED_ADDON")
break
end
end
end
restrictedAddonFrame:SetScript('OnEvent', function() C_Timer.After(2, disableRestrictedAddons) end )
+1
View File
@@ -16,6 +16,7 @@
local IsInRaid = IsInRaid
local IsInGroup = IsInGroup
local stringReplace = Details.string.replace
local GetSpellLink = GetSpellLink or C_Spell.GetSpellLink --api local
local Loc = LibStub("AceLocale-3.0"):GetLocale("Details")
+2 -1
View File
@@ -35,8 +35,9 @@
local GameTooltip = GameTooltip --api local
local IsInRaid = IsInRaid --api local
local IsInGroup = IsInGroup --api local
local GetSpellLink = GetSpellLink or C_Spell.GetSpellLink --api local
local GetSpellInfo = GetSpellInfo --api local
local GetSpellInfo = Details222.GetSpellInfo --api local
local _GetSpellInfo = Details.getspellinfo --details api
local stringReplace = Details.string.replace --details api
+1 -1
View File
@@ -20,7 +20,7 @@ local tinsert = table.insert
local _math_min = math.min
local _math_ceil = math.ceil
--api locals
local GetSpellInfo = GetSpellInfo
local GetSpellInfo = Details222.GetSpellInfo
local _GetSpellInfo = _detalhes.getspellinfo
local IsInRaid = IsInRaid
local IsInGroup = IsInGroup
+3 -1
View File
@@ -1025,7 +1025,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
for i = 1, #allGeneratorSpells do
local thisGenerator = allGeneratorSpells [i]
local spellName, _, spellIcon = GetSpellInfo(thisGenerator[1].id)
local spellName, _, spellIcon = _GetSpellInfo(thisGenerator[1].id)
GameCooltip:AddLine(spellName, FormatTooltipNumber (_, thisGenerator[2]) .. " (|cFFFF5555overflow: " .. FormatTooltipNumber (_, thisGenerator[3]) .. "|r | " .. _cstr ("%.1f", (thisGenerator[2] / allGenerated) * 100).."%)")
GameCooltip:AddIcon (spellIcon, nil, nil, icon_size.W, icon_size.H, .1, .9, .1, .9)
_detalhes:AddTooltipBackgroundStatusbar()
@@ -1227,6 +1227,8 @@ end
function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
if true then return end
reset_tooltips_table()
local barras = breakdownWindowFrame.barras3
+2
View File
@@ -3,6 +3,8 @@ local addonName, Details222 = ...
local Details = Details
local detailsFramework = DetailsFramework
local GetSpellInfo = Details222.GetSpellInfo
--this are the fields from spellTable that can be summed
local spellTable_FieldsToSum = {
["counter"] = true,
+9 -8
View File
@@ -19,6 +19,7 @@ local _UnitAura = UnitAura
local UnitGUID = UnitGUID
local _UnitName = UnitName
local format = _G.format
local GetSpellLink = GetSpellLink or C_Spell.GetSpellLink --api local
local UnitIsUnit = UnitIsUnit
@@ -1420,7 +1421,7 @@ function _detalhes:CatchRaidDebuffUptime(sOperationType) -- "DEBUFF_UPTIME_IN"
checked [his_target] = true
for debuffIndex = 1, 41 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff (target, debuffIndex)
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = C_UnitAuras.GetAuraDataByIndex (target, debuffIndex, 'HARMFUL')
if (name and unitCaster) then
local playerGUID = UnitGUID(unitCaster)
if (playerGUID) then
@@ -1450,7 +1451,7 @@ function _detalhes:CatchRaidDebuffUptime(sOperationType) -- "DEBUFF_UPTIME_IN"
checked [his_target] = true
for debuffIndex = 1, 40 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("party"..raidIndex.."target", debuffIndex)
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = C_UnitAuras.GetAuraDataByIndex ("party"..raidIndex.."target", debuffIndex, 'HARMFUL')
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = UnitGUID(unitCaster)
@@ -1470,7 +1471,7 @@ function _detalhes:CatchRaidDebuffUptime(sOperationType) -- "DEBUFF_UPTIME_IN"
local rect = UnitReaction ("playertarget", "player")
if (his_target and not checked [his_target] and rect and rect <= 4) then
for debuffIndex = 1, 40 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = C_UnitAuras.GetAuraDataByIndex ("playertarget", debuffIndex, 'HARMFUL')
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = UnitGUID(unitCaster)
@@ -1490,7 +1491,7 @@ function _detalhes:CatchRaidDebuffUptime(sOperationType) -- "DEBUFF_UPTIME_IN"
local reaction = UnitReaction ("playertarget", "player")
if (reaction and reaction <= 4) then
for debuffIndex = 1, 40 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = C_UnitAuras.GetAuraDataByIndex ("playertarget", debuffIndex, 'HARMFUL')
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = UnitGUID(unitCaster)
@@ -1534,7 +1535,7 @@ function _detalhes:CatchRaidBuffUptime(sOperationType)
end
for buffIndex = 1, 41 do
local name, _, _, _, _, _, unitCaster, _, _, spellId = _UnitAura(unitId, buffIndex, nil, "HELPFUL")
local name, _, _, _, _, _, unitCaster, _, _, spellId = C_UnitAuras.GetAuraDataByIndex(unitId, buffIndex, "HELPFUL")
if (name and unitCaster and UnitExists(unitCaster) and UnitExists(unitId) and UnitIsUnit(unitCaster, unitId)) then
_detalhes.parser:add_buff_uptime(nil, cacheGetTime, playerGUID, playerName, 0x00000514, playerGUID, playerName, 0x00000514, 0x0, spellId, name, sOperationType)
@@ -1578,7 +1579,7 @@ function _detalhes:CatchRaidBuffUptime(sOperationType)
local unitId = "party" .. groupIndex
for buffIndex = 1, 41 do
if (UnitExists(unitId)) then
local auraName, _, _, _, _, _, unitCaster, _, _, spellId = UnitBuff(unitId, buffIndex)
local auraName, _, _, _, _, _, unitCaster, _, _, spellId = C_UnitAuras.GetAuraDataByIndex(unitId, buffIndex, 'HELPFUL')
if (auraName) then
if (UnitExists(unitCaster)) then
local bBuffIsPlacedOnTarget = Details.CreditBuffToTarget[spellId]
@@ -1621,7 +1622,7 @@ function _detalhes:CatchRaidBuffUptime(sOperationType)
--player it self (while in a party that isn't a raid group)
local unitId = "player"
for buffIndex = 1, 41 do
local auraName, _, _, _, _, _, unitCaster, _, _, spellId = UnitBuff(unitId, buffIndex)
local auraName, _, _, _, _, _, unitCaster, _, _, spellId = C_UnitAuras.GetAuraDataByIndex(unitId, buffIndex, 'HELPFUL')
if (auraName) then
if (UnitExists(unitCaster)) then -- and unitCaster and UnitExists(unitCaster) and UnitIsUnit(unitCaster, unitId)
local bBuffIsPlacedOnTarget = Details.CreditBuffToTarget[spellId]
@@ -1680,7 +1681,7 @@ function _detalhes:CatchRaidBuffUptime(sOperationType)
local focus_augmentation = {}
for buffIndex = 1, 41 do
local auraName, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
local auraName, _, _, _, _, _, unitCaster, _, _, spellid = C_UnitAuras.GetAuraDataByIndex ("player", buffIndex, "HELPFUL")
if (auraName and unitCaster and UnitExists(unitCaster) and UnitIsUnit(unitCaster, "player")) then
local playerName = Details.playername
local playerGUID = UnitGUID("player")
+1 -1
View File
@@ -67,7 +67,7 @@
local debugPetname = false
local SPELLID_SANGUINE_HEAL = 226510
local sanguineActorName = GetSpellInfo(SPELLID_SANGUINE_HEAL)
local sanguineActorName = Details222.GetSpellInfo(SPELLID_SANGUINE_HEAL)
---attempt to get the owner of rogue's Akaari's Soul from Secrect Technique
+1
View File
@@ -7,6 +7,7 @@ local UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned
local select = select
local floor = floor
local GetNumGroupMembers = GetNumGroupMembers
local GetSpellInfo = Details222.GetSpellInfo
local CONST_INSPECT_ACHIEVEMENT_DISTANCE = 1 --Compare Achievements, 28 yards
local CONST_SPELLBOOK_GENERAL_TABID = 1
+1
View File
@@ -1,6 +1,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local Details = _G.Details
local addonName, Details222 = ...
local Loc = LibStub("AceLocale-3.0"):GetLocale("Details")
local detailsFramework = DetailsFramework
+1
View File
@@ -11,6 +11,7 @@
local _math_floor = math.floor --lua local
local _cstr = string.format --lua local
local _UnitClass = UnitClass
local GetSpellLink = GetSpellLink or C_Spell.GetSpellLink --api local
local gump = _detalhes.gump --details local
+1 -1
View File
@@ -1253,7 +1253,7 @@ end
local currentCombat = Details:GetCurrentCombat()
if (Details.encounter_table.start and not Details.encounter_table["end"] and currentCombat.is_boss) then
local encounterHealth = UnitHealth("boss1") or 0
local encounterHealth = UnitHealth("boss1") or 0.000001
local encounterMaxHealth = UnitHealthMax("boss1") or 1
currentCombat.boss_hp = encounterHealth / encounterMaxHealth
end
@@ -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
+2
View File
@@ -9,6 +9,8 @@ This is a high level API for Details! Damage Meter
local addonName, Details222 = ...
local GetSpellInfo = Details222.GetSpellInfo
--local helpers
local getCombatObject = function(segmentNumber)
---@type combat
+1
View File
@@ -9,6 +9,7 @@
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
local _
local addonName, Details222 = ...
local GetSpellInfo = Details222.GetSpellInfo
--initialize buffs name container
_detalhes.Buffs.BuffsTable = {} -- armazenara o [nome do buff] = { tabela do buff }
_detalhes.Buffs.__index = _detalhes.Buffs
+1
View File
@@ -3,6 +3,7 @@ local Details = _G.Details
local DF = _G.DetailsFramework
local C_Timer = _G.C_Timer
local addonName, Details222 = ...
local GetSpellInfo = Details222.GetSpellInfo
--get the sectionInfo and try to extract the spellID from it
--sectionInfo is always a valid table
+2 -2
View File
@@ -6,7 +6,7 @@ do
local pairs = pairs
local ipairs = ipairs
local unpack = table.unpack or _G.unpack
local GetSpellInfo = GetSpellInfo
local GetSpellInfo = Details222.GetSpellInfo
local UnitClass = UnitClass
local UnitGUID = UnitGUID
@@ -589,4 +589,4 @@ do
end
end
end
end
end
+52
View File
@@ -11,6 +11,7 @@ local UIParent = UIParent
local UnitGUID = UnitGUID
local tonumber= tonumber
local LoggingCombat = LoggingCombat
local GetSpellInfo = Details222.GetSpellInfo
SLASH_PLAYEDCLASS1 = "/playedclass"
function SlashCmdList.PLAYEDCLASS(msg, editbox)
@@ -779,6 +780,57 @@ function SlashCmdList.DETAILS (msg, editbox)
end
end
elseif (command == "spellid") then
if (Details222.FocusedSpellId) then
local npcId = Details222.FocusedSpellId
if (not Details.id_frame) then
local backdrop = {
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
edgeFile = "Interface\\ChatFrame\\ChatFrameBackground",
tile = true, edgeSize = 1, tileSize = 5,
}
Details.id_frame = CreateFrame("Frame", "DetailsID", UIParent, "BackdropTemplate")
Details.id_frame:SetHeight(14)
Details.id_frame:SetWidth(120)
Details.id_frame:SetPoint("center", UIParent, "center")
Details.id_frame:SetBackdrop(backdrop)
table.insert(UISpecialFrames, "DetailsID")
Details.id_frame.texto = CreateFrame("editbox", nil, Details.id_frame, "BackdropTemplate")
Details.id_frame.texto:SetPoint("topleft", Details.id_frame, "topleft")
Details.id_frame.texto:SetAutoFocus(false)
Details.id_frame.texto:SetFontObject(GameFontHighlightSmall)
Details.id_frame.texto:SetHeight(14)
Details.id_frame.texto:SetWidth(120)
Details.id_frame.texto:SetJustifyH("CENTER")
Details.id_frame.texto:EnableMouse(true)
Details.id_frame.texto:SetBackdropColor(0, 0, 0, 0.5)
Details.id_frame.texto:SetBackdropBorderColor(0.3, 0.3, 0.30, 0.80)
Details.id_frame.texto:SetText("")
Details.id_frame.texto.perdeu_foco = nil
Details.id_frame.texto:SetScript("OnEnterPressed", function()
Details.id_frame.texto:ClearFocus()
Details.id_frame:Hide()
end)
Details.id_frame.texto:SetScript("OnEscapePressed", function()
Details.id_frame.texto:ClearFocus()
Details.id_frame:Hide()
end)
end
C_Timer.After(0.1, function()
Details.id_frame:Show()
Details.id_frame.texto:SetFocus()
Details.id_frame.texto:SetText("" .. npcId)
Details.id_frame.texto:HighlightText()
end)
end
elseif (command == "profile") then
local profile = rest:match("^(%S*)%s*(.-)$")
-1
View File
@@ -7,7 +7,6 @@ do
local rawget = rawget
local rawset = rawset
local setmetatable = setmetatable
local GetSpellInfo = GetSpellInfo
local unpack = unpack
local tinsert = table.insert
local tremove = tremove
+2
View File
@@ -3,6 +3,8 @@ do
local _detalhes = _G.Details
local addonName, Details222 = ...
local GetSpellInfo = Details222.GetSpellInfo
--import potion list from the framework
_detalhes.PotionList = {}
for spellID, _ in pairs(DetailsFramework.PotionIDs) do
@@ -458,7 +458,7 @@ do
--amount of casts
local combatObject = Details:GetCombatFromBreakdownWindow()
local castAmount = combatObject:GetSpellCastAmount(playerName, GetSpellInfo(spellId))
local castAmount = combatObject:GetSpellCastAmount(playerName, Details.GetSpellInfo(spellId))
local playerMiscObject = combatObject:GetActor(DETAILS_ATTRIBUTE_MISC, playerName)
if (castAmount > 0) then
@@ -579,7 +579,7 @@ do
local combatObject = Details:GetCombatFromBreakdownWindow()
local playerMiscObject = combatObject:GetActor(DETAILS_ATTRIBUTE_MISC, playerName)
local castAmount = combatObject:GetSpellCastAmount(playerName, GetSpellInfo(spellId))
local castAmount = combatObject:GetSpellCastAmount(playerName, Details.GetSpellInfo(spellId))
if (castAmount > 0) then
tooltip.casts_label2:SetText(getPercentComparison(mainCastAmount, castAmount))
tooltip.casts_label3:SetText(castAmount)
@@ -2052,4 +2052,4 @@ do
end
end
end
end
end
@@ -11,6 +11,7 @@ local detailsFramework = DetailsFramework
local CreateFrame = CreateFrame
local GameCooltip = GameCooltip
local _
local GetSpellLink = GetSpellLink or C_Spell.GetSpellLink --api local
local encounterDetails = _G.EncounterDetailsGlobal
local edFrame = encounterDetails.Frame
@@ -14,7 +14,7 @@ local DETAILS_ATTRIBUTE_DAMAGE = DETAILS_ATTRIBUTE_DAMAGE
local CONST_DETAILS_MODE_GROUP = DETAILS_MODE_GROUP
local DETAILS_SEGMENTTYPE_MYTHICDUNGEON = DETAILS_SEGMENTTYPE_MYTHICDUNGEON
local DETAILS_ATTRIBUTE_MISC = DETAILS_ATTRIBUTE_MISC
local GetSpellInfo = GetSpellInfo
local GetSpellInfo = Details.GetSpellInfo
local GameTooltip = GameTooltip
local encounterDetails = _G.EncounterDetailsGlobal
@@ -1264,4 +1264,4 @@ function encounterDetails.RefreshSummaryPage(combatObject)
encounterDetails.RefreshInterruptsScoll(combatObject)
encounterDetails.RefreshDispelsScoll(combatObject)
encounterDetails.RefreshDeathsScoll(combatObject)
end
end
@@ -1,4 +1,13 @@
local GetSpellInfo = GetSpellInfo
--do not load if this is a classic version of the game
if (DetailsFramework.IsTBCWow() or DetailsFramework.IsWotLKWow() or DetailsFramework.IsClassicWow() or DetailsFramework.IsCataWow()) then
return
end
local Details = _G.Details
local GetSpellInfo = Details.GetSpellInfo
local UnitAura = UnitAura
local UnitBuff = UnitBuff
local UnitClass = UnitClass
local UnitName = UnitName
@@ -867,4 +876,4 @@ function DetailsRaidCheck:OnEvent(_, event, ...)
end
end
end
end
end
@@ -3,6 +3,8 @@ local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0")
local LDB = LibStub ("LibDataBroker-1.1", true)
local LDBIcon = LDB and LibStub ("LibDBIcon-1.0", true)
local LibWindow = LibStub ("LibWindow-1.1")
local Details = _G.Details
local GetSpellInfo = Details.GetSpellInfo
local _
---need cleanup Loc ["STRING_MEMORY_ALERT_BUTTON"],
@@ -10,6 +10,8 @@ local _IsInRaid = IsInRaid --> wow api
local _IsInGroup = IsInGroup --> wow api
local _UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned --> wow api
local GetUnitName = GetUnitName
local Details = _G.Details
local GetSpellInfo = Details.GetSpellInfo
local _ipairs = ipairs --> lua api
local _table_sort = table.sort --> lua api