More GetSpellInfo fixes

This commit is contained in:
Lynn
2024-06-08 13:50:50 +02:00
parent abf6b76c53
commit 0ee3f1a511
18 changed files with 33 additions and 20 deletions
@@ -7,7 +7,7 @@ local unpack = unpack
local GetTime = GetTime
local CreateFrame = CreateFrame
local GetSpellLink = GetSpellLink
local GetSpellInfo = GetSpellInfo
local GetSpellInfo = Details222.GetSpellInfo
local _GetSpellInfo = Details.GetSpellInfo
local GameTooltip = GameTooltip
local IsShiftKeyDown = IsShiftKeyDown
@@ -7,7 +7,7 @@ local unpack = unpack
local GetTime = GetTime
local CreateFrame = CreateFrame
local GetSpellLink = GetSpellLink
local GetSpellInfo = GetSpellInfo
local GetSpellInfo = Details222.GetSpellInfo
local _GetSpellInfo = Details.GetSpellInfo
local GameTooltip = GameTooltip
local IsShiftKeyDown = IsShiftKeyDown
@@ -605,4 +605,4 @@ function spellsTab.CreateTargetBar(self, index) --~create ~target ~createtarget
targetBar:AlignWithHeader(self.Header, "left")
return targetBar
end
end
@@ -9,7 +9,7 @@ local unpack = unpack
local GetTime = GetTime
local CreateFrame = CreateFrame
local GetSpellLink = GetSpellLink
local GetSpellInfo = GetSpellInfo
local GetSpellInfo = Details222.GetSpellInfo
local _GetSpellInfo = Details.GetSpellInfo
local GameTooltip = GameTooltip
local IsShiftKeyDown = IsShiftKeyDown
+2 -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)
@@ -262,7 +263,7 @@ function Details:CreateEventTrackerFrame(parentObject, name)
local screenFrame = CreateFrame("frame", name, parentObject or UIParent,"BackdropTemplate")
screenFrame:SetPoint("center", UIParent, "center")
if (not DetailsFramework.IsDragonflight() and not DetailsFramework.IsNonRetailWowWithRetailAPI()) then
if (not DetailsFramework.IsDragonflightAndBeyond() and not DetailsFramework.IsNonRetailWowWithRetailAPI()) then
screenFrame:SetMinResize (150, 40)
screenFrame:SetMaxResize (800, 1024)
else
+2 -2
View File
@@ -6383,7 +6383,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
@@ -7226,4 +7226,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
@@ -632,4 +632,4 @@ do
end
end
end
end
end
+1
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)
+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)
@@ -2057,4 +2057,4 @@ do
end
end
end
end
end
@@ -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
@@ -4,9 +4,10 @@ if (DetailsFramework.IsTBCWow() or DetailsFramework.IsWotLKWow() or DetailsFrame
return
end
local Details = _G.Details
local GetSpellInfo = Details.GetSpellInfo
local UnitAura = UnitAura
local UnitBuff = UnitBuff
local GetSpellInfo = GetSpellInfo
local UnitClass = UnitClass
local UnitName = UnitName
local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS
@@ -1078,4 +1079,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