-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy pathBuild.lua.rej
More file actions
151 lines (149 loc) · 6.75 KB
/
Copy pathBuild.lua.rej
File metadata and controls
151 lines (149 loc) · 6.75 KB
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
diff a/src/Modules/Build.lua b/src/Modules/Build.lua (rejected hunks)
@@ -831,78 +830,80 @@ function buildMode:SyncLoadouts()
end
function buildMode:EstimatePlayerProgress()
- local PointsUsed, AscUsed, SecondaryAscUsed, socketsUsed, weaponSet1Used, weaponSet2Used = self.spec:CountAllocNodes()
- local extra = self.calcsTab.mainOutput and self.calcsTab.mainOutput.ExtraPoints or 0
- local maxWeaponSets = self.maxWeaponSets
- local extraWeaponSets = self.calcsTab.mainOutput and self.calcsTab.mainOutput.PassivePointsToWeaponSetPoints or 0
- local usedMax, ascMax, secondaryAscMax, level, act = 99 + maxWeaponSets + extra, 8, 8, 1, 0
-
- repeat
- act = act + 1
- level = m_min(m_max(PointsUsed + 1 - self.acts[act].questPoints - extra - m_min(weaponSet1Used, weaponSet2Used), self.acts[act].level), 100)
- until act == self.maxActs or level <= self.acts[act + 1].level
-
- if self.characterLevelAutoMode and self.characterLevel ~= level then
- self.characterLevel = level
- self.controls.characterLevel:SetText(self.characterLevel)
- self.configTab:BuildModList()
- end
-
- -- Ascendancy points for lab
- -- this is a recommendation for beginners who are using Path of Building for the first time and trying to map out progress in PoB
- local labSuggest = level < 33 and ""
- or level < 55 and "\nLabyrinth: Normal Lab"
- or level < 68 and "\nLabyrinth: Cruel Lab"
- or level < 75 and "\nLabyrinth: Merciless Lab"
- or level < 90 and "\nLabyrinth: Uber Lab"
- or ""
-
- local normalPassives = PointsUsed - m_min(weaponSet1Used, weaponSet2Used)
- if normalPassives > usedMax then InsertIfNew(self.controls.warnings.lines, "You have too many passive points allocated") end
- if AscUsed > ascMax then InsertIfNew(self.controls.warnings.lines, "You have too many ascendancy points allocated") end
- if SecondaryAscUsed > secondaryAscMax then InsertIfNew(self.controls.warnings.lines, "You have too many secondary ascendancy points allocated") end
-
- -- if you are using more than maxWeaponSets + extraWeaponSets, you are using too many weapon sets
- local warningsWeaponSet = false
- if weaponSet1Used > (maxWeaponSets + extraWeaponSets) then
- warningsWeaponSet = true
- InsertIfNew(self.controls.warnings.lines, string.format(
- "You have allocated %d too many weapon set 1 passives",
- math.abs((maxWeaponSets + extraWeaponSets) - weaponSet1Used)
- ))
- end
- if weaponSet2Used > (maxWeaponSets + extraWeaponSets) then
- warningsWeaponSet = true
- InsertIfNew(self.controls.warnings.lines, string.format(
- "You have allocated %d too many weapon set 2 passives",
- math.abs((maxWeaponSets + extraWeaponSets) - weaponSet2Used)
- ))
- end
-
- if not warningsWeaponSet and weaponSet1Used ~= weaponSet2Used then
- InsertIfNew(self.controls.warnings.lines, string.format(
- "You have %d Weapon set 2 passives available",
- math.abs(weaponSet2Used - weaponSet1Used)
- ))
- end
-
- self.Act = act == self.maxActs and "Endgame" or "Act " .. act
-
- return string.format(
- "%s%3d / %3d %s%2d / %2d %s%2d / %2d %s%d / %d",
- normalPassives > usedMax and colorCodes.NEGATIVE or "^7",
- normalPassives, usedMax,
- colorCodes.NEGATIVE,
- weaponSet1Used, maxWeaponSets + extraWeaponSets,
- colorCodes.POSITIVE,
- weaponSet2Used, maxWeaponSets + extraWeaponSets,
- AscUsed > ascMax and colorCodes.NEGATIVE or "^7",
- AscUsed, ascMax
- ),
- string.format(
+ if self.spec then
+ local PointsUsed, AscUsed, SecondaryAscUsed, socketsUsed, weaponSet1Used, weaponSet2Used = self.spec:CountAllocNodes()
+ local extra = self.calcsTab.mainOutput and self.calcsTab.mainOutput.ExtraPoints or 0
+ local maxWeaponSets = self.maxWeaponSets
+ local extraWeaponSets = self.calcsTab.mainOutput and self.calcsTab.mainOutput.PassivePointsToWeaponSetPoints or 0
+ local usedMax, ascMax, secondaryAscMax, level, act = 99 + maxWeaponSets + extra, 8, 8, 1, 0
+
+ repeat
+ act = act + 1
+ level = m_min(m_max(PointsUsed + 1 - self.acts[act].questPoints - extra - m_min(weaponSet1Used, weaponSet2Used), self.acts[act].level), 100)
+ until act == self.maxActs or level <= self.acts[act + 1].level
+
+ if self.characterLevelAutoMode and self.characterLevel ~= level then
+ self.characterLevel = level
+ self.controls.characterLevel:SetText(self.characterLevel)
+ self.configTab:BuildModList()
+ end
+
+ -- Ascendancy points for lab
+ -- this is a recommendation for beginners who are using Path of Building for the first time and trying to map out progress in PoB
+ local labSuggest = level < 33 and ""
+ or level < 55 and "\nLabyrinth: Normal Lab"
+ or level < 68 and "\nLabyrinth: Cruel Lab"
+ or level < 75 and "\nLabyrinth: Merciless Lab"
+ or level < 90 and "\nLabyrinth: Uber Lab"
+ or ""
+
+ local normalPassives = PointsUsed - m_min(weaponSet1Used, weaponSet2Used)
+ if normalPassives > usedMax then InsertIfNew(self.controls.warnings.lines, "You have too many passive points allocated") end
+ if AscUsed > ascMax then InsertIfNew(self.controls.warnings.lines, "You have too many ascendancy points allocated") end
+ if SecondaryAscUsed > secondaryAscMax then InsertIfNew(self.controls.warnings.lines, "You have too many secondary ascendancy points allocated") end
+
+ -- if you are using more than maxWeaponSets + extraWeaponSets, you are using too many weapon sets
+ local warningsWeaponSet = false
+ if weaponSet1Used > (maxWeaponSets + extraWeaponSets) then
+ warningsWeaponSet = true
+ InsertIfNew(self.controls.warnings.lines, string.format(
+ "You have allocated %d too many weapon set 1 passives",
+ math.abs((maxWeaponSets + extraWeaponSets) - weaponSet1Used)
+ ))
+ end
+ if weaponSet2Used > (maxWeaponSets + extraWeaponSets) then
+ warningsWeaponSet = true
+ InsertIfNew(self.controls.warnings.lines, string.format(
+ "You have allocated %d too many weapon set 2 passives",
+ math.abs((maxWeaponSets + extraWeaponSets) - weaponSet2Used)
+ ))
+ end
+
+ if not warningsWeaponSet and weaponSet1Used ~= weaponSet2Used then
+ InsertIfNew(self.controls.warnings.lines, string.format(
+ "You have %d Weapon set 2 passives available",
+ math.abs(weaponSet2Used - weaponSet1Used)
+ ))
+ end
+
+ self.Act = act == self.maxActs and "Endgame" or "Act " .. act
+
+ self.controls.pointDisplay.str = string.format(
+ "%s%3d / %3d %s%2d / %2d %s%2d / %2d %s%d / %d",
+ normalPassives > usedMax and colorCodes.NEGATIVE or "^7",
+ normalPassives, usedMax,
+ colorCodes.NEGATIVE,
+ weaponSet1Used, maxWeaponSets + extraWeaponSets,
+ colorCodes.POSITIVE,
+ weaponSet2Used, maxWeaponSets + extraWeaponSets,
+ AscUsed > ascMax and colorCodes.NEGATIVE or "^7",
+ AscUsed, ascMax
+ )
+ self.controls.pointDisplay.req = string.format(
"Required Level: %d\nEstimated Progress:\nAct: %s\nExtra Skillpoints: %d%s",
level, self.Act, extra, labSuggest
)
+ end
end
function buildMode:CanExit(mode)