Skip to content

Commit c6e5ca3

Browse files
authored
System - nil check for allTalents
1 parent bd6d00f commit c6e5ca3

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

System/Loader/cBuilder.lua

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ function br.loader:new(spec, specName)
224224

225225
-- Get All Talents
226226
local function getAllTalents()
227-
br.talentInfo = {}
227+
-- br.talentInfo = {}
228228
local talents = {}
229229
local configId = br._G.C_ClassTalents.GetActiveConfigID()
230230
if not configId then return talents end
@@ -266,17 +266,19 @@ function br.loader:new(spec, specName)
266266
local function getFunctions()
267267
-- Build Talent Info
268268
local allTalents = getTalentInfo()
269-
br.allTalents = allTalents
269+
-- br.allTalents = allTalents
270270
if self.talent == nil then self.talent = {} end
271271
-- Heroic Talent Patching
272272
local spellListTalents = self.spells.talents -- Copy to holding table
273273
if self.spells.talentsHeroic ~= nil then
274274
-- Add heroic talents to holding table
275275
for k, v in pairs(self.spells.talentsHeroic) do spellListTalents[k] = v end
276276
-- Add in missing heroic talents to allTalents (allTalents only get talents available to spec, not all heroic talents are available)
277-
for _, v in pairs(self.spells.talentsHeroic) do
278-
if allTalents[v] == nil then
279-
allTalents[v] = { rank = 0, active = false }
277+
if allTalents ~= nil then
278+
for _, v in pairs(self.spells.talentsHeroic) do
279+
if allTalents[v] == nil then
280+
allTalents[v] = { rank = 0, active = false }
281+
end
280282
end
281283
end
282284
end

0 commit comments

Comments
 (0)