superbolide fix

This commit is contained in:
Akurosia Kamo 2026-05-24 09:41:04 +02:00
parent 243cb0608c
commit b5445da02a
2 changed files with 5 additions and 1 deletions

View File

@ -393,6 +393,9 @@ foreach ($allEvents as $ev) {
$tgtId = (int)($ev['targetID'] ?? 0); $tgtId = (int)($ev['targetID'] ?? 0);
if (!$abId || !$tgtId || $abId <= 7) continue; if (!$abId || !$tgtId || $abId <= 7) continue;
$srcId = (int)($ev['sourceID'] ?? 0);
if ($srcId > 0 && isset($players[$srcId])) continue;
$byAbility[$abId][] = [ $byAbility[$abId][] = [
'ts' => (float)($ev['timestamp'] ?? 0), 'ts' => (float)($ev['timestamp'] ?? 0),
'tgtId' => $tgtId, 'tgtId' => $tgtId,

View File

@ -2,6 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
const CACHED_LOG_DIR = __DIR__ . '/../cached_logs'; const CACHED_LOG_DIR = __DIR__ . '/../cached_logs';
const CACHED_LOG_VERSION = 'v2';
function cache_language(string $language): string { function cache_language(string $language): string {
$language = strtolower(trim($language)); $language = strtolower(trim($language));
@ -25,7 +26,7 @@ function cached_log_path(string $kind, string $reportCode, string $language, arr
$safeParts = array_map('cache_key_part', $parts); $safeParts = array_map('cache_key_part', $parts);
$suffix = $safeParts ? '_' . implode('_', $safeParts) : ''; $suffix = $safeParts ? '_' . implode('_', $safeParts) : '';
return CACHED_LOG_DIR . '/' . $reportCode . '/' . $language . '/' . $kind . $suffix . '.json'; return CACHED_LOG_DIR . '/' . CACHED_LOG_VERSION . '/' . $reportCode . '/' . $language . '/' . $kind . $suffix . '.json';
} }
function read_cached_log(string $kind, string $reportCode, string $language, array $parts = []): ?string { function read_cached_log(string $kind, string $reportCode, string $language, array $parts = []): ?string {