Skip to content

Commit 5651e62

Browse files
committed
Remove redundant checks
1 parent cab2876 commit 5651e62

1 file changed

Lines changed: 1 addition & 18 deletions

File tree

src/Classes/PassiveTreeView.lua

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -271,31 +271,20 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
271271

272272
local hotkeyPressed = IsKeyDown("1") or IsKeyDown("I") or IsKeyDown("2") or IsKeyDown("S") or IsKeyDown("3") or IsKeyDown("D")
273273

274-
-- Helper function to check if a path crosses between different weapon sets
275-
local function pathCrossesWeaponSets(node)
276-
return self:PathCrossesWeaponSets(node, spec)
277-
end
278-
279274
-- Unified helper function to determine if node allocation should be blocked
280275
local function shouldBlockNodeAllocation(node)
281276
if not node.path or node.alloc then
282277
return false
283278
end
284279

285280
local isGlobalNode = node.type == "Keystone" or node.type == "Socket" or node.containJewelSocket
286-
local isAttributeNode = node.isAttribute
287281

288-
-- Fold early - handle global nodes first
289282
if isGlobalNode then
290283
local weaponSetMode = spec.allocMode > 0
291284
local connectedToWeaponSetNodes = self:IsConnectedToWeaponSetNodes(node)
292285
return weaponSetMode or connectedToWeaponSetNodes
293-
elseif isAttributeNode then
294-
-- Attribute nodes follow same rules as regular nodes for weapon set crossing
295-
return pathCrossesWeaponSets(node)
296286
else
297-
-- Regular nodes - check for weapon set path crossing
298-
return pathCrossesWeaponSets(node)
287+
return self:PathCrossesWeaponSets(node, spec)
299288
end
300289
end
301290

@@ -306,16 +295,10 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
306295
end
307296

308297
local isGlobalNode = node.type == "Keystone" or node.type == "Socket" or node.containJewelSocket
309-
local isAttributeNode = node.isAttribute
310298

311-
-- Fold early - handle global nodes first
312299
if isGlobalNode then
313300
return node.allocMode == 0 and spec.allocMode > 0
314-
elseif isAttributeNode then
315-
-- Attribute nodes follow same rules as regular nodes
316-
return node.allocMode ~= spec.allocMode and node.allocMode ~= 0
317301
else
318-
-- Regular nodes
319302
return node.allocMode ~= spec.allocMode and node.allocMode ~= 0
320303
end
321304
end

0 commit comments

Comments
 (0)