-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lua
313 lines (294 loc) · 7.99 KB
/
init.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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
if select(2, UnitClass("player")) == "DEATHKNIGHT" then
local _, DKROT = ...
DKROT_VERSION = GetAddOnMetadata("DKRot", "Version")
DKROT.debug = false
DKROT.font = "Interface\\AddOns\\DKRot\\resources\\font.ttf"
DKROT.loaded = false
DKROT.curtime = 0
DKROT.GCD = 0
DKROT.PullTimer = 0
DKROT.PLAYER_NAME = UnitName("player")
DKROT.PLAYER_RACE = select(2, UnitRace("player"))
DKROT.ThreatMode = {
Off = 0,
Health = 0.1,
Bars = 1,
Hated = 99
}
DKROT.DiseaseOptions = {
Both = 2,
Single = 1,
None = 0
}
DKROT.RuneOrder = {
BBUUFF = 1,
BBFFUU = 2,
UUBBFF = 3,
UUFFBB = 4,
FFUUBB = 5,
FFBBUU = 6
}
DKROT.SPECS = {
BLOOD = 1,
FROST = 2,
UNHOLY = 3,
UNKNOWN = 4
}
DKROT.TrinketType = {
OnUse = 1,
Stacking = 2,
ICD = 3,
RPPM = 4,
Debuff = 5
}
DKROT.Tiers = {
NO_TIER = 0x0000,
TIER17_2p = 0x0001,
TIER17_4p = 0x0002,
TIER18_2p = 0x0004,
TIER18_4p = 0x0008
}
DKROT.TierItems = {
TIER17 = { 115535, 115536, 115537, 115539, 115539 },
TIER18 = { 124317, 124327, 124332, 124338, 124344 }
}
DKROT.Talents = {
["Plaguebearer"] = 19165,
["Plague Leech"] = 19166,
["Unholy Blight"] = 19217,
["Lichborne"] = 19218,
["Anti-Magic Zone"] = 19219,
["Purgatory"] = 19220,
["Death's Advance"] = 19221,
["Chilblains"] = 19222,
["Asphyxiate"] = 19223,
["Blood Tap"] = 19224,
["Runic Empowerment"] = 19225,
["Runic Corruption"] = 19229,
["Death Pact"] = 19226,
["Death Siphon"] = 19227,
["Conversion"] = 19228,
["Gorefiend's Grasp"] = 19230,
["Remorseless Winter"] = 19231,
["Desecrated Ground"] = 19232,
["Necrotic Plague"] = 21207,
["Defile"] = 21208,
["Breath of Sindragosa"] = 21209
}
DKROT.DTspells = {}
DKROT.Current_Spec = DKROT.SPECS.UNKNOWN
DKROT.spells = {}
DKROT.Cooldowns = {}
DKROT.Rotations = {
{},
{},
{},
{},
}
DKROT.ActiveTargets = {
Sweep = 0,
Targets = { },
LastUpdate = 0
}
DKROT.TimeToDie = {
Sweep = 0,
Targets = {},
LastUpdate = 0
}
DKROT.MovableFrames = {
{ name = "Priority Icon", frame = "DKROT.Move" },
{ name = "AOE Icon", frame = "DKROT.AOE" },
{ name = "Cooldown #1", frame = "DKROT.CD1" },
{ name = "Cooldown #2", frame = "DKROT.CD2" },
{ name = "Cooldown #3", frame = "DKROT.CD3" },
{ name = "Cooldown #4", frame = "DKROT.CD4" },
{ name = "Diseases", frame = "DKROT.Diseases" },
{ name = "Disease Tracker", frame = "DKROT.DT" },
{ name = "Interrupt", frame = "DKROT.Interrupt" },
{ name = "Rune Bar - Text", frame = "DKROT.RuneBar" },
{ name = "Rune Bar - Graphical", frame = "DKROT.RuneBarHolder" },
{ name = "Runic Power", frame = "DKROT.RunicPower" },
{ name = "Time to Die", frame = "DKROT.TTD" },
}
DKROT.FrameAnchors = {
{ name = "Screen", frame = "UIParent" },
{ name = "AOE Icon", frame = "DKROT.AOE" },
{ name = "Cooldown #1", frame = "DKROT.CD1" },
{ name = "Cooldown #2", frame = "DKROT.CD2" },
{ name = "Cooldown #3", frame = "DKROT.CD3" },
{ name = "Cooldown #4", frame = "DKROT.CD4" },
{ name = "Disease Tracker", frame = "DKROT.DT" },
{ name = "Diseases", frame = "DKROT.Diseases" },
{ name = "Interrupt", frame = "DKROT.Interrupt" },
{ name = "Priority Icon", frame = "DKROT.Move" },
{ name = "Rune Bar - Graphical", frame = "DKROT.RuneBarHolder" },
{ name = "Rune Bar - Text", frame = "DKROT.RuneBar" },
{ name = "Runic Power", frame = "DKROT.RunicPower" },
{ name = "Time to Die", frame = "DKROT.TTD" },
}
DKROT.DefaultLocations = {
["DKROT"] = {
Point = "CENTER",
Rel = "UIParent",
RelPoint = "CENTER",
X = 0,
Y = -175,
Scale = 1,
Opacity = 0.8
},
["DKROT.Move"] = {
Point = "CENTER",
Rel = "UIParent",
RelPoint = "CENTER",
X = 0,
Y = -150,
Scale = 1,
Opacity = 0.8
},
["DKROT.AOE"] = {
Point = "BOTTOMLEFT",
Rel = "DKROT.Move",
RelPoint = "BOTTOMLEFT",
X = 0,
Y = 0,
Scale = 0.5,
Opacity = 0.8
},
["DKROT.Interrupt"] = {
Point = "TOPRIGHT",
Rel = "DKROT.Move",
RelPoint = "TOPRIGHT",
X = 0,
Y = 0,
Scale = 0.5,
Opacity = 0.8
},
["DKROT.CD1"] = {
Point = "TOPRIGHT",
Rel = "DKROT.Move",
RelPoint = "TOPLEFT",
X = -4,
Y = 1,
Scale = 1,
Opacity = 0.8
},
["DKROT.CD2"] = {
Point = "TOPLEFT",
Rel = "DKROT.Move",
RelPoint = "TOPRIGHT",
X = 4,
Y = 1,
Scale = 1,
Opacity = 0.8
},
["DKROT.CD3"] = {
Point = "TOPRIGHT",
Rel = "DKROT.CD1",
RelPoint = "TOPLEFT",
X = -2,
Y = 0,
Scale = 1,
Opacity = 0.8
},
["DKROT.CD4"] = {
Point = "TOPLEFT",
Rel = "DKROT.CD2",
RelPoint = "TOPRIGHT",
X = 2,
Y = 0,
Scale = 1,
Opacity = 0.8
},
["DKROT.RuneBar"] = {
Point = "BOTTOM",
Rel = "DKROT.Move",
RelPoint = "TOP",
X = 0,
Y = -2,
Scale = 1,
Opacity = 0.8
},
["DKROT.RuneBarHolder"] = {
Point = "BOTTOMLEFT",
Rel = "DKROT.CD4",
RelPoint = "BOTTOMRIGHT",
X = 1,
Y = -1,
Scale = 0.86,
Opacity = 0.8
},
["DKROT.RunicPower"] = {
Point = "TOP",
Rel = "DKROT.Move",
RelPoint = "BOTTOM",
X = 0,
Y = -2,
Scale = 1,
Opacity = 0.8
},
["DKROT.Diseases"]= {
Point = "TOP",
Rel = "DKROT.RunicPower",
RelPoint = "BOTTOM",
X = 0,
Y = 0,
Scale = 1,
Opacity = 0.8
},
["DKROT.DT"] = {
Point = "BOTTOMRIGHT",
Rel = "DKROT.CD3",
RelPoint = "BOTTOMLEFT",
X = -2,
Y = 0,
Scale = 1,
Opacity = 0.8
},
["DKROT.TTD"] = {
Point = "BOTTOM",
Rel = "DKROT.RuneBar",
RelPoint = "TOP",
X = 0,
Y = 0,
Scale = 1,
Opacity = 0.8
},
}
StaticPopupDialogs["DKROT_ERROR_DEPENDENCY_VIOLATION"] = {
text = "You cannot anchor this frame to %s as it has a dependency on the source frame.\n\nDependency violated:\n%s\n",
button1 = "OK",
timeout = 0,
whileDead = true,
hideOnEscape = true,
showAlert = true,
preferredIndex = 3,
}
StaticPopupDialogs["DKROT_UPDATE_WARNING"] = {
text = "DKRot has been updated to support more than just 2 rotations per spec\n\nIf you want to change the rotation to use, open the settings and select the rotation from the dropdown menu\n\nThis warning should only be displayed once\n",
button1 = "OK",
button3 = "Open settings",
OnAlt = function()
InterfaceOptionsFrame_OpenToCategory(DKROT_CDRPanel)
InterfaceOptionsFrame_OpenToCategory(DKROT_CDRPanel)
end,
timeout = 0,
whileDead = true,
hideOnEscape = true,
showAlert = true,
preferredIndex = 3,
}
StaticPopupDialogs["DKROT_FRAME_UNLOCKED"] = {
text = "DKRot is unlocked. You can move them by dragging the frames around and when you are done click on the Lock button below",
button3 = "Lock",
OnAlt = function()
DKROT_Settings.Locked = true
DKROT.LockDialog = false
DKROT_LockUI()
DKROT:OptionsRefresh()
end,
timeout = 0,
whileDead = true,
hideOnEscape = false,
preferredIndex = 3,
}
end