forked from xziino/ff14-mitigator
superbolide fix
This commit is contained in:
parent
243cb0608c
commit
b5445da02a
@ -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,
|
||||||
|
|||||||
@ -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 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user