-
-
Notifications
You must be signed in to change notification settings - Fork 223
/
Constants.lua
250 lines (188 loc) · 5.1 KB
/
Constants.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
-- Constants.lua
-- June 2014
local addon, ns = ...
local Hekili = _G[ addon ]
-- Class Localization
ns.getLocalClass = function ( class )
if not ns.player.sex then ns.player.sex = UnitSex( "player" ) end
return ns.player.sex == 1 and LOCALIZED_CLASS_NAMES_MALE[ class ] or LOCALIZED_CLASS_NAMES_FEMALE[ class ]
end
local InverseDirection = {
LEFT = "RIGHT",
RIGHT = "LEFT",
TOP = "BOTTOM",
BOTTOM = "TOP"
}
ns.getInverseDirection = function ( dir )
return InverseDirection[ dir ] or dir
end
local ClassIDs = {}
for i = 1, GetNumClasses() do
local _, classTag = GetClassInfo( i )
if classTag then ClassIDs[ classTag ] = i end
end
ns.getClassID = function( class )
return ClassIDs[ class ] or -1
end
local ResourceInfo = {
-- health = Enum.PowerType.HealthCost,
none = Enum.PowerType.None,
mana = Enum.PowerType.Mana,
rage = Enum.PowerType.Rage,
focus = Enum.PowerType.Focus,
energy = Enum.PowerType.Energy,
combo_points = Enum.PowerType.ComboPoints,
runes = Enum.PowerType.Runes,
runic_power = Enum.PowerType.RunicPower,
soul_shards = Enum.PowerType.SoulShards,
astral_power = Enum.PowerType.LunarPower,
holy_power = Enum.PowerType.HolyPower,
alternate = Enum.PowerType.Alternate,
maelstrom = Enum.PowerType.Maelstrom,
chi = Enum.PowerType.Chi,
insanity = Enum.PowerType.Insanity,
obsolete = Enum.PowerType.Obsolete,
obsolete2 = Enum.PowerType.Obsolete2,
arcane_charges = Enum.PowerType.ArcaneCharges,
fury = Enum.PowerType.Fury,
pain = Enum.PowerType.Pain,
essence = Enum.PowerType.Essence
}
local ResourceByID = {}
for k, powerType in pairs( ResourceInfo ) do
ResourceByID[ powerType ] = k
end
function ns.GetResourceInfo()
return ResourceInfo
end
function ns.GetResourceID( key )
return ResourceInfo[ key ]
end
function ns.GetResourceKey( id )
return ResourceByID[ id ]
end
local passive_regen = {
mana = 1,
focus = 1,
energy = 1,
essence = 1
}
function ns.ResourceRegenerates( key )
-- Does this resource have a passive gain from waiting?
if passive_regen[ key ] then return true end
return false
end
local Specializations = {
death_knight_blood = 250,
death_knight_frost = 251,
death_knight_unholy = 252,
druid_balance = 102,
druid_feral = 103,
druid_guardian = 104,
druid_restoration = 105,
hunter_beast_mastery = 253,
hunter_marksmanship = 254,
hunter_survival = 255,
mage_arcane = 62,
mage_fire = 63,
mage_frost = 64,
monk_brewmaster = 268,
monk_windwalker = 269,
monk_mistweaver = 270,
paladin_holy = 65,
paladin_protection = 66,
paladin_retribution = 70,
priest_discipline = 256,
priest_holy = 257,
priest_shadow = 258,
rogue_assassination = 259,
rogue_outlaw = 260,
rogue_subtlety = 261,
shaman_elemental = 262,
shaman_enhancement = 263,
shaman_restoration = 264,
warlock_affliction = 265,
warlock_demonology = 266,
warlock_destruction = 267,
warrior_arms = 71,
warrior_fury = 72,
warrior_protection = 73,
demonhunter_havoc = 577,
demonhunter_vengeance = 581,
evoker_devastation = 1467,
evoker_preservation = 1468,
}
local SpecializationKeys = {
[250] = "blood",
[251] = "frost",
[252] = "unholy",
[102] = "balance",
[103] = "feral",
[104] = "guardian",
[105] = "restoration",
[253] = "beast_mastery",
[254] = "marksmanship",
[255] = "survival",
[62] = "arcane",
[63] = "fire",
[64] = "frost",
[268] = "brewmaster",
[269] = "windwalker",
[270] = "mistweaver",
[65] = "holy",
[66] = "protection",
[70] = "retribution",
[256] = "discipline",
[257] = "holy",
[258] = "shadow",
[259] = "assassination",
[260] = "outlaw",
[261] = "subtlety",
[262] = "elemental",
[263] = "enhancement",
[264] = "restoration",
[265] = "affliction",
[266] = "demonology",
[267] = "destruction",
[71] = "arms",
[72] = "fury",
[73] = "protection",
[577] = "havoc",
[581] = "vengeance",
[1467] = "devastation",
[1468] = "preservation",
[1473] = "augmentation"
}
ns.getSpecializationKey = function ( id )
return SpecializationKeys[ id ] or "none"
end
ns.getSpecializationID = function ( index )
return GetSpecializationInfo( index or GetSpecialization() or 0 )
end
ns.PvpDummies = {
[114840] = true, -- Orgrimmar
[114832] = true, -- Stormwind
[189082] = true, -- Nowhere
[197833] = true, -- Valdrakken
[197834] = true, -- Healing
[219250] = true, -- Dornogal
[219251] = true -- Dornogal Healing
}
ns.FrameStratas = {
"BACKGROUND",
"LOW",
"MEDIUM",
"HIGH",
"DIALOG",
"FULLSCREEN",
"FULLSCREEN_DIALOG",
"TOOLTIP",
BACKGROUND = 1,
LOW = 2,
MEDIUM = 3,
HIGH = 4,
DIALOG = 5,
FULLSCREEN = 6,
FULLSCREEN_DIALOG = 7,
TOOLTIP = 8
}