Open Raid update

This commit is contained in:
Tercio Jose
2023-05-12 12:49:23 -03:00
parent e9ebf2bdce
commit 3b395f7769
2 changed files with 20 additions and 5 deletions
+19 -4
View File
@@ -504,9 +504,9 @@ local getSpellListAsHashTableFromSpellBook = function()
local tabEnd = offset + numSpells
for entryOffset = offset, tabEnd - 1 do
local spellType, spellId = GetSpellBookItemInfo(entryOffset, "player")
local spellInfo = LIB_OPEN_RAID_COOLDOWNS_INFO[spellId]
if (spellInfo) then
local raceId = spellInfo.raceid
local spellData = LIB_OPEN_RAID_COOLDOWNS_INFO[spellId]
if (spellData) then
local raceId = spellData.raceid
if (raceId) then
if (type(raceId) == "table") then
if (raceId[playerRaceId]) then
@@ -612,7 +612,22 @@ local updateCooldownAvailableList = function()
--build a list of all spells assigned as cooldowns for the player class
for spellID, spellData in pairs(LIB_OPEN_RAID_COOLDOWNS_INFO) do
--type 10 is an item cooldown and does not have a class or race id
if (spellData.class == playerClass or (spellData.raceid and spellData.raceid[playerRaceId]) or CONST_ISITEM_BY_TYPEID[spellData.type]) then --need to implement here to get the racial as racial cooldowns does not carry a class
local passRaceId = false
local raceId = spellData.raceid
if (raceId) then
if (type(raceId) == "table") then
if (raceId[playerRaceId]) then
passRaceId = true
end
elseif (type(raceId) == "number") then
if (raceId == playerRaceId) then
passRaceId = true
end
end
end
if (spellData.class == playerClass or passRaceId or CONST_ISITEM_BY_TYPEID[spellData.type]) then --need to implement here to get the racial as racial cooldowns does not carry a class
--type 10 is an item cooldown and does not have a spellbook entry
if (spellBookSpellList[spellID] or CONST_ISITEM_BY_TYPEID[spellData.type]) then
LIB_OPEN_RAID_PLAYERCOOLDOWNS[spellID] = spellData
+1 -1
View File
@@ -37,7 +37,7 @@ if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE and not isExpansion_Dragonflight()) t
end
local major = "LibOpenRaid-1.0"
local CONST_LIB_VERSION = 101
local CONST_LIB_VERSION = 102
if (not LIB_OPEN_RAID_MAX_VERSION) then
LIB_OPEN_RAID_MAX_VERSION = CONST_LIB_VERSION