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

オープン 初心者向け
#10,431 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 8 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
75/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
領域
backend

調査の方向性

src/Modules/ConfigOptions.lua の conditionHaveAugyre オプションから始め、src/Classes/ConfigTab.lua がリスト値をどのように初期化、表示、保存、再読み込みするかを追ってください。選択されたデフォルト値によって、表示される Augyre バフが計算結果と一致し、再度開いた後も保持されるか確認してください。issue には関連するコードパスと再現手順が記載されています。保存と再読み込みを経ても、両方のバフ選択肢が一貫して動作すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Lua
スター
5.5k
フォーク
2.4k
平均マージ
6日 14時間
マージ済み PR(30日)
13

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PathOfBuildingCommunity/PathOfBuilding のほかの issue

PathOfBuildingCommunity/PathOfBuilding の issue をすべて見る

似ている issue

Lua の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。