157889e - Update tracked spells after 3 more raid tests
[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     Clickheal = {},
13 };
14 local chars = {
15     ["Sylvanas"] = {
16         ["Vildana"] = {
17             Clickheal = {
18                 ["type1"] = "spell",
19                 ["type2"] = "spell",
20                 ["shift-type1"] = "spell",
21                 ["shift-type2"] = "spell",
22                 ["ctrl-type1"] = "spell",
23                 ["alt-type2"] = "spell",
24                 ["alt-shift-type1"] = "spell",
25                 ["alt-shift-type2"] = "spell",
26                 ["spell1"] = "Holy Light",
27                 ["spell2"] = "Bestow Faith",
28                 ["shift-spell1"] = "Flash of Light",
29                 ["shift-spell2"] = "Light of the Martyr",
30                 ["ctrl-spell1"] = "Cleanse",
31                 ["alt-spell2"] = "Lay on Hands",
32                 ["alt-shift-spell1"] = "Beacon of Light",
33                 ["alt-shift-spell2"] = "Beacon of Faith",
34             },
35         },
36     },
37     ["Stormreaver"] = {
38         ["Vildan"] = {
39             Clickheal = {
40                 ["type1"] = "spell",
41                 ["type2"] = "spell",
42                 ["shift-type1"] = "spell",
43                 ["shift-type2"] = "spell",
44                 ["ctrl-type1"] = "macro",
45                 ["alt-type2"] = "spell",
46                 ["alt-shift-type1"] = "spell",
47                 ["alt-shift-type2"] = "spell",
48                 ["spell1"] = "Holy Light",
49                 ["spell2"] = "Bestow Faith",
50                 ["shift-spell1"] = "Flash of Light",
51                 ["shift-spell2"] = "Light of the Martyr",
52                 ["ctrl-macro1"] = "Cleansing",
53                 ["alt-spell2"] = "Lay on Hands",
54                 ["alt-shift-spell1"] = "Beacon of Light",
55                 ["alt-shift-spell2"] = "Beacon of Faith",
56             },
57         },
58         ["Gedren"] = {
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     Player = {
80         Width = 160,
81         Height = 50,
82         AnchorX = -300,
83         AnchorY = -175,
84     },
85     Pet = {
86         Width = 80,
87         Height = 25,
88         AnchorX = -10,
89         AnchorY = 0,
90     },
91     Target = {
92         Width = 160,
93         Height = 50,
94         AnchorX = 300,
95         AnchorY = -175,
96     },
97     Boss = {
98         Width = 140,
99         Height = 30,
100         AnchorX = 550,
101         AnchorY = 300,
102     },
103     BaseColor = {0, 0, 0, 0.5},
104     BgColor = {0.1, 0.1, 0.1, 0.4},
105     HealthColor = {0.5, 0.5, 0.5},
106     ShieldColor = {0.1, 0.8, 1},
107     ShieldhlColor = {0.5, 0.8, 1},
108     HealpredColor = {0.5, 0.6, 0.5},
109     PowerColors = {
110         [PowerTypeMana] = {0, 0.5, 1},
111         [PowerTypeRage] = {1, 0, 0},
112         [PowerTypeFocus] = {1, 0.5, 0},
113         [PowerTypeEnergy] = {1, 0.8, 0},
114         [PowerTypeRunic] = {0.8, 0, 0.2},
115     },
116 };
117 OmaUFSettings = settings;
118 -- watch to not remove mana entry
119 setmetatable(settings.PowerColors, {__index = function(t) return rawget(t, PowerTypeMana) end});
120
121 function OmaUFLoadChar()
122     local name, realm = UnitFullName("player");
123     if chars[realm] and chars[realm][name] then
124         settings.Character = chars[realm][name];
125     else
126         settings.Character = charDefaults;
127     end
128 end