mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-10 07:30:01 +00:00
Changed Spellinfo into GetSpellRec for nampower only support
Changed Spellinfo into GetSpellRec for nampower only support
This commit is contained in:
+15
-7
@@ -67,9 +67,12 @@ pfUI:RegisterModule("nampower", "vanilla", function ()
|
||||
local spellId = arg2
|
||||
|
||||
if eventCode == NORMAL_QUEUED or eventCode == NON_GCD_QUEUED or eventCode == ON_SWING_QUEUED then
|
||||
-- Get spell texture from SpellInfo (SuperWoW) or GetSpellTexture
|
||||
-- Get spell texture from GetSpellRec (Nampower) or SpellInfo (SuperWoW fallback)
|
||||
local texture
|
||||
if SpellInfo then
|
||||
if GetSpellRec then
|
||||
local rec = GetSpellRec(spellId)
|
||||
texture = rec and rec.spellIconID and GetSpellIconTexture(rec.spellIconID) or nil
|
||||
elseif SpellInfo then
|
||||
local _, _, tex = SpellInfo(spellId)
|
||||
texture = tex
|
||||
end
|
||||
@@ -101,7 +104,15 @@ pfUI:RegisterModule("nampower", "vanilla", function ()
|
||||
local spellId = auras[i]
|
||||
if spellId and spellId > 0 then
|
||||
local name, rank, texture
|
||||
if SpellInfo then
|
||||
if GetSpellRec then
|
||||
local rec = GetSpellRec(spellId)
|
||||
if rec then
|
||||
name = rec.name
|
||||
rank = rec.rank
|
||||
local iconID = rec.spellIconID
|
||||
texture = iconID and GetSpellIconTexture(iconID) or nil
|
||||
end
|
||||
elseif SpellInfo then
|
||||
name, rank, texture = SpellInfo(spellId)
|
||||
end
|
||||
if not name then
|
||||
@@ -479,9 +490,6 @@ pfUI:RegisterModule("nampower", "vanilla", function ()
|
||||
end
|
||||
end
|
||||
|
||||
-- NOTE: HoT Detection (AURA_CAST events) removed - OnHotApplied callback was never implemented in libpredict
|
||||
-- NOTE: Swing Timer removed - GetSwingTimers() was never called anywhere
|
||||
|
||||
-- Druid Secondary Mana Bar
|
||||
-- Shows base mana when druid is in shapeshift form (Bear/Cat uses Rage/Energy)
|
||||
-- Uses Nampower's GetUnitField to get base mana values
|
||||
@@ -783,4 +791,4 @@ pfUI:RegisterModule("nampower", "vanilla", function ()
|
||||
-- Initial update
|
||||
UpdateTargetSecondaryMana()
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user