Second Historic jewel's conquered passives apply or not depending on edit history

Đang mở
#10,430 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 8 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
lua
Lĩnh vực
backend, game-dev

Hướng nghiên cứu

Read src/Modules/CalcSetup.lua around the jewel-limit handling, then trace how src/Classes/PassiveSpec.lua uses item.jewelData.limitDisabled when rebuilding tree paths; compare that with the build load order described in the issue. Reproduce with two Limited to: 1 Historic jewels and Ignore Jewel Limits off, then allocate and deallocate an unrelated passive. Done means the second jewel's conquests and resulting totals stay consistent before and after the edit.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

What happens

With two "Limited to: 1 Historic" timeless jewels socketed in allocated sockets and Ignore Jewel Limits unticked, the second jewel's conquered passives (the changed notables and the added small-node stats) are applied or not depending on what you did since the build was opened. The same build gives different numbers.

Steps (derived from the code):

  1. Allocate two jewel sockets and socket a timeless jewel (e.g. two Lethal Pride) in each. Keep Ignore Jewel Limits unticked (the jewel limit warning appears).
  2. Save and reopen the build. Note the stats and look at the passives in the second jewel's radius.
  3. Allocate any unrelated passive, then deallocate it again.

Expected: the same numbers before and after step 3. Either the second jewel's conquests never apply (consistent with the limit) or they always do.
Actual: right after opening, the passives in both jewels' radii are shown and counted as conquered. After the allocate/deallocate (or any other edit that rebuilds the tree paths), the second jewel's passives go back to normal and the totals change. Reopening the build brings the first numbers back.

Cause

The jewel limit is applied in CalcSetup, which sets and clears item.jewelData.limitDisabled on the item as a side effect of each calculation:

The tree code decides which jewels conquer or scan their radius by reading that flag. This applies to both Abyss timeless conquests and the radius scan used for Legion conquests:

On load the tree is built after the items (Build.lua#L654-L677) but before the first calculation, so the flag is still nil on every jewel and both jewels conquer. The first calculation then marks the second jewel limitDisabled, but the tree is not rebuilt. The second jewel's conquests stay until the next BuildAllDependsAndPaths, which then drops them. So PassiveSpec reads whatever the previous calculation left behind.

Possible fix

Decide the jewel limit in one place from the build itself (socket order + Ignore Jewel Limits), and have both PassiveSpec:BuildAllDependsAndPaths and CalcSetup use it. Or rebuild the tree paths when a calculation changes any limitDisabled value. Either way the tree no longer depends on the previous calculation.

Ngôn ngữ chính
Lua
Star
5.5k
Fork
2.4k
Merge trung bình
6 ngày 14 giờ
Pull request đã merge (30 ngày)
13

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PathOfBuildingCommunity/PathOfBuilding

Tất cả issue của PathOfBuildingCommunity/PathOfBuilding

Issue tương tự

Thêm issue về Lua

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.