forked from phenom/healer-man
Release Healer Man 0.1.54
This commit is contained in:
1 parent
d6976e6ef6
commit
2dbb0acfc1
26 files changed
+1893
-912
No files matched your search
@@ -175,11 +175,33 @@ const CLASSIC_TALENT_TREES: readonly TalentTreeDefinition[] = WOW335_TALENT_TREE
|
||||
};
|
||||
});
|
||||
|
||||
const CLASSIC_TALENT_NODES: readonly TalentNodeDefinition[] = WOW335_TALENT_NODES.map((node) => ({
|
||||
...node,
|
||||
maxRank: node.rankSpellIds.length,
|
||||
system: "classic",
|
||||
}));
|
||||
const CLASSIC_MAX_RANK_BY_ID: ReadonlyMap<string, number> = new Map<string, number>(
|
||||
WOW335_TALENT_NODES.map((node) => [node.id, node.rankSpellIds.length]),
|
||||
);
|
||||
|
||||
const CLASSIC_TALENT_NODES: readonly TalentNodeDefinition[] = WOW335_TALENT_NODES.map((node) => {
|
||||
// Some patched 3.3.5a trees reduce a prerequisite talent's rank count while
|
||||
// retaining the stock Talent.dbc requirement (for example 5/5 Nature's
|
||||
// Rejuvenation becomes 3/3). Clamp that stale requirement to the imported
|
||||
// prerequisite's real maximum so downstream talents remain reachable.
|
||||
const prerequisites = node.prerequisites
|
||||
.filter((prerequisite) => CLASSIC_MAX_RANK_BY_ID.has(prerequisite.talentId))
|
||||
.map((prerequisite) => ({
|
||||
...prerequisite,
|
||||
requiredRank: Math.min(
|
||||
prerequisite.requiredRank,
|
||||
CLASSIC_MAX_RANK_BY_ID.get(prerequisite.talentId)!,
|
||||
),
|
||||
}));
|
||||
return {
|
||||
...node,
|
||||
prerequisiteId: prerequisites[0]?.talentId ?? null,
|
||||
prerequisiteRank: prerequisites[0]?.requiredRank ?? null,
|
||||
prerequisites,
|
||||
maxRank: node.rankSpellIds.length,
|
||||
system: "classic",
|
||||
};
|
||||
});
|
||||
|
||||
function coaTreeId(classId: CoaClassId, tabId: number): string {
|
||||
return `coa-${classId}-${tabId}`;
|
||||
|
||||
Reference in new issue
Block a user