|
@@ -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;
|