Planer: Gantt-Overlap-Check auf vollen Cooldown erweitert

assignmentWindowMs und candidateWindow nutzen jetzt max(duration, cooldown)
statt nur die aktive Dauer – Abilities konnten bisher erneut platziert werden
bevor ihr Recast abgelaufen war.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
xziino 2026-05-24 08:17:22 +02:00
parent c983ca6621
commit be65d0b228

View File

@ -836,7 +836,9 @@ function layoutBossActions(mechanics, duration) {
}
function assignmentWindowMs(assignment) {
return Math.max(1, assignmentDurationSeconds(assignment)) * 1000;
const durationMs = Math.max(1, assignmentDurationSeconds(assignment)) * 1000;
const cooldownMs = assignmentCooldownSeconds(assignment) * 1000;
return Math.max(durationMs, cooldownMs);
}
function sameAssignmentRef(mechanic, assignment, ref) {
@ -847,7 +849,9 @@ function sameAssignmentRef(mechanic, assignment, ref) {
}
function assignmentOverlapsJob(plan, job, ability, timestamp, ignore = null, candidate = null) {
const candidateWindow = Math.max(candidate ? assignmentDurationSeconds(candidate) : 0, 1) * 1000;
const candidateDurationMs = Math.max(candidate ? assignmentDurationSeconds(candidate) : 0, 1) * 1000;
const candidateCooldownMs = candidate ? assignmentCooldownSeconds(candidate) * 1000 : 0;
const candidateWindow = Math.max(candidateDurationMs, candidateCooldownMs);
const candidateStart = Math.max(0, timestamp);
const candidateEnd = candidateStart + candidateWindow;
const ignoredActivation = assignmentEntryForRef(plan, ignore);