Update on LibOpenRaid to version 24

This commit is contained in:
Tercio Jose
2022-04-01 11:38:04 -03:00
parent aef114249f
commit 0d8b09ffb7
7 changed files with 207 additions and 70 deletions
+43 -1
View File
@@ -1,6 +1,6 @@
local dversion = 294
local dversion = 300
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
@@ -759,6 +759,48 @@ function DF.SortOrder3R (t1, t2)
return t1[3] < t2[3]
end
--return a list of spells from the player spellbook
function DF:GetSpellBookSpells()
local spellNamesInSpellBook = {}
for i = 1, GetNumSpellTabs() do
local tabName, tabTexture, offset, numSpells, isGuild, offspecId = GetSpellTabInfo(i)
if (offspecId == 0) then
offset = offset + 1
local tabEnd = offset + numSpells
for j = offset, tabEnd - 1 do
local spellType, spellId = GetSpellBookItemInfo(j, "player")
if (spellId) then
if (spellType ~= "FLYOUT") then
local spellName = GetSpellInfo(spellId)
if (spellName) then
spellNamesInSpellBook[spellName] = true
end
else
local _, _, numSlots, isKnown = GetFlyoutInfo(spellId)
if (isKnown and numSlots > 0) then
for k = 1, numSlots do
local spellID, overrideSpellID, isKnown = GetFlyoutSlotInfo(spellId, k)
if (isKnown) then
local spellName = GetSpellInfo(spellID)
spellNamesInSpellBook[spellName] = true
end
end
end
end
end
end
end
end
return spellNamesInSpellBook
end
------------------------------
--flash animation
local onFinish = function (self)
if (self.showWhenDone) then
self.frame:SetAlpha (1)