No maps found.
Map
Min Level
Max Level
Faction
@foreach($maps as $map)
@php
$slug = (string) ($map['slug'] ?? '');
$href = url('/wiki/' . $game . '/maps/' . $slug);
$name = (string) ($map['name'] ?? $slug);
$icon = (string) ($map['icon'] ?? '');
$fallbackIcon = $game === 'Twelve Sky 1' ? '/images/home/ts1/maps.jpg' : '/images/home/ts2/maps.jpg';
$iconSrc = $icon !== '' ? $icon : $fallbackIcon;
$faction = (string) ($map['faction_effective'] ?? ($map['faction'] ?? 'All Factions'));
$factionKey = strtolower(trim($faction));
$isRedFaction = filter_var($map['pvp'] ?? ($map['is_pvp'] ?? false), FILTER_VALIDATE_BOOLEAN)
|| in_array($factionKey, ['pvp', 'war', 'pvp areas'], true);
$facClass = $isRedFaction
? 'wk-f-pvp'
: ('wk-f-' . strtolower(trim(preg_replace('/\s+/', '-', $faction))));
$factionShort = match ($factionKey) {
'guanyin' => 'G',
'fujin' => 'F',
'jinong' => 'J',
'nangin' => 'N',
'pvp', 'pvp areas', 'war' => 'PVP',
'all factions' => 'A',
default => strtoupper(substr($faction, 0, 1)),
};
$nameClass = strtolower(trim($faction)) === 'all factions' ? '' : $facClass;
if ($isRedFaction) {
$nameClass = 'wk-map-pvp';
}
$minLv = $map['min_entrance_level'] ?? null;
$maxLv = $map['max_entrance_level'] ?? null;
@endphp
{{ $name }}
{{ $minLv !== null && $minLv !== '' ? (int) $minLv : '-' }}
{{ $maxLv !== null && $maxLv !== '' ? (int) $maxLv : '-' }}
{{ $faction !== '' ? $faction : '-' }}
{{ $factionShort }}
@endforeach
@if($maps->lastPage() > 1)
@endif
@endif