09b59f4 - Only have OnUpdate calls when necessary
[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             AnchorX = 0,
24             AnchorY = -330,
25             Clickheal = {
26                 ["type1"] = "spell",
27                 ["type2"] = "spell",
28                 ["shift-type1"] = "spell",
29                 ["shift-type2"] = "spell",
30                 ["ctrl-type1"] = "macro",
31                 ["alt-type2"] = "spell",
32                 ["alt-shift-type1"] = "spell",
33                 ["alt-shift-type2"] = "spell",
34                 ["spell1"] = "Holy Light",
35                 ["spell2"] = "Bestow Faith",
36                 ["shift-spell1"] = "Flash of Light",
37                 ["shift-spell2"] = "Light of the Martyr",
38                 ["ctrl-macro1"] = "Cleansing",
39                 ["alt-spell2"] = "Lay on Hands",
40                 ["alt-shift-spell1"] = "Beacon of Light",
41                 ["alt-shift-spell2"] = "Beacon of Faith",
42             },
43         },
44         ["Gedren"] = {
45             AnchorX = 0,
46             AnchorY = -330,
47             Clickheal = {
48                 ["type1"] = "spell",
49                 ["type2"] = "spell",
50                 ["shift-type1"] = "spell",
51                 ["shift-type2"] = "spell",
52                 ["ctrl-type1"] = "spell",
53                 ["alt-type2"] = "spell",
54                 ["spell1"] = "Healing Touch",
55                 ["spell2"] = "Lifebloom",
56                 ["shift-spell1"] = "Regrowth",
57                 ["shift-spell2"] = "Swiftmend",
58                 ["ctrl-spell1"] = "Nature's Cure",
59                 ["alt-spell2"] = "Rebirth",
60             },
61         },
62         ["Gazden"] = {
63             AnchorX = 0,
64             AnchorY = -330,
65             Clickheal = {
66                 ["type1"] = "spell",
67                 ["type2"] = "spell",
68                 ["shift-type1"] = "spell",
69                 ["ctrl-type1"] = "spell",
70                 ["spell1"] = "Healing Wave",
71                 ["spell2"] = "Chain Heal",
72                 ["shift-spell1"] = "Healing Surge",
73                 ["ctrl-spell1"] = "Purify Spirit",
74             },
75         },
76     },
77 };
78
79 -- account-wide settings
80 local settings = {
81     Width = 80,
82     Height = 40,
83     IndSize = 14,
84     BaseColor = {0, 0, 0},
85     BgColor = {0.7, 0.7, 0.7},
86     HealthColor = {0.3, 0.3, 0.3},
87     ShieldColor = {0, 0.7, 1},
88     ShieldhlColor = {0.5, 0.8, 1},
89     HealpredColor = {0.5, 0.6, 0.5},
90     HealabsorbColor = {0.1, 0.1, 0.1},
91     OverlayColorDispel = {1, 0.5, 0, 0.5},
92     OverlayColorCharm = {0.8, 0, 1, 0.5},
93     OverlayColorAlert = {1, 0, 0, 0.5},
94     PowerColors = {
95         [PowerTypeMana] = {0, 0.5, 1},
96         [PowerTypeRage] = {1, 0, 0},
97         [PowerTypeFocus] = {1, 0.5, 0},
98         [PowerTypeEnergy] = {1, 0.8, 0},
99         [PowerTypeRunic] = {0.8, 0, 0.2},
100     },
101     MajorAuras = {
102         -- Antorus
103         ["Psychic Assault"] = {bar=false},
104         ["Everburning Flames"] = {bar=false},
105         ["Corrupt"] = {bar=false},
106         ["Sleep Canister"] = {bar=false},
107         ["Misery"] = {bar=true},
108         ["Necrotic Embrace"] = {bar=false},
109         ["Fulminating Pulse"] = {bar=false},
110         ["Chilled Blood"] = {bar=false},
111         ["Soulblight"] = {bar=false},
112         ["Soulburst"] = {bar=false},
113         ["Soulbomb"] = {bar=false},
114         ["Shock Grenade"] = {bar=false},
115         ["Acidic Web"] = {bar=false},
116         ["Hungering Gloom"] = {bar=true},
117         ["Empowered Pulse Grenade"] = {bar=false},
118         -- Trial of Valor
119         ["Unholy Reckoning"] = {bar=false},
120         -- Nighthold
121         ["Carrion Plague"] = {bar=false},
122         ["Soul Corrosion"] = {bar=false},
123         -- Proving Grounds for testing
124         ["Aqua Bomb"] = {bar=false},
125         -- Mythic+
126         [209858] = {bar=false}, -- Necrotic Rot
127         [240559] = {bar=false}, -- Grievous Wound
128         --["Grievous Wound"] = {bar=false}, -- Grievous Wound
129         [240443] = {bar=false}, -- Burst
130     },
131 };
132 OmaRFSettings = settings;
133 -- watch to not remove mana entry
134 setmetatable(settings.PowerColors, {__index = function(t) return rawget(t, PowerTypeMana) end});
135
136 function OmaRFLoadChar()
137     local name, realm = UnitFullName("player");
138     if chars[realm] and chars[realm][name] then
139         settings.Character = chars[realm][name];
140     else
141         settings.Character = charDefaults;
142     end
143 end