Skip to content

Commit 584bacb

Browse files
author
justjuangui
committed
Fix ascedancy background position when a new ascendancy appear
1 parent 9889022 commit 584bacb

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

src/Export/Scripts/passivetree.lua

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,16 @@ for i, classId in ipairs(psg.passives) do
11081108
for _, class in ipairs(classes) do
11091109
for _, ascendancy in ipairs(class.ascendancies) do
11101110
printf("Positioning ascendancy " .. ascendancy.name .. " for class " .. class.name)
1111+
1112+
local angle = startAngle + (j - 1) * angleStep
1113+
local cX = hardCoded * math.cos(angle)
1114+
local cY = hardCoded * math.sin(angle)
1115+
1116+
ascendancy.background.x = cX
1117+
ascendancy.background.y = cY
1118+
1119+
j = j + 1
1120+
11111121
local info = ascendancyGroups[ascendancy.id]
11121122
if info == nil then
11131123
printf("Ascendancy group " .. ascendancy.id .. " not found")
@@ -1120,13 +1130,6 @@ for i, classId in ipairs(psg.passives) do
11201130
end
11211131
local groupAscendancy = tree.groups[ascendancyNode.group]
11221132

1123-
local angle = startAngle + (j - 1) * angleStep
1124-
local cX = hardCoded * math.cos(angle)
1125-
local cY = hardCoded * math.sin(angle)
1126-
1127-
ascendancy.background.x = cX
1128-
ascendancy.background.y = cY
1129-
11301133
local innerRadious = dat("ascendancy"):GetRow("Id", ascendancy.internalId).distanceTree
11311134

11321135
local newInnerX = cX + math.cos(angleToCenter) * innerRadious
@@ -1154,7 +1157,7 @@ for i, classId in ipairs(psg.passives) do
11541157
tree.max_y = math.max(tree.max_y, group.y + hardCoded / 2)
11551158
end
11561159
end
1157-
j = j + 1
1160+
11581161
:: continuepositioning ::
11591162
end
11601163
end

0 commit comments

Comments
 (0)