From 5deae39ef74f7b910916dd52fc9a72cc3913b8dd Mon Sep 17 00:00:00 2001 From: Maaxxs <61059039+MaaxxsDev@users.noreply.github.com> Date: Sat, 17 Oct 2026 19:26:33 +0200 Subject: [PATCH] =?UTF-8?q?Gear-Planer=20Guide:=20Vorschlaege=20der=20Stat?= =?UTF-8?q?s-Prioritaet=20ueber=20die=20Spiel-Slots=20der=20Gegenstaende?= =?UTF-8?q?=20(Torso,=20Necklace=20=E2=80=A6)=20zuordnen=20-=20bisher=20ka?= =?UTF-8?q?men=20nur=20die=20Manasteine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- includes/gear_guide.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/includes/gear_guide.php b/includes/gear_guide.php index 931eeff..aed3c04 100644 --- a/includes/gear_guide.php +++ b/includes/gear_guide.php @@ -124,8 +124,15 @@ function gear_guide_normalize(array $raw): array function gear_guide_stat_options(): array { $groups = array_fill_keys(array_keys(GEAR_GUIDE_STAT_GROUPS), []); + // gear_items.slot ist der Slot aus dem Spiel ("Torso", "Necklace" …) - dritter Eintrag in GEAR_SLOTS + $slotGroups = []; + foreach (GEAR_SLOTS as $slotKey => [, $slotGroup, $gameSlots]) { + foreach (array_merge([$slotKey], $gameSlots) as $name) { + $slotGroups[$name] = GEAR_GUIDE_SLOT_GROUPS[$slotGroup] ?? null; + } + } foreach (db()->query('SELECT slot, data FROM gear_items')->fetchAll() as $row) { - $group = GEAR_GUIDE_SLOT_GROUPS[GEAR_SLOTS[$row['slot']][1] ?? ''] ?? null; + $group = $slotGroups[$row['slot']] ?? null; if ($group === null) { continue; }