Merge pull request 'Fix?' (#2) from Bastion/Bastion:main into main

Reviewed-on: #2
main
CiscOH 6 months ago
commit e63a7e1900
  1. 29
      src/Aura/Aura.lua

@ -77,6 +77,35 @@ function Aura:New(unit, index, type)
if C_UnitAuras.GetAuraDataByIndex then if C_UnitAuras.GetAuraDataByIndex then
local unitAuraInfo = C_UnitAuras.GetAuraDataByIndex(unit:GetOMToken(), index, type) local unitAuraInfo = C_UnitAuras.GetAuraDataByIndex(unit:GetOMToken(), index, type)
if not unitAuraInfo then
local self = setmetatable({}, Aura)
self.aura = {
name = nil,
icon = nil,
count = 0,
dispelType = nil,
duration = 0,
expirationTime = 0,
source = nil,
isStealable = false,
nameplateShowPersonal = false,
spellId = 0,
canApplyAura = false,
isBossDebuff = false,
castByPlayer = false,
nameplateShowAll = false,
timeMod = 0,
index = nil,
type = nil
}
if self.aura.spellId then
Bastion.Globals.SpellBook:GetSpell(self.aura.spellId)
end
return self
end
return Aura:CreateFromUnitAuraInfo(unitAuraInfo) return Aura:CreateFromUnitAuraInfo(unitAuraInfo)
end end

Loading…
Cancel
Save