forked from wow/OmicronFrames
Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
949e3686aa | ||
|
|
76851011fe | ||
|
|
7f3269949f | ||
|
|
b9f1bad81d | ||
|
|
80859c1e44 | ||
|
|
575e829025 | ||
|
|
b473f7bf3d | ||
|
|
14aeb2c43e | ||
|
|
991bc5d0fe | ||
|
|
2a24e64554 |
No files matched your search
+128
@@ -29,6 +29,7 @@ local colors = {
|
|||||||
red = { 1, 0, 0 },
|
red = { 1, 0, 0 },
|
||||||
blue = { 0.4, 0.4, 1 },
|
blue = { 0.4, 0.4, 1 },
|
||||||
light_blue = { 0.7, 0.7, 1 },
|
light_blue = { 0.7, 0.7, 1 },
|
||||||
|
green = { 0.2, 0.9, 0.2 },
|
||||||
}
|
}
|
||||||
|
|
||||||
---@param list number[]
|
---@param list number[]
|
||||||
@@ -43,6 +44,9 @@ end
|
|||||||
|
|
||||||
local AURAS_PRIEST_RENEW = set({ 139, 6074, 6075, 6076, 6077, 6078, 10927, 10928, 10929, 25315, 25221, 25222 })
|
local AURAS_PRIEST_RENEW = set({ 139, 6074, 6075, 6076, 6077, 6078, 10927, 10928, 10929, 25315, 25221, 25222 })
|
||||||
local AURAS_PRIEST_PWS = set({ 17, 592, 600, 3747, 6065, 6066, 10898, 10899, 10900, 10901, 25217, 25218 })
|
local AURAS_PRIEST_PWS = set({ 17, 592, 600, 3747, 6065, 6066, 10898, 10899, 10900, 10901, 25217, 25218 })
|
||||||
|
local AURAS_DRUID_LIFEBLOOM = set({ 33763 })
|
||||||
|
local AURAS_DRUID_REJUV = set({ 774, 1058, 1430, 2090, 2091, 3627, 8910, 9839, 9840, 9841, 25299, 26981, 26982 })
|
||||||
|
local AURAS_DRUID_REGROWTH = set({ 8936, 8938, 8939, 8940, 8941, 9750, 9856, 9857, 9858, 26980 })
|
||||||
|
|
||||||
local function RangeConfig()
|
local function RangeConfig()
|
||||||
local _, class = UnitClass("player")
|
local _, class = UnitClass("player")
|
||||||
@@ -58,6 +62,12 @@ local function RangeConfig()
|
|||||||
enemy = "Smite",
|
enemy = "Smite",
|
||||||
fade = 0.2,
|
fade = 0.2,
|
||||||
}
|
}
|
||||||
|
elseif class == "DRUID" then
|
||||||
|
return {
|
||||||
|
friendly = "Rejuvenation",
|
||||||
|
enemy = "Wrath",
|
||||||
|
fade = 0.2,
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return {
|
return {
|
||||||
fade = 0.2,
|
fade = 0.2,
|
||||||
@@ -173,6 +183,66 @@ local function MouseConfig()
|
|||||||
data = "/cast [@UNIT,help]Leap of Faith;\n/stopspelltarget",
|
data = "/cast [@UNIT,help]Leap of Faith;\n/stopspelltarget",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
elseif class == "DRUID" then
|
||||||
|
return {
|
||||||
|
-- No modifier
|
||||||
|
{ button = "mouse1", mods = {}, kind = "target" },
|
||||||
|
{
|
||||||
|
button = "mouse2",
|
||||||
|
mods = {},
|
||||||
|
kind = "macro",
|
||||||
|
data = "/use [@UNIT,help]Rejuvenation",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
button = "wheel-up",
|
||||||
|
mods = {},
|
||||||
|
kind = "macro",
|
||||||
|
data = "/use [@UNIT,help]Lifebloom",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
button = "wheel-down",
|
||||||
|
mods = {},
|
||||||
|
kind = "macro",
|
||||||
|
data = "/use [@UNIT,help]Regrowth",
|
||||||
|
},
|
||||||
|
|
||||||
|
-- ctrl
|
||||||
|
{
|
||||||
|
button = "wheel-up",
|
||||||
|
mods = { ctrl = true },
|
||||||
|
kind = "macro",
|
||||||
|
data = "/use [@UNIT,help]Abolish Poison"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
button = "wheel-down",
|
||||||
|
mods = { ctrl = true },
|
||||||
|
kind = "macro",
|
||||||
|
data = "/use [@UNIT,help]Remove Curse"
|
||||||
|
},
|
||||||
|
|
||||||
|
-- alt
|
||||||
|
{
|
||||||
|
button = "mouse1",
|
||||||
|
mods = { alt = true },
|
||||||
|
kind = "macro",
|
||||||
|
data = "/use [@UNIT,help]Innervate",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
button = "mouse2",
|
||||||
|
mods = { alt = true },
|
||||||
|
kind = "macro",
|
||||||
|
data = "/use [@UNIT,dead,help]Rebirth",
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Shift
|
||||||
|
{
|
||||||
|
button = "wheel-down",
|
||||||
|
mods = { shift = true },
|
||||||
|
kind = "macro",
|
||||||
|
data = "/use [@UNIT,help]Swiftmend",
|
||||||
|
},
|
||||||
|
{ button = "mouse2", mods = { shift = true }, kind = "togglemenu" },
|
||||||
|
}
|
||||||
elseif class == "MONK" then
|
elseif class == "MONK" then
|
||||||
return {
|
return {
|
||||||
-- No modifier
|
-- No modifier
|
||||||
@@ -447,6 +517,64 @@ local function TriggerClassConfig()
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
elseif class == "DRUID" then
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
kind = "AuraTrigger",
|
||||||
|
spellIds = AURAS_DRUID_LIFEBLOOM,
|
||||||
|
own = true, -- Lifebloom
|
||||||
|
indicator = {
|
||||||
|
kind = "SquareIndicator",
|
||||||
|
size = 17,
|
||||||
|
point = "BOTTOMLEFT",
|
||||||
|
x = 3,
|
||||||
|
y = 3,
|
||||||
|
color = colors.green,
|
||||||
|
showStacks = true,
|
||||||
|
fadeTime = 7.0,
|
||||||
|
flashTime = 2,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kind = "AuraTrigger",
|
||||||
|
spellIds = AURAS_DRUID_REGROWTH,
|
||||||
|
own = true, -- Regrowth
|
||||||
|
indicator = {
|
||||||
|
kind = "SquareIndicator",
|
||||||
|
size = 17,
|
||||||
|
point = "BOTTOMLEFT",
|
||||||
|
x = 22,
|
||||||
|
y = 3,
|
||||||
|
color = colors.yellow,
|
||||||
|
fadeTime = 21.0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kind = "AuraTrigger",
|
||||||
|
spellIds = AURAS_DRUID_REJUV,
|
||||||
|
own = true, -- Rejuvenation
|
||||||
|
indicator = {
|
||||||
|
kind = "SquareIndicator",
|
||||||
|
size = 17,
|
||||||
|
point = "BOTTOMLEFT",
|
||||||
|
x = 41,
|
||||||
|
y = 3,
|
||||||
|
color = colors.violet,
|
||||||
|
fadeTime = 12.0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kind = "StatusTrigger",
|
||||||
|
status = "Burn",
|
||||||
|
invert = false,
|
||||||
|
indicator = {
|
||||||
|
kind = "BorderIndicator",
|
||||||
|
thickness = 3.0,
|
||||||
|
color = colors.red,
|
||||||
|
level = 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
elseif class == "PALADIN" then
|
elseif class == "PALADIN" then
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -126,8 +126,6 @@ function UnitFrame:Init(unit, config)
|
|||||||
|
|
||||||
self:CreateTriggers(config.triggers)
|
self:CreateTriggers(config.triggers)
|
||||||
|
|
||||||
self:InitDebuffs()
|
|
||||||
|
|
||||||
self:RegisterEvents()
|
self:RegisterEvents()
|
||||||
self:Enable()
|
self:Enable()
|
||||||
end
|
end
|
||||||
@@ -493,74 +491,6 @@ function UnitFrame:GROUP_ROSTER_UPDATE()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- FIXME: This is a total hack job, just quickly want to get debuffs rendering on my unit frames to learn new dungeons
|
|
||||||
function UnitFrame:InitDebuffs()
|
|
||||||
local icons = {}
|
|
||||||
self.debuffIndicators = icons
|
|
||||||
for i = 1, 5 do
|
|
||||||
local icon = IconIndicator:new(self, 17, "BOTTOMRIGHT", -2 - (i - 1) * 19, 2, true, 10.0, nil, true)
|
|
||||||
icons[i] = icon
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local ignoredDebuffs = {
|
|
||||||
[57723] = true, -- Sated, shaman lust debuff (alliance)
|
|
||||||
[57724] = true, -- Sated, shaman lust debuff (horde)
|
|
||||||
[80354] = true, -- Temporal displacement
|
|
||||||
[390435] = true, -- Exhausstion
|
|
||||||
[264689] = true, -- Fatigued
|
|
||||||
[87024] = true, -- Cauterized
|
|
||||||
[45181] = true, -- Cheated Death
|
|
||||||
[41425] = true, -- hypothermia
|
|
||||||
[124275] = true, -- Light stagger
|
|
||||||
[124274] = true, -- moderate stagger
|
|
||||||
[124273] = true, -- heavy stagger
|
|
||||||
[25771] = true, -- Forbearance
|
|
||||||
[456447] = true, -- Battle-Scarred Veteran
|
|
||||||
[382912] = true, -- Well-Honed Instincts
|
|
||||||
[1223611] = true, -- Ethereal Exhaustion
|
|
||||||
[456779] = true, -- Will of the Dawn
|
|
||||||
[448005] = true, -- Light of the Martyr
|
|
||||||
[157131] = true, -- Recently Saved by the Light
|
|
||||||
[387847] = true,
|
|
||||||
[206151] = true, -- Challenger's Burden
|
|
||||||
[113942] = true, -- Demonic Gateway
|
|
||||||
[1216943] = true, -- void pulsar
|
|
||||||
[462661] = true, -- Voidbinding
|
|
||||||
[1239229] = true, -- k'areshi surge
|
|
||||||
[449042] = true, -- Radiant Light
|
|
||||||
-- blood draw
|
|
||||||
}
|
|
||||||
|
|
||||||
function UnitFrame:UpdateDebuffs()
|
|
||||||
local auras = {}
|
|
||||||
local i = 1
|
|
||||||
while #auras < 5 do
|
|
||||||
local aura = C_UnitAuras.GetAuraDataByIndex(self.unit, i, "HARMFUL")
|
|
||||||
if aura == nil then
|
|
||||||
break
|
|
||||||
end
|
|
||||||
if not ignoredDebuffs[aura.spellId] then
|
|
||||||
table.insert(auras, aura)
|
|
||||||
end
|
|
||||||
i = i + 1
|
|
||||||
end
|
|
||||||
for i = 1, 5 do
|
|
||||||
local aura = auras[i]
|
|
||||||
local icon = self.debuffIndicators[i]
|
|
||||||
|
|
||||||
if aura then
|
|
||||||
if icon.frame then
|
|
||||||
icon:Update(aura)
|
|
||||||
else
|
|
||||||
icon:Show(aura)
|
|
||||||
end
|
|
||||||
elseif icon.frame then
|
|
||||||
icon:Hide()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function UnitFrame:UNIT_AURA(unit, info)
|
function UnitFrame:UNIT_AURA(unit, info)
|
||||||
if self:HasUnitChanged() then
|
if self:HasUnitChanged() then
|
||||||
self:UpdateAll(true)
|
self:UpdateAll(true)
|
||||||
@@ -569,8 +499,6 @@ function UnitFrame:UNIT_AURA(unit, info)
|
|||||||
if self.auras:Update(info) then
|
if self.auras:Update(info) then
|
||||||
self:UpdateHealthColor()
|
self:UpdateHealthColor()
|
||||||
end
|
end
|
||||||
|
|
||||||
self:UpdateDebuffs()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function UnitFrame:UNIT_HEALTH()
|
function UnitFrame:UNIT_HEALTH()
|
||||||
@@ -674,7 +602,6 @@ function UnitFrame:UpdateAll(unitChanged)
|
|||||||
self:UpdateRange()
|
self:UpdateRange()
|
||||||
self:UpdateName()
|
self:UpdateName()
|
||||||
self:UpdateRole() -- Also calls UpdatePower if power is visible
|
self:UpdateRole() -- Also calls UpdatePower if power is visible
|
||||||
self:UpdateDebuffs()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function UnitFrame:UpdateHealth()
|
function UnitFrame:UpdateHealth()
|
||||||
|
|||||||
Reference in new issue
Block a user