Newly picked gem keeps its level 1 attribute requirement until the group is reprocessed

Aperta Adatta ai principianti
#10,428 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 8 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
79/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Ambito
backend

Direzione di ricerca

Inizia in src/Classes/SkillsTab.lua, nel callback di modifica del nome della gemma, intorno alle righe 795–829. Poi leggi ProcessSocketGroup intorno alle righe 1226–1230 per seguire quando vengono calcolati i requisiti. Controlla come viene assegnato il livello della gemma e quando viene elaborato il gruppo; il lavoro è terminato quando una gemma appena selezionata usa il proprio livello predefinito per il requisito di attributi visualizzato e l’avviso, senza bisogno di un’altra interazione. L’issue non indica alcun file di test, quindi cerca test pertinenti di SkillsTab o sui requisiti delle gemme.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What happens

When you pick a gem into an empty gem row, its attribute requirement is worked out at gem level 1. That happens even though the row is then set to the default gem level (for example 20). The wrong requirement stays until something else reprocesses the socket group: selecting another group and coming back, editing the level, or reopening the build.

Steps:

  1. Skills tab, create a new socket group.
  2. In the first gem row, type and pick Arc (default gem level setting: e.g. "Normal maximum", so the row shows level 20).
  3. Look at the Int requirement: the sidebar requirement/warning, Calcs tab > Attributes "Int Requirement", or the gem's requirement in its tooltip.

Expected: the level-20 Arc Int requirement.
Actual: the level-1 Arc Int requirement. Clicking another socket group and then back to this one (or saving and reopening) changes it to the level-20 value with no edit made. A missing "you do not meet the Int requirement" warning can appear or disappear the same way.

Cause

In the gem-name change callback the group is processed before the new gem's level is set:

ProcessSocketGroup works out reqLevel/reqStr/reqDex/reqInt from gemInstance.level, which is still 1 for a new row (the instance is created with level = 1 at #L795-L804):

Then gemInstance.level = self:ProcessGemLevel(...) sets the real level, but nothing works out the requirement again. The rebuild that follows (Build.lua OnFrame -> UpdateSocketGroups -> BuildOutput) does not call ProcessSocketGroup for user groups. So CalcSetup puts the stale values into env.requirementsTableGems:

Possible fix

Call self:ProcessSocketGroup(self.displayGroup) again after gemInstance.level is assigned in the name callback, or compute the level before the first call.

Lingua principale
Lua
Stelle
5.5k
Fork
2.4k
Merge medio
6g 14h
PR unite (30g)
13

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PathOfBuildingCommunity/PathOfBuilding

Tutte le issue di PathOfBuildingCommunity/PathOfBuilding

Issue simili

Altre issue su Lua

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.