"), damit beim Uebernehmen * genau das gilt, was die Vorschau gezeigt hat * 3. gear_armory_apply: die angehakten Teile ins Set schreiben * Gegenstands-, Skill- und Daevanion-IDs von NCSoft sind dieselben wie bei aion2hub (Quelle des Planers). */ require_once __DIR__ . '/armory.php'; require_once __DIR__ . '/gear.php'; require_once __DIR__ . '/gear_skills.php'; require_once __DIR__ . '/gear_planner.php'; require_once __DIR__ . '/gear_planner_view.php'; // gear_daevanion_node_html, gear_plan_class_skills // Vorschau so lange aufheben (danach neu abrufen) const GEAR_ARMORY_TTL = 1800; // Sprache fuer die Gegenstandsdetails: englische Wertnamen wie im Katalog von aion2hub ("Critical Hit", "MP") const GEAR_ARMORY_ITEM_LANG = 'en-US'; // Fehlende Gegenstandsdetails (NCSoft liefert oft 404) so oft nachfragen const GEAR_ARMORY_ITEM_ROUNDS = 5; // Skill-Gruppen in der Vorschau: Art bei uns => [Ueberschrift, NCSoft-Kategorie] const GEAR_ARMORY_SKILL_GROUPS = ['active' => 'Aktive Skills', 'passive' => 'Passive Skills', 'stigma' => 'Stigmen']; /** * Charakter bei NCSoft abrufen: Profil, Ausruestung mit Details je Gegenstand, Skills mit IDs und die * offenen Daevanion-Felder je Brett (nur, was der Planer braucht). * * @return array * @throws RuntimeException wenn NCSoft nicht antwortet oder es den Charakter nicht gibt */ function gear_armory_fetch(string $charId, int $serverId): array { if (function_exists('set_time_limit')) { @set_time_limit(90); } $base = 'https://' . ARMORY_API_HOST . '/api/character/'; $info = armory_request_complete($base . 'info?' . armory_query($charId, $serverId), static fn (array $info): bool => empty($info['profile']['characterName'])); $profile = (array) ($info['profile'] ?? []); if (empty($profile['characterName'])) { throw new RuntimeException('Diesen Charakter gibt es im Spiel nicht (mehr).', 404); } $equip = armory_request_complete($base . 'equipment?' . armory_query($charId, $serverId), 'armory_equip_or_skills_hollow'); // Details je Gegenstand (Manasteine, Seelenpraegung, bei Arcana die gepraegten Skills) - NCSoft antwortet oft // mit 404, deshalb in Runden nachfragen. Arcana-Karten stehen mit in der Ausruestung (Plaetze "Arcana1" ...). $equipment = []; $urls = []; foreach ((array) ($equip['equipment']['equipmentList'] ?? []) as $item) { $slotName = (string) ($item['slotPosName'] ?? ''); $slot = ARMORY_SLOTS[$slotName] ?? (preg_match('/^Arcana\d+$/', $slotName) ? 'arcana:' . (int) ($item['slotPos'] ?? 0) : null); if ($slot === null || empty($item['id'])) { continue; } $equipment[$slot] = [ 'id' => (int) $item['id'], 'name' => (string) ($item['name'] ?? ''), 'grade' => (string) ($item['grade'] ?? ''), 'icon' => (string) ($item['icon'] ?? ''), 'enchant' => (int) ($item['enchantLevel'] ?? 0), 'exceed' => (int) ($item['exceedLevel'] ?? 0), 'detail' => null, ]; $urls[$slot] = $base . 'equipment/item?' . http_build_query([ 'id' => (int) $item['id'], 'enchantLevel' => (int) ($item['enchantLevel'] ?? 0), 'characterId' => $charId, 'serverId' => $serverId, 'slotPos' => (int) ($item['slotPos'] ?? 0), 'lang' => GEAR_ARMORY_ITEM_LANG, 'region' => ARMORY_REGION, ]); } for ($round = 1; $urls && $round <= GEAR_ARMORY_ITEM_ROUNDS; $round++) { foreach (armory_request_multi($urls) as $slot => $detail) { if ((int) ($detail['id'] ?? 0) === $equipment[$slot]['id']) { $equipment[$slot]['detail'] = [ 'soul' => array_values(array_filter(array_map(static fn ($s): ?array => is_array($s) && isset($s['name'], $s['value']) ? [(string) $s['name'], (float) str_replace(['%', ',', '+'], '', (string) $s['value'])] : null, (array) ($detail['subStats'] ?? [])))), 'soul_random' => !empty($detail['subStatRandom']), 'soul_skills' => array_values(array_filter(array_map(static fn ($s): ?array => is_array($s) && !empty($s['id']) ? [(int) $s['id'], max(1, (int) ($s['level'] ?? 1)), (string) ($s['name'] ?? ''), (string) ($s['icon'] ?? '')] : null, (array) ($detail['subSkills'] ?? [])))), 'manastones' => array_values(array_filter(array_map(static fn ($s): ?array => is_array($s) && isset($s['name'], $s['value']) ? [(string) $s['name'], (int) str_replace(['+', ',', '.'], '', (string) $s['value'])] : null, (array) ($detail['magicStoneStat'] ?? [])))), ]; unset($urls[$slot]); } } if ($urls) { usleep(300000); } } $arcana = []; foreach ($equipment as $slot => $entry) { if (str_starts_with($slot, 'arcana:')) { $arcana[] = $entry; unset($equipment[$slot]); } } $skills = []; foreach ((array) ($equip['skill']['skillList'] ?? []) as $skill) { $kind = ARMORY_SKILL_KINDS[(string) ($skill['category'] ?? '')] ?? null; if ($kind === null || empty($skill['id'])) { continue; } $skills[] = [ 'id' => (int) $skill['id'], 'name' => (string) ($skill['name'] ?? ''), 'kind' => $kind, 'level' => (int) ($skill['skillLevel'] ?? 0), 'equipped' => !empty($skill['equip']), 'icon' => (string) ($skill['icon'] ?? ''), ]; } // Daevanion: nur Bretter mit offenen Feldern abfragen $boardList = array_values(array_filter((array) ($info['daevanion']['boardList'] ?? []), static fn ($b): bool => is_array($b) && (int) ($b['openNodeCount'] ?? 0) > 0)); $details = $boardList ? armory_request_multi(array_combine( array_map(static fn (array $b): string => 'b' . (int) $b['id'], $boardList), array_map(static fn (array $b): string => $base . 'daevanion/detail?' . armory_query($charId, $serverId, ['boardId' => (int) $b['id']]), $boardList) )) : []; $boards = []; foreach ($boardList as $board) { $detail = $details['b' . (int) $board['id']] ?? null; $boards[] = [ 'id' => (int) $board['id'], 'name' => (string) ($board['name'] ?? ''), 'open' => (int) ($board['openNodeCount'] ?? 0), // null = Abfrage fehlgeschlagen 'nodes' => $detail === null ? null : array_values(array_map(static fn (array $n): int => (int) $n['nodeId'], array_filter((array) ($detail['nodeList'] ?? []), static fn ($n): bool => is_array($n) && !empty($n['open']) && !empty($n['nodeId'])))), ]; } return [ 'char_id' => $charId, 'server_id' => $serverId, 'name' => (string) $profile['characterName'], 'level' => (int) ($profile['characterLevel'] ?? 0), 'class' => armory_class_name((string) ($profile['className'] ?? '')), 'class_label' => (string) ($profile['className'] ?? ''), 'equipment' => $equipment, 'equipment_missing' => armory_equip_hollow($equip), 'arcana' => $arcana, 'skills' => $skills, 'skills_missing' => armory_skills_hollow($equip), 'boards' => $boards, 'fetched_at' => date('Y-m-d H:i:s'), ]; } function gear_armory_cache_key(int $userId): string { return 'gear-import:u' . $userId; } /** Abgerufenen Charakter fuer das Uebernehmen merken (einer pro Konto). */ function gear_armory_remember(int $userId, array $data): void { db()->prepare('INSERT INTO armory_cache (cache_key, data, fetched_at) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE data = VALUES(data), fetched_at = VALUES(fetched_at)') ->execute([gear_armory_cache_key($userId), json_encode($data, JSON_UNESCAPED_UNICODE), date('Y-m-d H:i:s')]); } /** Zuletzt abgerufener Charakter (null = keiner oder abgelaufen). */ function gear_armory_remembered(int $userId): ?array { $stmt = db()->prepare('SELECT data FROM armory_cache WHERE cache_key = ? AND fetched_at > ?'); $stmt->execute([gear_armory_cache_key($userId), date('Y-m-d H:i:s', time() - GEAR_ARMORY_TTL)]); $data = json_decode((string) $stmt->fetchColumn(), true); return is_array($data) ? $data : null; } function gear_armory_forget(int $userId): void { db()->prepare('DELETE FROM armory_cache WHERE cache_key = ?')->execute([gear_armory_cache_key($userId)]); } /** * Was sich von einem Charakter in das Set uebernehmen laesst, je Teil mit Grund, falls nicht. * $class = Klasse, mit der das Set danach rechnet (die des Charakters, wenn die Klasse mit uebernommen wird). * * @return array{slots: array, arcana: array, skills: array, boards: array} */ function gear_armory_plan(array $data, ?string $class): array { // Ausruestung: nur Gegenstaende aus dem Katalog des Planers, passend zu Slot und Klasse $items = gear_items_by_ids(array_column($data['equipment'], 'id')); $manastoneStats = array_flip(gear_manastone_stats()); $slots = []; foreach (GEAR_SLOTS as $slotKey => $unused) { $entry = $data['equipment'][$slotKey] ?? null; if ($entry === null) { continue; } $item = $items[$entry['id']] ?? null; $row = ['game' => $entry, 'item' => $item, 'problem' => null, 'enchant' => 0, 'exceed' => 0, 'soul' => [], 'manastones' => [], 'skipped' => 0]; if ($item === null) { $row['problem'] = 'fehlt noch in der Gegenstandsliste des Planers'; } elseif (($mismatch = gear_item_mismatch($item, $slotKey, $class)) !== null) { $row['problem'] = $mismatch; } else { $row['enchant'] = max(0, min((int) $item['enchant_max'], $entry['enchant'])); $row['exceed'] = max(0, min((int) $item['exceed_max'], $entry['exceed'])); $detail = $entry['detail']; if ($detail !== null) { // Seelenpraegung: nur Werte, die der Gegenstand laut Katalog wuerfeln kann, in seiner Spanne $ranges = array_column($item['soul_imprint'], null, 0); foreach ($detail['soul'] as [$stat, $value]) { $range = $ranges[$stat] ?? null; if ($range !== null && $value >= (float) $range[1] - 0.005 && $value <= (float) $range[2] + 0.005) { $row['soul'][] = [$stat, $value]; } elseif ($detail['soul_random']) { $row['skipped']++; } } $soulSkills = gear_item_soul_skills($item, $class); $soulSkillLevel = max(1, (int) ($item['soul_skills']['level'] ?? 1)); foreach ($detail['soul_skills'] as [$skillId]) { if (isset($soulSkills[$skillId])) { $row['soul'][] = [GEAR_SOUL_SKILL_PREFIX . $skillId, $soulSkillLevel]; } else { $row['skipped']++; } } $row['soul'] = array_slice($row['soul'], 0, (int) $item['soul_imprint_count']); foreach ($detail['manastones'] as [$stat, $value]) { if (isset($manastoneStats[$stat]) && $value >= 1 && $value <= 9999) { $row['manastones'][] = [$stat, $value]; } else { $row['skipped']++; } } $row['manastones'] = array_slice($row['manastones'], 0, (int) $item['manastone_slots']); } } $slots[$slotKey] = $row; } // Skills: nur solche, die der Planer fuer die Klasse kennt; Stigmen hoechstens GEAR_STIGMA_SLOTS (die ausgeruesteten) $known = $class === $data['class'] ? gear_skills_for_class($class, false) : []; $skills = []; foreach (GEAR_ARMORY_SKILL_GROUPS as $kind => $label) { $list = array_values(array_filter($data['skills'], static fn (array $s): bool => $s['kind'] === $kind && $s['level'] > 0)); if ($kind === 'stigma') { usort($list, static fn (array $a, array $b): int => [!$a['equipped'], -$a['level']] <=> [!$b['equipped'], -$b['level']]); $list = array_slice($list, 0, GEAR_STIGMA_SLOTS); } $usable = array_values(array_filter($list, static fn (array $s): bool => isset($known[$s['id']]) && $known[$s['id']]['kind'] === $kind)); $skills[$kind] = [ 'label' => $label, 'list' => $usable, 'unknown' => count($list) - count($usable), 'problem' => $class !== $data['class'] ? 'gehören zu ' . ($data['class'] ?? $data['class_label']) : (!$known ? 'für ' . $class . ' gibt es im Planer noch keine Skills' : null), ]; } // Daevanion: Bretter des Planers fuer die Klasse, offene Felder nach ID $planBoards = []; if ($class !== null && $class === $data['class']) { foreach (gear_daevanion_boards($class) as $board) { $planBoards[(int) $board['id']] = $board; } } $boards = []; foreach ($data['boards'] as $board) { $planBoard = $planBoards[$board['id']] ?? null; $ids = $planBoard ? array_flip(array_map(static fn (array $n): int => (int) $n['id'], $planBoard['nodes'])) : []; $nodes = array_values(array_filter((array) $board['nodes'], static fn (int $id): bool => isset($ids[$id]))); $boards[$board['id']] = [ 'name' => $board['name'], 'open' => $board['open'], 'nodes' => $nodes, 'problem' => match (true) { $class !== $data['class'] => 'gehört zu ' . ($data['class'] ?? $data['class_label']), $planBoard === null => 'das Brett kennt der Planer (noch) nicht', $board['nodes'] === null => 'NCSoft hat die Felder gerade nicht geliefert', !$nodes => 'keine passenden Felder', default => null, }, ]; } // Arcana: Karte nach ID aus den Daten des Planers, je Art ein Platz; Skills nur aus dem Pool der Karte fuer die Klasse $arcanaData = gear_arcana_data(); $arcana = []; foreach ((array) ($data['arcana'] ?? []) as $entry) { $card = $arcanaData['cards'][$entry['id']] ?? null; $type = $card['type'] ?? null; $row = ['game' => $entry, 'card' => $card, 'enchant' => 0, 'skills' => [], 'skipped' => 0, 'problem' => match (true) { $arcanaData === null => 'die Arcana-Daten fehlen im Planer noch', $card === null => 'diese Karte kennt der Planer (noch) nicht', isset($arcana[$type]) => 'zweite Karte dieser Art', default => null, }]; if ($row['problem'] === null) { $row['enchant'] = max(0, min((int) $card['max'], (int) $entry['enchant'])); $pool = gear_arcana_pool($card, $class, $arcanaData); foreach ((array) ($entry['detail']['soul_skills'] ?? []) as $skill) { if (isset($pool[$skill[0]])) { $row['skills'][] = $skill; } else { $row['skipped']++; } } } $arcana[$type ?? 'x' . $entry['id']] = $row; } // Reihenfolge der Plaetze wie im Spiel $order = array_flip($arcanaData['types'] ?? []); uksort($arcana, static fn (string $a, string $b): int => ($order[$a] ?? 99) <=> ($order[$b] ?? 99)); return ['slots' => $slots, 'arcana' => $arcana, 'skills' => $skills, 'boards' => $boards]; } /** * Angehakte Teile ins Set schreiben. $choice: class (bool), slots (Slot-Schluessel), upgrades (Verzauberung/Durchbruch), * stones (Manasteine/Seelenpraegung), arcana (Arten wie "Grail"), skills (Arten), boards (Brett-IDs). * * @return string[] Zusammenfassung, was uebernommen wurde */ function gear_armory_apply(array $set, array $data, array $choice): array { $pdo = db(); $setId = (int) $set['id']; $done = []; $class = $set['class_name'] ?: null; if (!empty($choice['class']) && $data['class'] !== null && $data['class'] !== $class) { $pdo->prepare('UPDATE gear_sets SET class_name = ? WHERE id = ?')->execute([$data['class'], $setId]); $class = $data['class']; $set['class_name'] = $class; $done[] = 'Klasse ' . $class; } $plan = gear_armory_plan($data, $class); $pdo->beginTransaction(); $slotCount = 0; $upsert = $pdo->prepare( 'INSERT INTO gear_set_slots (set_id, slot, item_id, enchant, exceed, soul_imprint, manastones, godstone) VALUES (?, ?, ?, ?, ?, ?, ?, NULL) ON DUPLICATE KEY UPDATE item_id = VALUES(item_id), enchant = VALUES(enchant), exceed = VALUES(exceed), soul_imprint = VALUES(soul_imprint), manastones = VALUES(manastones), godstone = IF(item_id <=> VALUES(item_id), godstone, NULL)' ); foreach ((array) ($choice['slots'] ?? []) as $slotKey) { $row = $plan['slots'][$slotKey] ?? null; if ($row === null || $row['problem'] !== null) { continue; } $upgrades = !empty($choice['upgrades']); $stones = !empty($choice['stones']); $upsert->execute([ $setId, $slotKey, $row['item']['id'], $upgrades ? $row['enchant'] : 0, $upgrades ? $row['exceed'] : 0, json_encode($stones ? $row['soul'] : [], JSON_UNESCAPED_UNICODE), json_encode($stones ? $row['manastones'] : [], JSON_UNESCAPED_UNICODE), ]); $slotCount++; } $pdo->commit(); if ($slotCount) { $done[] = $slotCount . ($slotCount === 1 ? ' Slot' : ' Slots'); } // Arcana (vor den Skills: ihre Skill-Boni zaehlen bei den Stufen mit) - angehakte Arten ersetzen die Karte im Plan $arcanaTypes = array_values(array_filter((array) ($choice['arcana'] ?? []), static fn ($type): bool => is_string($type) && isset($plan['arcana'][$type]) && $plan['arcana'][$type]['problem'] === null)); if ($arcanaTypes && ($arcanaData = gear_arcana_data())) { $arcanaPlan = gear_set_plan($setId, 'arcana'); foreach ($arcanaTypes as $type) { $row = $plan['arcana'][$type]; $arcanaPlan['slots'][$type] = [ 'card' => (int) $row['card']['id'], 'enchant' => $row['enchant'], 'skills' => array_map(static fn (array $skill): array => [$skill[0], $skill[1]], $row['skills']), ]; } [$arcanaPlan] = gear_arcana_normalize($arcanaPlan, $class, $arcanaData); gear_set_plan_store($set, 'arcana', $arcanaPlan); $done[] = count($arcanaTypes) . ' Arcana'; } // Daevanion vor den Skills: dessen Boni zaehlen bei den Skillstufen mit $boardIds = array_values(array_filter(array_map('intval', (array) ($choice['boards'] ?? [])), static fn (int $id): bool => isset($plan['boards'][$id]) && $plan['boards'][$id]['problem'] === null)); if ($boardIds && $class !== null) { $nodes = (array) (gear_set_plan($setId, 'daevanion')['nodes'] ?? []); foreach ($boardIds as $boardId) { $nodes = gear_daevanion_board_action($nodes, $class, $boardId, false); $nodes = array_merge($nodes, $plan['boards'][$boardId]['nodes']); } [$daevanion] = gear_daevanion_normalize($nodes, $class); gear_set_plan_store($set, 'daevanion', $daevanion); $done[] = count($boardIds) . ' Daevanion-' . (count($boardIds) === 1 ? 'Brett' : 'Bretter'); } // Skills: Stufe im Spiel enthaelt Boni (Daevanion, Arcana, Seelenpraegung) - gespeichert wird die selbst gesteigerte $kinds = array_values(array_filter((array) ($choice['skills'] ?? []), static fn ($kind): bool => isset($plan['skills'][$kind]) && $plan['skills'][$kind]['problem'] === null)); if ($kinds) { $skills = gear_skills_for_class($class, false); $current = gear_set_skill_rows($setId); $bonuses = array_map(static fn (array $bonus): int => (int) array_sum($bonus), gear_plan_skill_bonuses($set, gear_set_plan_all($setId))); $pdo->beginTransaction(); $remove = $pdo->prepare('DELETE FROM gear_set_skills WHERE set_id = ? AND skill_id = ?'); $insert = $pdo->prepare('INSERT INTO gear_set_skills (set_id, skill_id, level, specs) VALUES (?, ?, ?, ?) ON DUPLICATE KEY UPDATE level = VALUES(level), specs = VALUES(specs)'); $count = 0; foreach ($kinds as $kind) { // Die Art wird ganz ersetzt: was der Charakter nicht gesteigert hat, faellt raus foreach ($current as $skillId => $unused) { if (($skills[$skillId]['kind'] ?? null) === $kind) { $remove->execute([$setId, $skillId]); } } foreach ($plan['skills'][$kind]['list'] as $skill) { $level = max(0, min(gear_skill_level_max($kind), $skill['level'] - ($bonuses[$skill['id']] ?? 0))); if ($level === 0) { continue; } $specs = gear_skill_has_specs($kind) ? gear_skill_specs_clean((int) ($current[$skill['id']]['specs'] ?? 0), gear_skill_effective_level($kind, $level, $bonuses[$skill['id']] ?? 0)) : 0; $insert->execute([$setId, $skill['id'], $level, $specs]); $count++; } } $pdo->commit(); $done[] = $count . ' Skills'; } $pdo->prepare('UPDATE gear_sets SET updated_at = NOW() WHERE id = ?')->execute([$setId]); return $done; } /** Alle Plaene eines Sets ([Seite => Plan]). */ function gear_set_plan_all(int $setId): array { return gear_set_plans([$setId])[$setId] ?? []; } /** Eigene, mit dem Spiel verknuepfte Profil-Charaktere (fuer die Schnellauswahl im Dialog). */ function gear_armory_own_characters(int $userId): array { $stmt = db()->prepare( 'SELECT name, class_name, level, aion_char_id, aion_server_id FROM member_characters WHERE user_id = ? AND aion_char_id IS NOT NULL ORDER BY is_main DESC, name' ); $stmt->execute([$userId]); return $stmt->fetchAll(); } /** Icon eines Gegenstands fuer die Vorschau: aus dem Katalog, sonst das von NCSoft. */ function gear_armory_item_icon(?array $item, array $game): ?string { if ($item && !empty($item['icon']) && is_file(GEAR_ICON_DIR . $item['icon'])) { return gear_icon_url($item); } return armory_icon_url((string) $game['icon']); } /** Icon eines Skills fuer die Vorschau: aus dem Skillplaner, sonst das von NCSoft. */ function gear_armory_skill_icon(array $skill, array $known): ?string { $row = $known[$skill['id']] ?? null; if ($row && !empty($row['icon']) && is_file(GEAR_SKILL_ICON_DIR . $row['icon'])) { return gear_skill_icon_url($row); } return armory_icon_url((string) ($skill['icon'] ?? '')); } /** * Ein Daevanion-Brett klein und nur zum Ansehen (Felder wie auf der Seite Daevanion, includes/gear_planner_view.php): * die freigeschalteten Felder des Charakters leuchten. */ function gear_armory_board_html(array $board, array $nodeIds, array $skills, string $class): string { $chosen = array_flip($nodeIds); foreach ($board['nodes'] as $node) { if ($node['type'] === 'start') { $chosen[(int) $node['id']] = true; // das Startfeld ist immer offen } } $at = []; foreach ($board['nodes'] as $node) { $at[$node['r'] . ',' . $node['c']] = (int) $node['id']; } $rows = array_column($board['nodes'], 'r'); $cols = array_column($board['nodes'], 'c'); $minR = min($rows); $minC = min($cols); $html = '
'; foreach ($board['nodes'] as $node) { $html .= gear_daevanion_node_html($node, $minR, $minC, $chosen, $at, $skills, $class, false); } return $html . '
'; } /** * Vorschau im Dialog "Aus dem Spiel" (gear.php) als Assistent: Ausruestung, Skills, Daevanion, Uebernehmen * (Schritte blaettert assets/js/gear.js). Alles Passende ist angehakt. Ohne die Klasse des Charakters lassen sich * Skills, Daevanion und fremde Waffen nicht uebernehmen (gear.js sperrt sie, sobald der Klassenwechsel abgewaehlt ist). */ function gear_armory_preview_html(array $set, array $data): string { $setClass = $set['class_name'] ?: null; $classDiffers = $data['class'] !== null && $data['class'] !== $setClass; $class = $classDiffers ? $data['class'] : $setClass; $plan = gear_armory_plan($data, $class); $known = $class !== null ? gear_skills_for_class($class, false) : []; $planBoards = []; if ($class !== null && $class === $data['class']) { foreach (gear_daevanion_boards($class) as $board) { $planBoards[(int) $board['id']] = $board; } } $boardSkills = $class !== null ? gear_plan_class_skills($class) : []; $check = static fn (string $name, string $value, bool $enabled, string $extra = ''): string => ''; $needsClass = static fn (bool $needs): string => $needs ? ' data-gear-armory-needs-class' : ''; $usableSlots = count(array_filter($plan['slots'], static fn (array $row): bool => $row['problem'] === null)); ob_start(); ?>

/ Slots übernehmbar