Browse Source

Merge pull request #125 from Yakariii123/fix/ability-row-capacity

Size the ability row table to every subclass's remembered picks
stan 2 days ago
parent
commit
392209f925

+ 2 - 0
Sunrise/src/client/content/items/packages/package_subclass_build.cpp

@@ -124,6 +124,8 @@ bool build_character_abilities(
                              std::uint16_t socketEntryListIndex,
                              std::uint16_t socketEntryListIndex,
                              const domain::Selection& selection) noexcept {
                              const domain::Selection& selection) noexcept {
         if (count >= output.size()) {
         if (count >= output.size()) {
+            // A dropped row leaves that subclass and selection with no published abilities.
+            report_ability_failure("capacity", character, socketEntryListIndex, output.size());
             return;
             return;
         }
         }
         domain::Definition row{};
         domain::Definition row{};

+ 5 - 3
Sunrise/src/state/build_data/abilities/definition.h

@@ -14,10 +14,12 @@ inline constexpr std::size_t kBucketHashCapacity = 16;
 inline constexpr std::size_t kOverflowCapacity = 32;
 inline constexpr std::size_t kOverflowCapacity = 32;
 /**
 /**
  * One row per distinct subclass and ability selection the configured characters use. Each
  * One row per distinct subclass and ability selection the configured characters use. Each
- * character publishes a row for every subclass it owns at the default selection, plus one for the
- * equipped subclass's real picks when those differ: 3 characters by up to 4 rows.
+ * character publishes a row for every subclass it owns at the default selection, plus one for
+ * every one of those subclasses whose remembered picks differ, since the picks are kept per
+ * subclass item rather than only for the equipped one: 3 characters by 3 owned subclasses by 2
+ * rows.
  */
  */
-inline constexpr std::size_t kDefinitionCapacity = 12;
+inline constexpr std::size_t kDefinitionCapacity = 18;
 /** All bits set marks a bucket no entry claimed. */
 /** All bits set marks a bucket no entry claimed. */
 inline constexpr std::uint8_t kEmptyBucketKind = 0xFF;
 inline constexpr std::uint8_t kEmptyBucketKind = 0xFF;