Update
This commit is contained in:
@@ -48,7 +48,7 @@ local Unit = {
|
|||||||
|
|
||||||
GetAuras = function(self, auraFunc, name, type) return nil end,
|
GetAuras = function(self, auraFunc, name, type) return nil end,
|
||||||
}
|
}
|
||||||
local BasicUnit = Unit:New "player"
|
local BasicUnit = Unit:New("player")
|
||||||
function BasicUnit:GetAuras(auraFunc, name)
|
function BasicUnit:GetAuras(auraFunc, name)
|
||||||
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc(self.unit, name)
|
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc(self.unit, name)
|
||||||
if aura ~= nil then
|
if aura ~= nil then
|
||||||
@@ -65,7 +65,7 @@ function BasicUnit:GetAuras(auraFunc, name)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- Maybe implement some sort of throttle to group unit?
|
-- Maybe implement some sort of throttle to group unit?
|
||||||
local GroupUnit = Unit:New "group"
|
local GroupUnit = Unit:New("group")
|
||||||
function GroupUnit:GetAuras(auraFunc, name)
|
function GroupUnit:GetAuras(auraFunc, name)
|
||||||
local raidMem = GetNumRaidMembers()
|
local raidMem = GetNumRaidMembers()
|
||||||
local num = GetNumPartyMembers()
|
local num = GetNumPartyMembers()
|
||||||
@@ -90,7 +90,7 @@ function GroupUnit:GetAuras(auraFunc, name)
|
|||||||
if unitPrefix == "party" then
|
if unitPrefix == "party" then
|
||||||
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc("player", name)
|
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc("player", name)
|
||||||
if aura ~= nil then
|
if aura ~= nil then
|
||||||
auras[UnitName "player"] = {
|
auras[UnitName("player")] = {
|
||||||
["duration"] = duration,
|
["duration"] = duration,
|
||||||
["expirationTime"] = expirationTime,
|
["expirationTime"] = expirationTime,
|
||||||
["spellID"] = spellID,
|
["spellID"] = spellID,
|
||||||
@@ -102,7 +102,7 @@ function GroupUnit:GetAuras(auraFunc, name)
|
|||||||
return auras
|
return auras
|
||||||
end
|
end
|
||||||
-- Nameplate does not work, find out why?
|
-- Nameplate does not work, find out why?
|
||||||
local NameplateUnit = Unit:New "nameplate"
|
local NameplateUnit = Unit:New("nameplate")
|
||||||
function NameplateUnit:GetAuras(auraFunc, name)
|
function NameplateUnit:GetAuras(auraFunc, name)
|
||||||
local unitPrefix = "nameplate"
|
local unitPrefix = "nameplate"
|
||||||
auras = {}
|
auras = {}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ local Unit = {
|
|||||||
|
|
||||||
GetAuras = function(self, auraFunc, name, type) return nil end,
|
GetAuras = function(self, auraFunc, name, type) return nil end,
|
||||||
}
|
}
|
||||||
local BasicUnit = Unit:New "player"
|
local BasicUnit = Unit:New("player")
|
||||||
function BasicUnit:GetAuras(auraFunc, name)
|
function BasicUnit:GetAuras(auraFunc, name)
|
||||||
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc(self.unit, name)
|
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc(self.unit, name)
|
||||||
if aura ~= nil then
|
if aura ~= nil then
|
||||||
@@ -74,7 +74,7 @@ function BasicUnit:GetAuras(auraFunc, name)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- Maybe implement some sort of throttle to group unit?
|
-- Maybe implement some sort of throttle to group unit?
|
||||||
local GroupUnit = Unit:New "group"
|
local GroupUnit = Unit:New("group")
|
||||||
function GroupUnit:GetAuras(auraFunc, name)
|
function GroupUnit:GetAuras(auraFunc, name)
|
||||||
local num = GetNumGroupMembers()
|
local num = GetNumGroupMembers()
|
||||||
local unitPrefix = "party"
|
local unitPrefix = "party"
|
||||||
@@ -100,7 +100,7 @@ function GroupUnit:GetAuras(auraFunc, name)
|
|||||||
local auraIndex = GetAuraIndex(auraFunc, "player", name)
|
local auraIndex = GetAuraIndex(auraFunc, "player", name)
|
||||||
if auraIndex > 0 then
|
if auraIndex > 0 then
|
||||||
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc("player", auraIndex)
|
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc("player", auraIndex)
|
||||||
auras[UnitName "player"] = {
|
auras[UnitName("player")] = {
|
||||||
["duration"] = duration,
|
["duration"] = duration,
|
||||||
["expirationTime"] = expirationTime,
|
["expirationTime"] = expirationTime,
|
||||||
["spellID"] = spellID,
|
["spellID"] = spellID,
|
||||||
@@ -112,7 +112,7 @@ function GroupUnit:GetAuras(auraFunc, name)
|
|||||||
return auras
|
return auras
|
||||||
end
|
end
|
||||||
-- Nameplate does not work, find out why?
|
-- Nameplate does not work, find out why?
|
||||||
local NameplateUnit = Unit:New "nameplate"
|
local NameplateUnit = Unit:New("nameplate")
|
||||||
function NameplateUnit:GetAuras(auraFunc, name)
|
function NameplateUnit:GetAuras(auraFunc, name)
|
||||||
local unitPrefix = "nameplate"
|
local unitPrefix = "nameplate"
|
||||||
auras = {}
|
auras = {}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
aura_env.fn = {}
|
aura_env.fn = {}
|
||||||
aura_env.damageHistory = {}
|
aura_env.damageHistory = {}
|
||||||
aura_env.historyCurrent = {}
|
aura_env.historyCurrent = {}
|
||||||
aura_env.playerGUID = UnitGUID "player"
|
aura_env.playerGUID = UnitGUID("player")
|
||||||
aura_env.lastCleanup = 0
|
aura_env.lastCleanup = 0
|
||||||
aura_env.historyWindow = 10
|
aura_env.historyWindow = 10
|
||||||
aura_env.cleanupInterval = 1
|
aura_env.cleanupInterval = 1
|
||||||
@@ -35,7 +35,7 @@ aura_env.iconz[aura_env.types.BLEED] = 1033474
|
|||||||
--
|
--
|
||||||
-- Returns players current max health
|
-- Returns players current max health
|
||||||
--
|
--
|
||||||
aura_env.fn.getMaxHealth = function() return UnitHealthMax "player" end
|
aura_env.fn.getMaxHealth = function() return UnitHealthMax("player") end
|
||||||
|
|
||||||
aura_env.fn.isEnabled = function(damageType)
|
aura_env.fn.isEnabled = function(damageType)
|
||||||
local enabled = damageType == aura_env.types.SWING and aura_env.config.enableSwing
|
local enabled = damageType == aura_env.types.SWING and aura_env.config.enableSwing
|
||||||
|
|||||||
Reference in New Issue
Block a user