Fix duplicate mitigation icons for self-buffing abilities

Temperance (and similar abilities) have two status IDs in FFLogs —
one for the caster's self-buff and one for the party aura. Both
appeared in the buffs string causing double icons. Deduplicate by
name in resolveMitigations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
xziino 2026-05-20 16:23:30 +02:00
parent 76c5d80cc2
commit 14d1afc7d9

View File

@ -84,11 +84,15 @@ const MITIGATION_ABILITIES = [
function resolveMitigations(string $buffStr, array $mitigIdMap): array {
if ($buffStr === '') return [];
$result = [];
$seen = [];
foreach (explode('.', $buffStr) as $idStr) {
$id = (int)$idStr;
if (isset($mitigIdMap[$id])) {
$name = $mitigIdMap[$id]['name'];
if (isset($seen[$name])) continue;
$seen[$name] = true;
$result[] = [
'name' => $mitigIdMap[$id]['name'],
'name' => $name,
'dr' => $mitigIdMap[$id]['dr'],
'buffType' => $mitigIdMap[$id]['buffType'],
];