Compare commits

..

No commits in common. "eecab6d76a628ff95f11c70e5a159df3c0969e89" and "4345fadc1cb2ad8cbc11d42804009922219eee2d" have entirely different histories.

2 changed files with 2 additions and 22 deletions

View File

@ -2,11 +2,6 @@
require_once __DIR__ . '/config.php';
session_start_safe();
function auth_start_href(): string {
$return = $_SERVER['REQUEST_URI'] ?? '/';
return 'auth/start.php?return=' . urlencode($return);
}
$authenticated = !empty($_SESSION['access_token'])
&& ($_SESSION['token_expires'] ?? 0) > time();

View File

@ -599,23 +599,11 @@ function timelineScale(plan) {
return { duration, width: Math.max(720, Math.ceil(duration / 1000 * pxPerSecond)) };
}
// Sortierreihenfolge im Gantt: Healer → Phys.Range → Caster → Melee → Tank
const JOB_GANTT_ORDER = {
'WHM': 0, 'SCH': 1, 'AST': 2, 'SGE': 3,
'BRD': 10, 'MCH': 11, 'DNC': 12,
'BLM': 20, 'SMN': 21, 'RDM': 22, 'PCT': 23,
'MNK': 30, 'DRG': 31, 'NIN': 32, 'SAM': 33, 'RPR': 34, 'VPR': 35,
'PLD': 40, 'WAR': 41, 'DRK': 42, 'GNB': 43,
};
function timelinePlayerRows(plan) {
const roster = plan.playerRoster ?? [];
const rows = [];
const jobEntries = (plan.jobComposition ?? [])
.map((job, idx) => ({ job, idx }))
.filter(e => !!e.job)
.sort((a, b) => (JOB_GANTT_ORDER[a.job] ?? 99) - (JOB_GANTT_ORDER[b.job] ?? 99));
jobEntries.forEach(({ job, idx }) => {
(plan.jobComposition ?? []).forEach((job, idx) => {
if (!job) return;
const name = roster[idx]?.name ?? '';
const role = JOB_ROLE[job] ?? '';
const abilities = (JOB_ABILITIES[job] ?? [])
@ -1314,7 +1302,6 @@ function initTimeline(planId) {
const timestamp = found ? assignmentStartMs(found.mechanic, found.assignment) : 0;
const items = rows
.filter(row => jobCanUseAbility(row.job, block.dataset.ability))
.filter((row, idx, arr) => arr.findIndex(r => r.job === row.job) === idx)
.map(row => ({
label: `${row.job}${row.name ? ` · ${row.name}` : ''}`,
icon: MITIG_ICONS[block.dataset.ability] ?? '',
@ -1840,7 +1827,6 @@ function aoeEventsToMechanics(aoeEvents, fightStart, phases, players, withMitiga
? Math.round(relevantTargets.reduce((s, t) => s + t.unmitigatedAmount, 0) / relevantTargets.length)
: 0;
const IMPORT_OFFSET_MS = -3000;
let assignments = [];
if (withMitigations) {
const seen = new Set();
@ -1855,7 +1841,6 @@ function aoeEventsToMechanics(aoeEvents, fightStart, phases, players, withMitiga
actionId: m.extraAbilityGameID ?? null,
job: guessJob(key, players),
buffType: m.buffType ?? '',
timestamp: Math.max(0, relTs + IMPORT_OFFSET_MS),
});
}
}