瀏覽代碼

fixed a function that still tried to correct the checkboxes on abilities with more than 10 charges.

Warafear 11 月之前
父節點
當前提交
72c3a9d87a
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      src/app/journal/journal-stats/ability-panel/ability-table/ability-table.component.ts

+ 7 - 0
src/app/journal/journal-stats/ability-panel/ability-table/ability-table.component.ts

@@ -77,7 +77,14 @@ export class AbilityTableComponent {
     this.updateDatabase();
   }
 
+  /**
+   * Ticks the first x checkboxes of an ability, where x is the amount of currently used charges.
+   * @param abilityIndex The Index of the ability to correct the charges view for
+   * @returns void
+   */
   public correctChargesView(abilityIndex: number): void {
+    // if there are more than 9 charges, the charges are not handled by checkboxes.
+    if (this.abilities[abilityIndex].charges > 9) return;
     const charges = this.abilities[abilityIndex].charges;
     const currentlyUsedCharges =
       this.abilities[abilityIndex].currentlyUsedCharges;