diff --git a/hwe/compare/turn_state_snapshot.php b/hwe/compare/turn_state_snapshot.php index 46bcf32e..ec218135 100644 --- a/hwe/compare/turn_state_snapshot.php +++ b/hwe/compare/turn_state_snapshot.php @@ -330,6 +330,17 @@ function comparisonTurnStateSnapshot(array $request): array $result[$key] = comparisonOptionalCode($result[$key] ?? null); } $result['maxBelong'] = (int)($result['meta']['max_belong'] ?? 0); + $ownerId = (int)($row['owner'] ?? 0); + $activeActionPoints = 0; + if ($ownerId > 0) { + $inheritanceStorage = KVStorage::getStorage(DB::db(), "inheritance_{$ownerId}"); + $inheritanceStorage->resetCache(); + $stored = $inheritanceStorage->getValue('active_action'); + if (is_array($stored) && (is_int($stored[0] ?? null) || is_float($stored[0] ?? null))) { + $activeActionPoints = $stored[0]; + } + } + $result['inheritActiveActionPoints'] = $activeActionPoints; return $result; }, comparisonRowsById('general', 'no', $generalIds),