This commit is contained in:
2025-05-15 20:36:53 +02:00
parent ac4de9a0ab
commit 9962841a01
3 changed files with 10 additions and 10 deletions

View File

@@ -48,7 +48,7 @@ local Unit = {
GetAuras = function(self, auraFunc, name, type) return nil end,
}
local BasicUnit = Unit:New "player"
local BasicUnit = Unit:New("player")
function BasicUnit:GetAuras(auraFunc, name)
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc(self.unit, name)
if aura ~= nil then
@@ -65,7 +65,7 @@ function BasicUnit:GetAuras(auraFunc, name)
end
end
-- Maybe implement some sort of throttle to group unit?
local GroupUnit = Unit:New "group"
local GroupUnit = Unit:New("group")
function GroupUnit:GetAuras(auraFunc, name)
local raidMem = GetNumRaidMembers()
local num = GetNumPartyMembers()
@@ -90,7 +90,7 @@ function GroupUnit:GetAuras(auraFunc, name)
if unitPrefix == "party" then
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc("player", name)
if aura ~= nil then
auras[UnitName "player"] = {
auras[UnitName("player")] = {
["duration"] = duration,
["expirationTime"] = expirationTime,
["spellID"] = spellID,
@@ -102,7 +102,7 @@ function GroupUnit:GetAuras(auraFunc, name)
return auras
end
-- Nameplate does not work, find out why?
local NameplateUnit = Unit:New "nameplate"
local NameplateUnit = Unit:New("nameplate")
function NameplateUnit:GetAuras(auraFunc, name)
local unitPrefix = "nameplate"
auras = {}

View File

@@ -57,7 +57,7 @@ local Unit = {
GetAuras = function(self, auraFunc, name, type) return nil end,
}
local BasicUnit = Unit:New "player"
local BasicUnit = Unit:New("player")
function BasicUnit:GetAuras(auraFunc, name)
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc(self.unit, name)
if aura ~= nil then
@@ -74,7 +74,7 @@ function BasicUnit:GetAuras(auraFunc, name)
end
end
-- Maybe implement some sort of throttle to group unit?
local GroupUnit = Unit:New "group"
local GroupUnit = Unit:New("group")
function GroupUnit:GetAuras(auraFunc, name)
local num = GetNumGroupMembers()
local unitPrefix = "party"
@@ -100,7 +100,7 @@ function GroupUnit:GetAuras(auraFunc, name)
local auraIndex = GetAuraIndex(auraFunc, "player", name)
if auraIndex > 0 then
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc("player", auraIndex)
auras[UnitName "player"] = {
auras[UnitName("player")] = {
["duration"] = duration,
["expirationTime"] = expirationTime,
["spellID"] = spellID,
@@ -112,7 +112,7 @@ function GroupUnit:GetAuras(auraFunc, name)
return auras
end
-- Nameplate does not work, find out why?
local NameplateUnit = Unit:New "nameplate"
local NameplateUnit = Unit:New("nameplate")
function NameplateUnit:GetAuras(auraFunc, name)
local unitPrefix = "nameplate"
auras = {}

View File

@@ -2,7 +2,7 @@
aura_env.fn = {}
aura_env.damageHistory = {}
aura_env.historyCurrent = {}
aura_env.playerGUID = UnitGUID "player"
aura_env.playerGUID = UnitGUID("player")
aura_env.lastCleanup = 0
aura_env.historyWindow = 10
aura_env.cleanupInterval = 1
@@ -35,7 +35,7 @@ aura_env.iconz[aura_env.types.BLEED] = 1033474
--
-- 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)
local enabled = damageType == aura_env.types.SWING and aura_env.config.enableSwing