Fix decoding validation
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
# TODO
|
# 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.
|
- [ ] Fix: Tooltips cause horizontal scroll on less-wide screens. Investigate.
|
||||||
|
|
||||||
- [ ] Responsiveness:
|
- [ ] Responsiveness:
|
||||||
|
|||||||
+8
-3
@@ -241,9 +241,14 @@ export function decodeKnownTalents(pointString: string, classId: number): Map<nu
|
|||||||
if (points > talent.ranks.length) {
|
if (points > talent.ranks.length) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
if (points > 0) {
|
// Step through each point and see that we can assign it
|
||||||
known = known.set(talent.id, points)
|
for (let p = 0; p < points; p++) {
|
||||||
|
if (canLearnTalent(known, talent)) {
|
||||||
|
known = known.set(talent.id, p + 1)
|
||||||
|
} else {
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user