Gear-Planer Guide: Vorschlaege der Stats-Prioritaet ueber die Spiel-Slots der Gegenstaende (Torso, Necklace …) zuordnen - bisher kamen nur die Manasteine
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e05f303719
commit
5deae39ef7
1 changed files with 8 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue