Remove most C_ functions that cannot be downported

This commit is contained in:
andrew6180
2024-05-21 01:54:45 -07:00
parent 2f0e5b572f
commit 60c4c0c1c1
7 changed files with 90 additions and 343 deletions
+3 -8
View File
@@ -9,11 +9,8 @@ local detailsFramework = DF
local _
local tinsert = table.insert
local GetSpellInfo = GetSpellInfo or function(spellID) if not spellID then return nil end local si = C_Spell.GetSpellInfo(spellID) if si then return si.name, nil, si.iconID, si.castTime, si.minRange, si.maxRange, si.spellID, si.originalIconID end end
local GetSpellInfo = GetSpellInfo
local lower = string.lower
local SpellBookItemTypeMap = Enum.SpellBookItemType and {[Enum.SpellBookItemType.Spell] = "SPELL", [Enum.SpellBookItemType.None] = "NONE", [Enum.SpellBookItemType.Flyout] = "FLYOUT", [Enum.SpellBookItemType.FutureSpell] = "FUTURESPELL", [Enum.SpellBookItemType.PetAction] = "PETACTION" } or {}
local GetSpellBookItemInfo = GetSpellBookItemInfo
local SPELLBOOK_BANK_PLAYER = Enum.SpellBookSpellBank and Enum.SpellBookSpellBank.Player or "player"
local GetNumSpellTabs = GetNumSpellTabs
local GetSpellTabInfo = GetSpellTabInfo
local unpack = unpack
@@ -21,19 +18,17 @@ local CreateFrame = CreateFrame
local GameTooltip = GameTooltip
local tremove = tremove
local CONST_MAX_SPELLS = 500000
function DF:GetAuraByName(unit, spellName, isDebuff)
isDebuff = isDebuff and "HARMFUL|PLAYER"
for i = 1, 40 do
local name, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId, canApplyAura, isBossDebuff, isCastByPlayer, nameplateShowAll = UnitAura(unit, i, isDebuff)
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, canStealOrPurge, shouldConsolidate, spellID = UnitAura(unit, i, isDebuff)
if (not name) then
return
end
if (name == spellName) then
return name, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId, canApplyAura, isBossDebuff, isCastByPlayer, nameplateShowAll
return name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, canStealOrPurge, shouldConsolidate, spellID
end
end
end