forked from xziino/ff14-mitigator
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:
parent
76c5d80cc2
commit
14d1afc7d9
@ -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'],
|
||||
];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user