Gear-Planer Guide: Info-Blase zu jedem Gegenstand der Ausruestung (Werte bei Aufwertung/Durchbruch, Seelenpraegung, Manasteine, Goetterstein)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c0fcb860a8
commit
70bc1aa4f7
3 changed files with 75 additions and 3 deletions
|
|
@ -7978,6 +7978,19 @@ button.gear-macro-cell-button:hover, button.gear-macro-cell-button:focus-visible
|
||||||
/* Werte, die mit der Stufe wachsen */
|
/* Werte, die mit der Stufe wachsen */
|
||||||
.gear-tip-val { color: #7ddc8a; font-weight: 600; }
|
.gear-tip-val { color: #7ddc8a; font-weight: 600; }
|
||||||
.gear-tip-note { margin-top: 0.35rem; color: var(--text-muted); font-size: 0.7rem; }
|
.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 { 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-on, .gear-tip-state.is-open { color: #7ddc8a; }
|
||||||
.gear-tip-state.is-budget { color: #f08a86; }
|
.gear-tip-state.is-budget { color: #f08a86; }
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ function gear_slot_silhouette(string $slotKey): string
|
||||||
*
|
*
|
||||||
* @param array<string, array> $slots Slots eines Sets (gear_slots_for_sets)
|
* @param array<string, 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 = '<span class="gear-doll gear-doll-mini' . ($column ? ' gear-doll-column' : '') . '">';
|
$html = '<span class="gear-doll gear-doll-mini' . ($column ? ' gear-doll-column' : '') . '">';
|
||||||
foreach (GEAR_DOLL_ORDER as $slotKey) {
|
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;
|
$item = $row['item'] ?? null;
|
||||||
$label = GEAR_SLOTS[$slotKey][0];
|
$label = GEAR_SLOTS[$slotKey][0];
|
||||||
$tip = $label . ': ' . ($item ? $item['name'] . ((int) $row['enchant'] > 0 ? ' +' . (int) $row['enchant'] : '') : 'leer');
|
$tip = $label . ': ' . ($item ? $item['name'] . ((int) $row['enchant'] > 0 ? ' +' . (int) $row['enchant'] : '') : 'leer');
|
||||||
$html .= '<span class="gear-doll-slot' . ($item ? ' is-filled ' . e(gear_grade_class($item['grade'])) : '') . '" title="' . e($tip) . '">';
|
// 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 .= '<span class="gear-doll-slot' . ($item ? ' is-filled ' . e(gear_grade_class($item['grade'])) : '') . '"' . $tipAttrs . '>'
|
||||||
|
. ($tips && $item ? gear_item_tip_src_html($slotKey, $row) : '');
|
||||||
$iconUrl = gear_icon_url($item);
|
$iconUrl = gear_icon_url($item);
|
||||||
if ($item && $iconUrl) {
|
if ($item && $iconUrl) {
|
||||||
$html .= '<img src="' . e($iconUrl) . '" alt="" loading="lazy">';
|
$html .= '<img src="' . e($iconUrl) . '" alt="" loading="lazy">';
|
||||||
|
|
@ -119,6 +122,62 @@ function gear_doll_mini_html(array $slots, bool $column = false): string
|
||||||
return $html . '</span>';
|
return $html . '</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 = '<span class="gear-tip-src" hidden>'
|
||||||
|
. '<span class="gear-tip-head"><strong class="' . e(gear_grade_class($item['grade'])) . '">' . e($item['name']) . '</strong>'
|
||||||
|
. ($enchant > 0 ? '<span class="gear-tip-enchant">+' . $enchant . '</span>' : '') . '</span>'
|
||||||
|
. '<span class="gear-tip-meta">' . e(implode(' · ', $meta)) . '</span>';
|
||||||
|
if ($stats) {
|
||||||
|
$html .= '<span class="gear-tip-stats">';
|
||||||
|
foreach ($stats as $stat) {
|
||||||
|
$html .= '<span><span>' . e($stat['name']) . '</span><b>' . ($stat['estimated'] ? '≈ ' : '') . e(gear_format_value($stat['value'], $stat['unit'])) . '</b></span>';
|
||||||
|
}
|
||||||
|
$html .= '</span>';
|
||||||
|
}
|
||||||
|
if ($row['soul_imprint']) {
|
||||||
|
$html .= '<span class="gear-tip-group">Seelenprägung</span><span class="gear-tip-chips">';
|
||||||
|
foreach ($row['soul_imprint'] as $entry) {
|
||||||
|
$html .= '<i>' . e(gear_soul_entry_label($entry)) . '</i>';
|
||||||
|
}
|
||||||
|
$html .= '</span>';
|
||||||
|
}
|
||||||
|
if ($row['manastones']) {
|
||||||
|
$html .= '<span class="gear-tip-group">Manasteine</span><span class="gear-tip-chips is-stones">';
|
||||||
|
foreach ($row['manastones'] as [$stat, $value]) {
|
||||||
|
$html .= '<i>' . e($stat) . ' +' . (int) $value . '</i>';
|
||||||
|
}
|
||||||
|
$html .= '</span>';
|
||||||
|
}
|
||||||
|
if (!empty($row['godstone'])) {
|
||||||
|
$html .= '<span class="gear-tip-group">Götterstein</span><span class="gear-tip-chips is-god"><i>' . e((string) $row['godstone']) . '</i></span>';
|
||||||
|
}
|
||||||
|
return $html . '</span>';
|
||||||
|
}
|
||||||
|
|
||||||
// In der Nebenhand traegt in Aion 2 jede Klasse einen Schutz (Guard, Spiel-Slot SubHand) - zwei
|
// 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.
|
// Waffen gibt es nicht. Aeltere Sets mit einer Waffe dort behalten sie, sie wird nur markiert.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -910,7 +910,7 @@ function gear_render_guide_tab(array $set, bool $isOwn, array $slots, array $pla
|
||||||
<strong><?= $enchants ? '+' . e(number_format(array_sum($enchants) / count($enchants), 1, ',', '.')) : '–' ?></strong>
|
<strong><?= $enchants ? '+' . e(number_format(array_sum($enchants) / count($enchants), 1, ',', '.')) : '–' ?></strong>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gear-guide-gear-doll"><?= gear_doll_mini_html($slots) ?></div>
|
<div class="gear-guide-gear-doll"><?= gear_doll_mini_html($slots, false, true) ?></div>
|
||||||
<?php if ($topStats): ?>
|
<?php if ($topStats): ?>
|
||||||
<ul class="gear-guide-gear-totals">
|
<ul class="gear-guide-gear-totals">
|
||||||
<?php foreach ($topStats as $row): ?>
|
<?php foreach ($topStats as $row): ?>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue