Augyre rotating buff: dropdown shows Elemental Overload but Resolute Technique is applied, and the choice is lost on save

Offen Anfängerfreundlich
#10,431 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 8 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
75/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Bereich
backend

Rechercherichtung

Beginne mit der Option conditionHaveAugyre in src/Modules/ConfigOptions.lua und verfolge, wie src/Classes/ConfigTab.lua Listenwerte initialisiert, anzeigt, speichert und erneut lädt. Prüfe, ob der gewählte Standardwert dafür sorgt, dass der angezeigte Augyre-Buff mit der Berechnung übereinstimmt und nach dem erneuten Öffnen erhalten bleibt; das Issue enthält die relevanten Codepfade und eine Schrittfolge zur Reproduktion. Fertig ist es, wenn sich beide Buff-Auswahlmöglichkeiten beim Speichern und erneuten Laden konsistent verhalten.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

What happens

The Config tab option "Augyre rotating buff" shows "Elemental Overload" by default, but the calculation actually uses Resolute Technique until you pick a value yourself. If you do pick "Elemental Overload", it is lost on save, and the reopened build is back to Resolute Technique while the dropdown still says "Elemental Overload".

Steps (derived from the code):

  1. New build, equip Augyre (Void Sceptre). Config tab shows "Augyre rotating buff: Elemental Overload".
  2. Check Calcs: Resolute Technique is active (hits cannot crit, 100% hit chance), not Elemental Overload.
  3. Change the dropdown to "Resolute Technique", then back to "Elemental Overload". Elemental Overload is now applied.
  4. Save and reopen.

Expected: what the dropdown shows is what gets applied, and it is the same after reopening.
Actual: steps 1-2 show one option and apply the other; after step 4 the build is back to Resolute Technique with "Elemental Overload" displayed.

Cause

The option has no defaultIndex:

So a new or loaded config set starts with input.conditionHaveAugyre = nil (NewConfigSet only fills list values that have a defaultIndex):

But the dropdown displays input or GetDefaultState(var), and the default state of a list is its first entry:

A list's apply only runs for a non-nil input (ConfigTab.lua#L1150-L1152), so with nil neither branch adds Elemental Overload. The item's own "You have Resolute Technique while you do not have Elemental Overload" then applies.

On save, any input equal to GetDefaultState is left out (ConfigTab.lua#L971), so an explicit "EleOverload" is not written. On load it comes back as nil.

Among the list options without defaultIndex, this appears to be the only one whose first entry changes the calculation. The others I checked (calc modes, "None" entries) treat nil the same as their first entry. More generally, Save skips values equal to GetDefaultState, but Load/NewConfigSet only restore defaultState/defaultIndex, so any option where those two differ loses an explicit value on reload. The numeric "0" case is #10143 / #10354.

Possible fix

Add defaultIndex = 1 to conditionHaveAugyre, so the stored input, the dropdown and the save default agree. Alternatively, have Save compare against the value NewConfigSet would restore rather than GetDefaultState.

Vorherrschende Sprache
Lua
Sterne
5.5k
Forks
2.4k
Ø Merge
6 T. 14 Std.
Gemergte PRs (30 T.)
13

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus PathOfBuildingCommunity/PathOfBuilding

Alle Issues in PathOfBuildingCommunity/PathOfBuilding

Ähnliche Issues

Weitere Issues zu Lua

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.