From 70bc1aa4f75360ba7d3e9b7d2c27b8fd19168098 Mon Sep 17 00:00:00 2001 From: Maaxxs <61059039+MaaxxsDev@users.noreply.github.com> Date: Sun, 18 Oct 2026 21:09:39 +0200 Subject: [PATCH] Gear-Planer Guide: Info-Blase zu jedem Gegenstand der Ausruestung (Werte bei Aufwertung/Durchbruch, Seelenpraegung, Manasteine, Goetterstein) Co-Authored-By: Claude Opus 5.5 --- assets/css/style.css | 13 +++++++++ includes/gear.php | 63 +++++++++++++++++++++++++++++++++++++++-- includes/gear_guide.php | 2 +- 3 files changed, 75 insertions(+), 3 deletions(-) diff --git a/assets/css/style.css b/assets/css/style.css index 3fd6718..04d729a 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -7978,6 +7978,19 @@ button.gear-macro-cell-button:hover, button.gear-macro-cell-button:focus-visible /* Werte, die mit der Stufe wachsen */ .gear-tip-val { color: #7ddc8a; font-weight: 600; } .gear-tip-note { margin-top: 0.35rem; color: var(--text-muted); font-size: 0.7rem; } +/* Info-Blase zu einem Gegenstand der Ausruestung (Guide, includes/gear.php gear_item_tip_src_html) */ +.gear-tip .gear-tip-head strong[class*="grade-"] { color: var(--grade); } +.gear-tip .gear-tip-meta { display: block; } +.gear-tip-enchant { color: #ffd76a; font-size: 0.82rem; font-weight: 700; } +.gear-tip-stats { display: grid; gap: 0.1rem; margin-top: 0.45rem; font-size: 0.76rem; } +.gear-tip-stats > span { display: flex; justify-content: space-between; gap: 1rem; } +.gear-tip-stats b { color: var(--text); } +.gear-tip-group { display: block; margin-top: 0.5rem; color: var(--text-muted); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; } +.gear-tip-chips { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.2rem; } +.gear-tip-chips i { padding: 0 0.35rem; border-radius: 4px; background: rgba(201, 162, 39, 0.14); color: #e3bd6e; font-size: 0.72rem; font-style: normal; line-height: 1.6; } +.gear-tip-chips.is-stones i { background: rgba(92, 160, 255, 0.14); color: #9cc6ff; } +.gear-tip-chips.is-god i { background: rgba(212, 108, 255, 0.14); color: #e2b3ff; } +.gear-guide-gear-doll .gear-doll-slot[data-skill-tip] { cursor: help; } .gear-tip-state { margin-top: 0.3rem; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); } .gear-tip-state.is-on, .gear-tip-state.is-open { color: #7ddc8a; } .gear-tip-state.is-budget { color: #f08a86; } diff --git a/includes/gear.php b/includes/gear.php index d94f436..ba8b501 100644 --- a/includes/gear.php +++ b/includes/gear.php @@ -94,7 +94,7 @@ function gear_slot_silhouette(string $slotKey): string * * @param array $slots Slots eines Sets (gear_slots_for_sets) */ -function gear_doll_mini_html(array $slots, bool $column = false): string +function gear_doll_mini_html(array $slots, bool $column = false, bool $tips = false): string { $html = ''; foreach (GEAR_DOLL_ORDER as $slotKey) { @@ -102,7 +102,10 @@ function gear_doll_mini_html(array $slots, bool $column = false): string $item = $row['item'] ?? null; $label = GEAR_SLOTS[$slotKey][0]; $tip = $label . ': ' . ($item ? $item['name'] . ((int) $row['enchant'] > 0 ? ' +' . (int) $row['enchant'] : '') : 'leer'); - $html .= ''; + // Mit $tips (Guide): Info-Blase wie bei den Skills (assets/js/gear.js, data-skill-tip) statt des einfachen Titels + $tipAttrs = $tips && $item ? ' data-skill data-skill-tip tabindex="0" aria-label="' . e($tip) . '"' : ' title="' . e($tip) . '"'; + $html .= '' + . ($tips && $item ? gear_item_tip_src_html($slotKey, $row) : ''); $iconUrl = gear_icon_url($item); if ($item && $iconUrl) { $html .= ''; @@ -119,6 +122,62 @@ function gear_doll_mini_html(array $slots, bool $column = false): string return $html . ''; } +/** + * Inhalt der Info-Blase zu einem belegten Slot (assets/js/gear.js): Name in der Farbe der Seltenheit mit Aufwertung, + * Slot, Art und Gegenstandsstufe, die Werte bei Aufwertung/Durchbruch (Grundwert + Aufwertung zusammengezaehlt), + * Seelenpraegung, Manasteine und Goetterstein so, wie sie im Set eingetragen sind. + */ +function gear_item_tip_src_html(string $slotKey, array $row): string +{ + $item = $row['item']; + $enchant = (int) $row['enchant']; + $exceed = (int) ($row['exceed'] ?? 0); + $stats = []; + foreach (gear_slot_contributions($row, $item) as $c) { + if (in_array($c['source'], ['base', 'enchant', 'exceed'], true)) { + $key = $c['name'] . '|' . $c['unit']; + $stats[$key] = ($stats[$key] ?? ['name' => $c['name'], 'unit' => $c['unit'], 'value' => 0.0, 'estimated' => false]); + $stats[$key]['value'] += $c['value']; + $stats[$key]['estimated'] = $stats[$key]['estimated'] || $c['estimated']; + } + } + $meta = array_filter([ + GEAR_SLOTS[$slotKey][0], + gear_type_label((string) $item['item_type']), + (int) $item['item_level'] > 0 ? 'Stufe ' . (int) $item['item_level'] : '', + $exceed > 0 ? 'Durchbruch ' . $exceed : '', + ], static fn (string $part): bool => $part !== ''); + $html = ''; +} + // In der Nebenhand traegt in Aion 2 jede Klasse einen Schutz (Guard, Spiel-Slot SubHand) - zwei // Waffen gibt es nicht. Aeltere Sets mit einer Waffe dort behalten sie, sie wird nur markiert. diff --git a/includes/gear_guide.php b/includes/gear_guide.php index ed1f876..95383a9 100644 --- a/includes/gear_guide.php +++ b/includes/gear_guide.php @@ -910,7 +910,7 @@ function gear_render_guide_tab(array $set, bool $isOwn, array $slots, array $pla -
+