Skip to content

Commit 1afd03e

Browse files
committed
Fix an error when opening the settings
1 parent 38ea5d5 commit 1afd03e

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

modules/autoPurchaseGenericTalents.lua

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ function Module:GetOptions(defaultOptionsTable, db)
230230
desc = L['Automatically pick Whirling Surge/Lightning Surge the first time you log in on a character.'],
231231
values = function()
232232
return {
233-
[CHOICE_NODE_OPTION_1] = StripHyperlinks(self:GetSpellLinkFromEntryID(SURGE_ENTRY_IDS[CHOICE_NODE_OPTION_1]) or 'Whirling Surge'),
234-
[CHOICE_NODE_OPTION_2] = StripHyperlinks(self:GetSpellLinkFromEntryID(SURGE_ENTRY_IDS[CHOICE_NODE_OPTION_2]) or 'Lightning Surge'),
233+
[CHOICE_NODE_OPTION_1] = StripHyperlinks(self:GetSpellLinkFromEntryID(self.skyridingConfigID, SURGE_ENTRY_IDS[CHOICE_NODE_OPTION_1]) or 'Whirling Surge'),
234+
[CHOICE_NODE_OPTION_2] = StripHyperlinks(self:GetSpellLinkFromEntryID(self.skyridingConfigID, SURGE_ENTRY_IDS[CHOICE_NODE_OPTION_2]) or 'Lightning Surge'),
235235
[CHOICE_NODE_NOT_SET] = L['Do Nothing'],
236236
};
237237
end,
@@ -252,93 +252,93 @@ function Module:GetOptions(defaultOptionsTable, db)
252252
},
253253
},
254254
};
255-
defaultOptionsTable.args.horrificVisions = {
255+
defaultOptionsTable.args.reshiiWraps = {
256256
type = 'group',
257257
inline = true,
258-
name = L['Horrific Visions'],
258+
name = GENERIC_TRAIT_FRAME_RESHII_WRAPS_TITLE,
259259
order = increment(),
260260
args = {
261261
loading = {
262262
type = 'description',
263-
name = L['Loading...'] .. '\n' .. L['You have not unlocked the Horrific Visions system on this character yet.'],
263+
name = L['Loading...'] .. '\n' .. L['You have not unlocked the %s system on this character yet.']:format(GENERIC_TRAIT_FRAME_RESHII_WRAPS_TITLE),
264264
order = increment(),
265-
hidden = isHorrificVisionsLoaded,
265+
hidden = isRishiiWrapsLoaded,
266266
},
267-
horrificVisionsEnabled = {
267+
reshiiWrapsEnabled = {
268268
type = 'toggle',
269269
name = L['Enable'],
270-
desc = L['Automatically purchase Horrific Visions talents when you have enough currency.'],
270+
desc = L['Automatically purchase %s talents when you have enough currency.']:format(GENERIC_TRAIT_FRAME_RESHII_WRAPS_TITLE),
271271
order = increment(),
272272
get = get,
273273
set = set,
274274
},
275275
openUI = {
276276
type = 'execute',
277-
name = L['Toggle Horrific Visions UI'],
278-
desc = L['Toggle the Horrific Visions UI to view and adjust talents.'],
277+
name = L['Toggle %s UI']:format(GENERIC_TRAIT_FRAME_RESHII_WRAPS_TITLE),
278+
desc = L['Toggle the %s UI to view and adjust talents.']:format(GENERIC_TRAIT_FRAME_RESHII_WRAPS_TITLE),
279279
order = increment(),
280-
func = function() self:ToggleTreeUI(HORRIFIC_VISIONS_TREE_ID); end,
281-
disabled = not isHorrificVisionsLoaded,
280+
func = function() self:ToggleTreeUI(RESHII_WRAPS_TREE_ID); end,
281+
disabled = not isRishiiWrapsLoaded,
282282
},
283283
},
284284
};
285-
defaultOptionsTable.args.overchargedTitanConsole = {
285+
defaultOptionsTable.args.horrificVisions = {
286286
type = 'group',
287287
inline = true,
288-
name = GENERIC_TRAIT_FRAME_TITAN_CONSOLE_TITLE,
288+
name = L['Horrific Visions'],
289289
order = increment(),
290290
args = {
291291
loading = {
292292
type = 'description',
293-
name = L['Loading...'] .. '\n' .. L['You have not unlocked the %s system on this character yet.']:format(GENERIC_TRAIT_FRAME_TITAN_CONSOLE_TITLE),
293+
name = L['Loading...'] .. '\n' .. L['You have not unlocked the Horrific Visions system on this character yet.'],
294294
order = increment(),
295-
hidden = isOverchargedTitanConsoleLoaded,
295+
hidden = isHorrificVisionsLoaded,
296296
},
297-
overchargedTitanConsoleEnabled = {
297+
horrificVisionsEnabled = {
298298
type = 'toggle',
299299
name = L['Enable'],
300-
desc = L['Automatically purchase %s talents when you have enough currency.']:format(GENERIC_TRAIT_FRAME_TITAN_CONSOLE_TITLE),
300+
desc = L['Automatically purchase Horrific Visions talents when you have enough currency.'],
301301
order = increment(),
302302
get = get,
303303
set = set,
304304
},
305305
openUI = {
306306
type = 'execute',
307-
name = L['Toggle %s UI']:format(GENERIC_TRAIT_FRAME_TITAN_CONSOLE_TITLE),
308-
desc = L['Toggle the %s UI to view and adjust talents.']:format(GENERIC_TRAIT_FRAME_TITAN_CONSOLE_TITLE),
307+
name = L['Toggle Horrific Visions UI'],
308+
desc = L['Toggle the Horrific Visions UI to view and adjust talents.'],
309309
order = increment(),
310-
func = function() self:ToggleTreeUI(OVERCHARGED_TITAN_CONSOLE_TREE_ID); end,
311-
disabled = not isOverchargedTitanConsoleLoaded,
310+
func = function() self:ToggleTreeUI(HORRIFIC_VISIONS_TREE_ID); end,
311+
disabled = not isHorrificVisionsLoaded,
312312
},
313313
},
314314
};
315-
defaultOptionsTable.args.reshiiWraps = {
315+
defaultOptionsTable.args.overchargedTitanConsole = {
316316
type = 'group',
317317
inline = true,
318-
name = GENERIC_TRAIT_FRAME_RESHII_WRAPS_TITLE,
318+
name = GENERIC_TRAIT_FRAME_TITAN_CONSOLE_TITLE,
319319
order = increment(),
320320
args = {
321321
loading = {
322322
type = 'description',
323-
name = L['Loading...'] .. '\n' .. L['You have not unlocked the %s system on this character yet.']:format(GENERIC_TRAIT_FRAME_RESHII_WRAPS_TITLE),
323+
name = L['Loading...'] .. '\n' .. L['You have not unlocked the %s system on this character yet.']:format(GENERIC_TRAIT_FRAME_TITAN_CONSOLE_TITLE),
324324
order = increment(),
325-
hidden = isRishiiWrapsLoaded,
325+
hidden = isOverchargedTitanConsoleLoaded,
326326
},
327-
reshiiWrapsEnabled = {
327+
overchargedTitanConsoleEnabled = {
328328
type = 'toggle',
329329
name = L['Enable'],
330-
desc = L['Automatically purchase %s talents when you have enough currency.']:format(GENERIC_TRAIT_FRAME_RESHII_WRAPS_TITLE),
330+
desc = L['Automatically purchase %s talents when you have enough currency.']:format(GENERIC_TRAIT_FRAME_TITAN_CONSOLE_TITLE),
331331
order = increment(),
332332
get = get,
333333
set = set,
334334
},
335335
openUI = {
336336
type = 'execute',
337-
name = L['Toggle %s UI']:format(GENERIC_TRAIT_FRAME_RESHII_WRAPS_TITLE),
338-
desc = L['Toggle the %s UI to view and adjust talents.']:format(GENERIC_TRAIT_FRAME_RESHII_WRAPS_TITLE),
337+
name = L['Toggle %s UI']:format(GENERIC_TRAIT_FRAME_TITAN_CONSOLE_TITLE),
338+
desc = L['Toggle the %s UI to view and adjust talents.']:format(GENERIC_TRAIT_FRAME_TITAN_CONSOLE_TITLE),
339339
order = increment(),
340-
func = function() self:ToggleTreeUI(RESHII_WRAPS_TREE_ID); end,
341-
disabled = not isRishiiWrapsLoaded,
340+
func = function() self:ToggleTreeUI(OVERCHARGED_TITAN_CONSOLE_TREE_ID); end,
341+
disabled = not isOverchargedTitanConsoleLoaded,
342342
},
343343
},
344344
};
@@ -435,7 +435,7 @@ function Module:SetSpecialChoiceNode(configID, settingName, cacheName, nodeID, c
435435
if C_Traits.SetSelection(configID, nodeID, targetEntryID) and C_Traits.CommitConfig(configID) then
436436
self.db[cacheName][Util.PlayerKey] = self.db[settingName];
437437
if self.db.reportPurchases then
438-
self:Print(L['Automatically set'], self:GetSpellLinkFromEntryID(targetEntryID));
438+
self:Print(L['Automatically set'], self:GetSpellLinkFromEntryID(configID, targetEntryID));
439439
end
440440
end
441441

0 commit comments

Comments
 (0)