@@ -188,7 +188,6 @@ function buildMode:Init(dbFileName, buildName, buildXML, convertBuild, importLin
188188 end
189189 self .controls .pointDisplay = new (" Control" , {" LEFT" ,self .anchorTopBarRight ," RIGHT" }, {function () return getPointDisplayX () end , 0 , 0 , 20 })
190190 self .controls .pointDisplay .width = function (control )
191- control .str , control .req = self :EstimatePlayerProgress ()
192191 return DrawStringWidth (16 , " FIXED" , control .str ) + 8
193192 end
194193 self .controls .pointDisplay .Draw = function (control )
@@ -874,38 +873,48 @@ function buildMode:SyncLoadouts()
874873end
875874
876875function buildMode :EstimatePlayerProgress ()
877- local PointsUsed , AscUsed , SecondaryAscUsed = self .spec :CountAllocNodes ()
878- local extra = self .calcsTab .mainOutput and self .calcsTab .mainOutput .ExtraPoints or 0
879- local usedMax , ascMax , secondaryAscMax , level , act = 99 + 23 + extra , 8 , 8 , 1 , 0
880-
881- -- Find estimated act and level based on points used
882- repeat
883- act = act + 1
884- level = m_min (m_max (PointsUsed + 1 - acts [act ].questPoints - actExtra (act , extra ), acts [act ].level ), 100 )
885- until act == 11 or level <= acts [act + 1 ].level
886-
887- if self .characterLevelAutoMode and self .characterLevel ~= level then
888- self .characterLevel = level
889- self .controls .characterLevel :SetText (self .characterLevel )
890- self .configTab :BuildModList ()
876+ if self .spec then
877+ local PointsUsed , AscUsed , SecondaryAscUsed = self .spec :CountAllocNodes ()
878+ local extra = self .calcsTab .mainOutput and self .calcsTab .mainOutput .ExtraPoints or 0
879+ local usedMax , ascMax , secondaryAscMax , level , act = 99 + 23 + extra , 8 , 8 , 1 , 0
880+
881+ -- Find estimated act and level based on points used
882+ repeat
883+ act = act + 1
884+ level = m_min (m_max (PointsUsed + 1 - acts [act ].questPoints - actExtra (act , extra ), acts [act ].level ), 100 )
885+ until act == 11 or level <= acts [act + 1 ].level
886+
887+ if self .characterLevelAutoMode and self .characterLevel ~= level then
888+ self .characterLevel = level
889+ self .controls .characterLevel :SetText (self .characterLevel )
890+ self .configTab :BuildModList ()
891+ end
892+
893+ -- Ascendancy points for lab
894+ -- this is a recommendation for beginners who are using Path of Building for the first time and trying to map out progress in PoB
895+ local labSuggest = level < 33 and " "
896+ or level < 55 and " \n Labyrinth: Normal Lab"
897+ or level < 68 and " \n Labyrinth: Cruel Lab"
898+ or level < 75 and " \n Labyrinth: Merciless Lab"
899+ or level < 90 and " \n Labyrinth: Uber Lab"
900+ or " "
901+
902+ if PointsUsed > usedMax then InsertIfNew (self .controls .warnings .lines , " You have too many passive points allocated" ) end
903+ if AscUsed > ascMax then InsertIfNew (self .controls .warnings .lines , " You have too many ascendancy points allocated" ) end
904+ if SecondaryAscUsed > secondaryAscMax then InsertIfNew (self .controls .warnings .lines , " You have too many secondary ascendancy points allocated" ) end
905+ self .Act = level < 90 and act <= 10 and act or " Endgame"
906+
907+ self .controls .pointDisplay .str = string.format (" %s%3d / %3d %s%d / %d" ,
908+ PointsUsed > usedMax and colorCodes .NEGATIVE or " ^7" ,
909+ PointsUsed , usedMax ,
910+ AscUsed > ascMax and colorCodes .NEGATIVE or " ^7" ,
911+ AscUsed , ascMax
912+ )
913+ self .controls .pointDisplay .req = string.format (
914+ " Required Level: %d\n Estimated Progress:\n Act: %s\n Questpoints: %d\n Extra Skillpoints: %d%s" ,
915+ level , self .Act , acts [act ].questPoints , actExtra (act , extra ), labSuggest
916+ )
891917 end
892-
893- -- Ascendancy points for lab
894- -- this is a recommendation for beginners who are using Path of Building for the first time and trying to map out progress in PoB
895- local labSuggest = level < 33 and " "
896- or level < 55 and " \n Labyrinth: Normal Lab"
897- or level < 68 and " \n Labyrinth: Cruel Lab"
898- or level < 75 and " \n Labyrinth: Merciless Lab"
899- or level < 90 and " \n Labyrinth: Uber Lab"
900- or " "
901-
902- if PointsUsed > usedMax then InsertIfNew (self .controls .warnings .lines , " You have too many passive points allocated" ) end
903- if AscUsed > ascMax then InsertIfNew (self .controls .warnings .lines , " You have too many ascendancy points allocated" ) end
904- if SecondaryAscUsed > secondaryAscMax then InsertIfNew (self .controls .warnings .lines , " You have too many secondary ascendancy points allocated" ) end
905- self .Act = level < 90 and act <= 10 and act or " Endgame"
906-
907- return string.format (" %s%3d / %3d %s%d / %d" , PointsUsed > usedMax and colorCodes .NEGATIVE or " ^7" , PointsUsed , usedMax , AscUsed > ascMax and colorCodes .NEGATIVE or " ^7" , AscUsed , ascMax ),
908- " Required Level: " .. level .. " \n Estimated Progress:\n Act: " .. self .Act .. " \n Questpoints: " .. acts [act ].questPoints .. " \n Extra Skillpoints: " .. actExtra (act , extra ).. labSuggest
909918end
910919
911920function buildMode :CanExit (mode )
@@ -1779,6 +1788,7 @@ function buildMode:RefreshStatList()
17791788 end
17801789 self :AddDisplayStatList (self .displayStats , self .calcsTab .mainEnv .player )
17811790 self :InsertItemWarnings ()
1791+ self :EstimatePlayerProgress ()
17821792end
17831793
17841794function buildMode :CompareStatList (tooltip , statList , actor , baseOutput , compareOutput , header , nodeCount )
0 commit comments