|
|
@ -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 |
|
|
|
|
|
|
|
|
|
|
|