Merge pull request #751 from Flamanis/GetOverrideSpell
Fix GetOverrideSpell for TWW
This commit is contained in:
@@ -55,6 +55,7 @@ local IsPassiveSpell = IsPassiveSpell or C_SpellBook.isSpellPassive
|
|||||||
local GetNumSpellTabs = GetNumSpellTabs or C_SpellBook.GetNumSpellBookSkillLines
|
local GetNumSpellTabs = GetNumSpellTabs or C_SpellBook.GetNumSpellBookSkillLines
|
||||||
local spellBookPlayerEnum = Enum.SpellBookSpellBank and Enum.SpellBookSpellBank.Player or "player"
|
local spellBookPlayerEnum = Enum.SpellBookSpellBank and Enum.SpellBookSpellBank.Player or "player"
|
||||||
local HasPetSpells = HasPetSpells or C_SpellBook.HasPetSpells
|
local HasPetSpells = HasPetSpells or C_SpellBook.HasPetSpells
|
||||||
|
local GetOverrideSpell = C_SpellBook.GetOverrideSpell or C_Spell.GetOverrideSpell
|
||||||
|
|
||||||
local isTimewalkWoW = function()
|
local isTimewalkWoW = function()
|
||||||
local _, _, _, buildInfo = GetBuildInfo()
|
local _, _, _, buildInfo = GetBuildInfo()
|
||||||
@@ -543,7 +544,7 @@ local getSpellListAsHashTableFromSpellBook = function()
|
|||||||
if (raceId) then
|
if (raceId) then
|
||||||
if (type(raceId) == "table") then
|
if (type(raceId) == "table") then
|
||||||
if (raceId[playerRaceId]) then
|
if (raceId[playerRaceId]) then
|
||||||
spellId = C_SpellBook.GetOverrideSpell(spellId)
|
spellId = GetOverrideSpell(spellId)
|
||||||
local spellName = GetSpellInfo(spellId)
|
local spellName = GetSpellInfo(spellId)
|
||||||
local bIsPassive = IsPassiveSpell(spellId, "player")
|
local bIsPassive = IsPassiveSpell(spellId, "player")
|
||||||
if (spellName and not bIsPassive) then
|
if (spellName and not bIsPassive) then
|
||||||
@@ -553,7 +554,7 @@ local getSpellListAsHashTableFromSpellBook = function()
|
|||||||
|
|
||||||
elseif (type(raceId) == "number") then
|
elseif (type(raceId) == "number") then
|
||||||
if (raceId == playerRaceId) then
|
if (raceId == playerRaceId) then
|
||||||
spellId = C_SpellBook.GetOverrideSpell(spellId)
|
spellId = GetOverrideSpell(spellId)
|
||||||
local spellName = GetSpellInfo(spellId)
|
local spellName = GetSpellInfo(spellId)
|
||||||
local bIsPassive = IsPassiveSpell(spellId, "player")
|
local bIsPassive = IsPassiveSpell(spellId, "player")
|
||||||
if (spellName and not bIsPassive) then
|
if (spellName and not bIsPassive) then
|
||||||
@@ -575,7 +576,7 @@ local getSpellListAsHashTableFromSpellBook = function()
|
|||||||
local spellType, spellId = GetSpellBookItemInfo(entryOffset, spellBookPlayerEnum)
|
local spellType, spellId = GetSpellBookItemInfo(entryOffset, spellBookPlayerEnum)
|
||||||
if (spellId) then
|
if (spellId) then
|
||||||
if (spellType == "SPELL") then
|
if (spellType == "SPELL") then
|
||||||
spellId = C_SpellBook.GetOverrideSpell(spellId)
|
spellId = GetOverrideSpell(spellId)
|
||||||
local spellName = GetSpellInfo(spellId)
|
local spellName = GetSpellInfo(spellId)
|
||||||
local bIsPassive = IsPassiveSpell(spellId, "player")
|
local bIsPassive = IsPassiveSpell(spellId, "player")
|
||||||
if LIB_OPEN_RAID_MULTI_OVERRIDE_SPELLS[spellId] then
|
if LIB_OPEN_RAID_MULTI_OVERRIDE_SPELLS[spellId] then
|
||||||
@@ -599,7 +600,7 @@ local getSpellListAsHashTableFromSpellBook = function()
|
|||||||
local spellType, spellId = GetSpellBookItemInfo(entryOffset, spellBookPlayerEnum)
|
local spellType, spellId = GetSpellBookItemInfo(entryOffset, spellBookPlayerEnum)
|
||||||
if (spellId) then
|
if (spellId) then
|
||||||
if (spellType == "SPELL") then
|
if (spellType == "SPELL") then
|
||||||
spellId = C_SpellBook.GetOverrideSpell(spellId)
|
spellId = GetOverrideSpell(spellId)
|
||||||
local spellName = GetSpellInfo(spellId)
|
local spellName = GetSpellInfo(spellId)
|
||||||
local bIsPassive = IsPassiveSpell(spellId, "player")
|
local bIsPassive = IsPassiveSpell(spellId, "player")
|
||||||
|
|
||||||
@@ -634,7 +635,7 @@ local getSpellListAsHashTableFromSpellBook = function()
|
|||||||
for i = 1, numPetSpells do
|
for i = 1, numPetSpells do
|
||||||
local spellName, _, unmaskedSpellId = GetSpellBookItemName(i, "pet")
|
local spellName, _, unmaskedSpellId = GetSpellBookItemName(i, "pet")
|
||||||
if (unmaskedSpellId) then
|
if (unmaskedSpellId) then
|
||||||
unmaskedSpellId = C_SpellBook.GetOverrideSpell(unmaskedSpellId)
|
unmaskedSpellId = GetOverrideSpell(unmaskedSpellId)
|
||||||
local bIsPassive = IsPassiveSpell(unmaskedSpellId, "pet")
|
local bIsPassive = IsPassiveSpell(unmaskedSpellId, "pet")
|
||||||
if (spellName and not bIsPassive) then
|
if (spellName and not bIsPassive) then
|
||||||
completeListOfSpells[unmaskedSpellId] = true
|
completeListOfSpells[unmaskedSpellId] = true
|
||||||
|
|||||||
Reference in New Issue
Block a user