Allow triggers/indicators to be configured.
Also adds priest test config and expands shaman test config.
This commit is contained in:
130
src/frames.lua
130
src/frames.lua
@@ -16,6 +16,13 @@
|
||||
-- Omicron Frames. If not, see <https://www.gnu.org/licenses/>.
|
||||
local omif = select(2, ...)
|
||||
|
||||
local colors = {
|
||||
cyan = {0.0, 0.8, 0.8},
|
||||
white = {1.0, 1.0, 1.0},
|
||||
orange = {1.0, 0.5 , 0},
|
||||
violet = {1.0, 0, 1.0},
|
||||
}
|
||||
|
||||
local function RangeConfig()
|
||||
local _, class = UnitClass("player")
|
||||
if class == "SHAMAN" then
|
||||
@@ -24,6 +31,12 @@ local function RangeConfig()
|
||||
enemy = "Lightning Bolt",
|
||||
fade = 0.2
|
||||
}
|
||||
elseif class == "PRIEST" then
|
||||
return {
|
||||
friendly = "Flash Heal",
|
||||
enemy = "Smite",
|
||||
fade = 0.2
|
||||
}
|
||||
else
|
||||
return {
|
||||
fade = 0.2
|
||||
@@ -41,7 +54,7 @@ local function MouseConfig()
|
||||
{button="mouse3", mods={}, kind="macro", data="/use [@UNIT,dead,help]Ancestral Spirit; [@UNIT,help]Purify Spirit"},
|
||||
{button="wheel-up", mods={}, kind="macro", data="/use [@UNIT,help]Healing Surge"},
|
||||
{button="wheel-down", mods={}, kind="macro", data="/use [@UNIT,help]Riptide"},
|
||||
|
||||
|
||||
-- alt
|
||||
{button="wheel-up", mods={alt=true}, kind="spell", data="Healing Wave"},
|
||||
{button="wheel-down", mods={alt=true}, kind="spell", data="Earth Shield"},
|
||||
@@ -49,6 +62,27 @@ local function MouseConfig()
|
||||
-- Shift
|
||||
{button="mouse2", mods={shift=true}, kind="togglemenu"},
|
||||
}
|
||||
elseif class == "PRIEST" then
|
||||
return {
|
||||
-- No modifier
|
||||
{button="mouse1", mods={}, kind="target"},
|
||||
{button="mouse2", mods={}, kind="macro", data="/use [@UNIT,dead,help]Mass Resurrection; [@UNIT,help]Power Word: Radiance"},
|
||||
{button="mouse3", mods={}, kind="macro", data="/use [@UNIT,dead,help]Resurrection; [@UNIT,help]Purify"},
|
||||
{button="mouse4", mods={}, kind="spell", data="Shadow Covenant"},
|
||||
{button="wheel-up", mods={}, kind="macro", data="/use [@UNIT,help]Flash Heal"},
|
||||
{button="wheel-down", mods={}, kind="macro", data="/use [@UNIT,help]Renew"},
|
||||
|
||||
-- alt
|
||||
{button="mouse2", mods={alt=true}, kind="spell", data="Pain Suppression"},
|
||||
{button="mouse3", mods={alt=true}, kind="spell", data="Power Infusion"},
|
||||
{button="wheel-up", mods={alt=true}, kind="spell", data="Rapture"},
|
||||
{button="wheel-down", mods={alt=true}, kind="spell", data="Power Word: Shield"},
|
||||
|
||||
-- Shift
|
||||
{button="mouse2", mods={shift=true}, kind="togglemenu"},
|
||||
{button="wheel-up", mods={shift=true}, kind="macro", data="/cast [@UNIT,help]Levitate;\n/stopspelltarget"},
|
||||
{button="wheel-down", mods={shift=true}, kind="macro", data="/cast [@UNIT,help]Leap of Faith;\n/stopspelltarget"},
|
||||
}
|
||||
else
|
||||
return {
|
||||
-- Super basic defaults
|
||||
@@ -58,6 +92,99 @@ local function MouseConfig()
|
||||
end
|
||||
end
|
||||
|
||||
local function TriggerConfig()
|
||||
local _, class = UnitClass("player")
|
||||
if class == "SHAMAN" then
|
||||
return {
|
||||
{
|
||||
kind="AuraTrigger", spellId=383648, own=true, -- Second Earth Shield on yourself
|
||||
indicator={
|
||||
kind="SquareIndicator",
|
||||
size=14,
|
||||
point="TOPLEFT",
|
||||
x=2, y=-2,
|
||||
color=colors.white,
|
||||
}
|
||||
},
|
||||
{
|
||||
kind="AuraTrigger", spellId=974, own=true, -- Second Earth Shield on yourself
|
||||
indicator={
|
||||
kind="SquareIndicator",
|
||||
size=14,
|
||||
point="TOPLEFT",
|
||||
x=2, y=-2,
|
||||
color=colors.white,
|
||||
}
|
||||
},
|
||||
{
|
||||
kind="AuraTrigger", spellId=61295, own=true, -- Riptide
|
||||
indicator={
|
||||
kind="SquareIndicator",
|
||||
size=14,
|
||||
point="BOTTOMLEFT",
|
||||
x=2, y=2,
|
||||
color=colors.cyan,
|
||||
}
|
||||
},
|
||||
}
|
||||
elseif class == "PRIEST" then
|
||||
return {
|
||||
{
|
||||
kind="AuraTrigger", spellId=17, own=true, -- Power Word: Shield
|
||||
indicator={
|
||||
kind="SquareIndicator",
|
||||
size=14,
|
||||
point="TOPLEFT",
|
||||
x=2, y=-2,
|
||||
color=colors.white,
|
||||
}
|
||||
},
|
||||
{
|
||||
kind="AuraTrigger", spellId=33206, own=true, -- Pain Suppression
|
||||
indicator={
|
||||
kind="SquareIndicator",
|
||||
size=14,
|
||||
point="TOPLEFT",
|
||||
x=18, y=-2,
|
||||
color=colors.orange,
|
||||
}
|
||||
},
|
||||
{
|
||||
kind="AuraTrigger", spellId=139, own=true, -- Renew
|
||||
indicator={
|
||||
kind="SquareIndicator",
|
||||
size=14,
|
||||
point="BOTTOMLEFT",
|
||||
x=2, y=2,
|
||||
color=colors.cyan,
|
||||
}
|
||||
},
|
||||
{
|
||||
kind="AuraTrigger", spellId=194384, own=true, -- Renew
|
||||
indicator={
|
||||
kind="SquareIndicator",
|
||||
size=14,
|
||||
point="BOTTOMLEFT",
|
||||
x=18, y=2,
|
||||
color=colors.white,
|
||||
}
|
||||
},
|
||||
{
|
||||
kind="AuraTrigger", spellId=10060, own=true, -- Renew
|
||||
indicator={
|
||||
kind="SquareIndicator",
|
||||
size=14,
|
||||
point="BOTTOMLEFT",
|
||||
x=34, y=2,
|
||||
color=colors.violet,
|
||||
}
|
||||
},
|
||||
}
|
||||
else
|
||||
return {}
|
||||
end
|
||||
end
|
||||
|
||||
local types = omif.GetModule("types")
|
||||
local UnitFrame = types.UnitFrame
|
||||
local UnitGroup = types.UnitGroup
|
||||
@@ -129,6 +256,7 @@ function CreateFrames()
|
||||
range = RangeConfig(),
|
||||
mouse = MouseConfig(),
|
||||
hideInRaid = true,
|
||||
triggers = TriggerConfig(),
|
||||
}
|
||||
|
||||
CreatePartyFrames(0, -290, config)
|
||||
|
Reference in New Issue
Block a user