Fix decoding validation

This commit is contained in:
Melvin Valster
2019-07-29 22:18:34 +02:00
parent 4478a43de7
commit 5e51eeb56d
2 changed files with 8 additions and 4 deletions
-1
View File
@@ -1,6 +1,5 @@
# TODO
- [ ] Fix: Initial load `pointString` validation (make sure all talents are valid and their deps are met)
- [ ] Fix: Tooltips cause horizontal scroll on less-wide screens. Investigate.
- [ ] Responsiveness:
+7 -2
View File
@@ -242,8 +242,13 @@ export function decodeKnownTalents(pointString: string, classId: number): Map<nu
break
}
if (points > 0) {
known = known.set(talent.id, points)
// Step through each point and see that we can assign it
for (let p = 0; p < points; p++) {
if (canLearnTalent(known, talent)) {
known = known.set(talent.id, p + 1)
} else {
break
}
}
}
}