121eb4e - Hide Blizzard raid frames
[wowui.git] / OmaUF / Settings.lua
1 -- Settings.lua
2 local PowerTypeMana = Enum.PowerType.Mana;
3 local PowerTypeRage = Enum.PowerType.Rage;
4 local PowerTypeFocus = Enum.PowerType.Focus;
5 local PowerTypeEnergy = Enum.PowerType.Energy;
6 local PowerTypeRunic = Enum.PowerType.RunicPower;
7 local rawget = rawget;
8
9 -- configurable settings
10 -- character specific settings
11 local charDefaults = {
12     Width = 80,
13     Height = 40,
14     AnchorX = 0,
15     AnchorY = -330,
16     Clickheal = {
17     },
18 };
19 local chars = {
20     ["Stormreaver"] = {
21         ["Vildan"] = {
22             Width = 160,
23             Height = 50,
24             AnchorX = 0,
25             AnchorY = -330,
26             Clickheal = {
27                 ["type1"] = "spell",
28                 ["type2"] = "spell",
29                 ["shift-type1"] = "spell",
30                 ["shift-type2"] = "spell",
31                 ["ctrl-type1"] = "spell",
32                 ["alt-type2"] = "spell",
33                 ["alt-shift-type1"] = "spell",
34                 ["alt-shift-type2"] = "spell",
35                 ["spell1"] = "Holy Light",
36                 ["spell2"] = "Bestow Faith",
37                 ["shift-spell1"] = "Flash of Light",
38                 ["shift-spell2"] = "Light of the Martyr",
39                 ["ctrl-spell1"] = "Cleanse",
40                 ["alt-spell2"] = "Lay on Hands",
41                 ["alt-shift-spell1"] = "Beacon of Light",
42                 ["alt-shift-spell2"] = "Beacon of Faith",
43             },
44         },
45         ["Gedren"] = {
46             Width = 160,
47             Height = 80,
48             AnchorX = 0,
49             AnchorY = -330,
50             Clickheal = {
51                 ["type1"] = "spell",
52                 ["type2"] = "spell",
53                 ["shift-type1"] = "spell",
54                 ["shift-type2"] = "spell",
55                 ["ctrl-type1"] = "spell",
56                 ["alt-type2"] = "spell",
57                 ["spell1"] = "Healing Touch",
58                 ["spell2"] = "Lifebloom",
59                 ["shift-spell1"] = "Regrowth",
60                 ["shift-spell2"] = "Swiftmend",
61                 ["ctrl-spell1"] = "Nature's Cure",
62                 ["alt-spell2"] = "Rebirth",
63             },
64         },
65     },
66 };
67
68 -- account-wide settings
69 local settings = {
70     BaseColor = {0, 0, 0},
71     BgColor = {0.9, 0.9, 0.9},
72     HealthColor = {0.3, 0.3, 0.3},
73     ShieldColor = {0.1, 0.8, 1},
74     ShieldhlColor = {0.5, 0.8, 1},
75     HealpredColor = {0.5, 0.6, 0.5},
76     HealabsorbColor = {0.1, 0.1, 0.1},
77     OverlayColorDispel = {1, 0.5, 0, 0.5},
78     OverlayColorCharm = {0.8, 0, 1, 0.5},
79     OverlayColorAlert = {1, 0, 0, 0.5},
80     PowerColors = {
81         [PowerTypeMana] = {0, 0.5, 1},
82         [PowerTypeRage] = {1, 0, 0},
83         [PowerTypeFocus] = {1, 0.5, 0},
84         [PowerTypeEnergy] = {1, 0.8, 0},
85         [PowerTypeRunic] = {0.9, 0, 0.1},
86     },
87     MajorAuras = {
88         -- Antorus
89         ["Psychic Assault"] = true,
90         ["Everburning Flames"] = true,
91         ["Corrupt"] = true,
92         ["Sleep Canister"] = true,
93         ["Misery"] = true,
94         ["Necrotic Embrace"] = true,
95         ["Fulminating Pulse"] = true,
96         ["Chilled Blood"] = true,
97         ["Soulblight"] = true,
98         ["Soulburst"] = true,
99         ["Soulbomb"] = true,
100         -- Proving Grounds for testing
101         ["Aqua Bomb"] = true,
102         -- Mythic+
103         [209858] = true, -- Necrotic Rot
104         [240559] = true, -- Grievous Wound
105         [240443] = true, -- Burst
106     },
107 };
108 OmaUFSettings = settings;
109 -- watch to not remove mana entry
110 setmetatable(settings.PowerColors, {__index = function(t) return rawget(t, PowerTypeMana) end});
111
112 function OmaUFLoadChar()
113     local name, realm = UnitFullName("player");
114     if chars[realm] and chars[realm][name] then
115         settings.Character = chars[realm][name];
116     else
117         settings.Character = charDefaults;
118     end
119 end