More random function cleanups

This commit is contained in:
andrew6180
2024-05-21 02:12:33 -07:00
parent c89fc78cec
commit 0f88bb2639
7 changed files with 5 additions and 27 deletions
+1 -1
View File
@@ -173,7 +173,7 @@
---@field GetClassSpecIds fun(self:table, engClass:string):number[]
---@field GetClassSpecIDs fun(self:table, engClass:string):number[]
---@field IsValidSpecId fun(self:table, specId:number):boolean check if the passed specId is valid for the player class, also return false for tutorial specs
---@field GetDragonlightTalentString fun(self:table):string return the talent config string
---@field GetAscensionTalentString fun(self:table):string return the talent config string
---@field GetClassList fun(self:table):{ID:number, Name:string, FileString:string, Texture:string, TexCoord:number[]}[]
---@field DebugVisibility fun(self:table, object:uiobject) print the reason why the frame isn't shown in the screen
---@field Dispatch fun(self:table, callback:function, ...) : any dispatch a function call using xpcall, print to chat if the function passed is invalid
-2
View File
@@ -37,8 +37,6 @@ local IsPassiveSpell = IsPassiveSpell
SMALL_NUMBER = 0.000001
ALPHA_BLEND_AMOUNT = 0.8400251
local _, _, _, buildInfo = GetBuildInfo()
DF.dversion = dversion
DF.AuthorInfo = {
+1 -1
View File
@@ -9,7 +9,7 @@ local unpack = unpack
local CreateFrame = CreateFrame
local PixelUtil = PixelUtil
local GetTime = GetTime
local GetSpellInfo = GetSpellInfo or function(spellID) if not spellID then return nil end local si = C_Spell.GetSpellInfo(spellID) if si then return si.name, nil, si.iconID, si.castTime, si.minRange, si.maxRange, si.spellID, si.originalIconID end end
local GetSpellInfo = GetSpellInfo
detailsFramework.GrowDirectionBySide = {
[1] = 1,
+1 -2
View File
@@ -102,8 +102,7 @@ local CreateFrame = CreateFrame
local PixelUtil = PixelUtil
local GetTime = GetTime
local Clamp = detailsFramework.Math.Clamp
local GetSpellInfo = GetSpellInfo or function(spellID) if not spellID then return nil end local si = C_Spell.GetSpellInfo(spellID) if si then return si.name, nil, si.iconID, si.castTime, si.minRange, si.maxRange, si.spellID, si.originalIconID end end
local GetSpellInfo = GetSpellInfo
local spellIconCache = {}
local spellNameCache = {}
local emptyTable = {}
+1 -1
View File
@@ -26,7 +26,7 @@ local IsShiftKeyDown = _G["IsShiftKeyDown"]
local IsControlKeyDown = _G["IsControlKeyDown"]
local IsAltKeyDown = _G["IsAltKeyDown"]
local CreateFrame = _G["CreateFrame"]
local GetSpellInfo = _G["GetSpellInfo"] or function(spellID) if not spellID then return nil end local si = C_Spell.GetSpellInfo(spellID) if si then return si.name, nil, si.iconID, si.castTime, si.minRange, si.maxRange, si.spellID, si.originalIconID end end
local GetSpellInfo = _G["GetSpellInfo"]
local unpack = unpack ---@diagnostic disable-line
---@alias actionidentifier string a string in the format of "spell-spellId" or "macro-macroName" or "system-target", etc, used to pass information about the action more easily
+1 -1
View File
@@ -6,7 +6,7 @@ if (not detailsFramework or not DetailsFrameworkCanLoad) then
end
local CreateFrame = CreateFrame
local GetSpellInfo = GetSpellInfo or function(spellID) if not spellID then return nil end local si = C_Spell.GetSpellInfo(spellID) if si then return si.name, nil, si.iconID, si.castTime, si.minRange, si.maxRange, si.spellID, si.originalIconID end end
local GetSpellInfo = GetSpellInfo
local GameTooltip = GameTooltip
local unpack = unpack
-19
View File
@@ -2566,25 +2566,6 @@ Details.performanceData = {
culpritDesc = "",
}
function Details:HandleRogueCombatSpecIconByGameVersion()
local _, _, _, patchVersion = GetBuildInfo()
if (patchVersion >= 70000) then --Legion
--rogue combat is a rogue outlaw
local rogueCombatCoords = Details.class_specs_coords[260]
rogueCombatCoords[1] = 0
rogueCombatCoords[2] = 64 / 512
rogueCombatCoords[3] = 384 / 512
rogueCombatCoords[4] = 448 / 512
--new versions of the game has a different icon for assassination
local rogueAssassinationCoords = Details.class_specs_coords[259]
rogueAssassinationCoords[1] = 64 / 512
rogueAssassinationCoords[2] = 128 / 512
rogueAssassinationCoords[3] = 384 / 512
rogueAssassinationCoords[4] = 448 / 512
end
end
function CopyText(text) --[[GLOBAL]]
if (not Details.CopyTextField) then
Details.CopyTextField = CreateFrame("Frame", "DetailsCopyText", UIParent, "BackdropTemplate")