52e5175 - Fix power bars, remove overlay color for basic unit frames
[wowui.git] / OmaRF / 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     Positions = {"TOPRIGHT", "BOTTOMLEFT"},
13     AnchorX = 0,
14     AnchorY = -330,
15     WatchedAuras = {
16     },
17     Clickheal = {
18     },
19 };
20 local chars = {
21     ["Stormreaver"] = {
22         ["Vildan"] = {
23             Positions = {"TOPRIGHT", "BOTTOMLEFT"},
24             AnchorX = 0,
25             AnchorY = -330,
26             WatchedAuras = {
27                 [53563] = "TOPRIGHT",
28                 [156910] = "TOPRIGHT",
29                 [200025] = "TOPRIGHT",
30                 [200654] = "BOTTOMLEFT",
31             },
32             Clickheal = {
33                 ["type1"] = "spell",
34                 ["type2"] = "spell",
35                 ["shift-type1"] = "spell",
36                 ["shift-type2"] = "spell",
37                 ["ctrl-type1"] = "spell",
38                 ["alt-type2"] = "spell",
39                 ["alt-shift-type1"] = "spell",
40                 ["alt-shift-type2"] = "spell",
41                 ["spell1"] = "Holy Light",
42                 ["spell2"] = "Bestow Faith",
43                 ["shift-spell1"] = "Flash of Light",
44                 ["shift-spell2"] = "Light of the Martyr",
45                 ["ctrl-spell1"] = "Cleanse",
46                 ["alt-spell2"] = "Lay on Hands",
47                 ["alt-shift-spell1"] = "Beacon of Light",
48                 ["alt-shift-spell2"] = "Beacon of Faith",
49             },
50         },
51         ["Gedren"] = {
52             Positions = {"TOPLEFT", "TOPRIGHT", "BOTTOMLEFT"},
53             AnchorX = 0,
54             AnchorY = -330,
55             WatchedAuras = {
56                 ["Rejuvenation"] = "TOPRIGHT",
57                 ["Lifebloom"] = "TOPLEFT",
58             },
59             Clickheal = {
60                 ["type1"] = "spell",
61                 ["type2"] = "spell",
62                 ["shift-type1"] = "spell",
63                 ["shift-type2"] = "spell",
64                 ["ctrl-type1"] = "spell",
65                 ["alt-type2"] = "spell",
66                 ["spell1"] = "Healing Touch",
67                 ["spell2"] = "Lifebloom",
68                 ["shift-spell1"] = "Regrowth",
69                 ["shift-spell2"] = "Swiftmend",
70                 ["ctrl-spell1"] = "Nature's Cure",
71                 ["alt-spell2"] = "Rebirth",
72             },
73         },
74     },
75 };
76
77 -- account-wide settings
78 local settings = {
79     Width = 80,
80     Height = 40,
81     IndSize = 14,
82     BaseColor = {0, 0, 0},
83     BgColor = {0.7, 0.7, 0.7},
84     HealthColor = {0.3, 0.3, 0.3},
85     ShieldColor = {0, 0.7, 1},
86     ShieldhlColor = {0.5, 0.8, 1},
87     HealpredColor = {0.5, 0.6, 0.5},
88     HealabsorbColor = {0.1, 0.1, 0.1},
89     OverlayColorDispel = {1, 0.5, 0, 0.5},
90     OverlayColorCharm = {0.8, 0, 1, 0.5},
91     OverlayColorAlert = {1, 0, 0, 0.5},
92     PowerColors = {
93         [PowerTypeMana] = {0, 0.5, 1},
94         [PowerTypeRage] = {1, 0, 0},
95         [PowerTypeFocus] = {1, 0.5, 0},
96         [PowerTypeEnergy] = {1, 0.8, 0},
97         [PowerTypeRunic] = {0.8, 0, 0.2},
98     },
99     MajorAuras = {
100         -- Antorus
101         ["Psychic Assault"] = true,
102         ["Everburning Flames"] = true,
103         ["Corrupt"] = true,
104         ["Sleep Canister"] = true,
105         ["Misery"] = true,
106         ["Necrotic Embrace"] = true,
107         ["Fulminating Pulse"] = true,
108         ["Chilled Blood"] = true,
109         ["Soulblight"] = true,
110         ["Soulburst"] = true,
111         ["Soulbomb"] = true,
112         -- Proving Grounds for testing
113         ["Aqua Bomb"] = true,
114         -- Mythic+
115         [209858] = true, -- Necrotic Rot
116         [240559] = true, -- Grievous Wound
117         [240443] = true, -- Burst
118     },
119 };
120 OmaRFSettings = settings;
121 -- watch to not remove mana entry
122 setmetatable(settings.PowerColors, {__index = function(t) return rawget(t, PowerTypeMana) end});
123
124 function OmaRFLoadChar()
125     local name, realm = UnitFullName("player");
126     if chars[realm] and chars[realm][name] then
127         settings.Character = chars[realm][name];
128     else
129         settings.Character = charDefaults;
130     end
131 end