diff --git a/SVSimLoader/CaptureWriter.cs b/SVSimLoader/CaptureWriter.cs index 2015106..fd5a23c 100644 --- a/SVSimLoader/CaptureWriter.cs +++ b/SVSimLoader/CaptureWriter.cs @@ -131,6 +131,17 @@ internal static class CaptureWriter try { + // SetResponseData hands us the FULL response envelope { data_headers, data }; the + // viewer payload (user_info, user_crystal_count, user_card_list, ...) lives under the + // inner `data` key. Descend into it before extracting — same as + // ExaminationPatches.TryExtractSpecialBattleSettings does. Without this every SafeGet + // below misses and the dump contains nothing but steam_id. The inner payload has no + // top-level `data` key of its own, so this is safe if a caller ever pre-strips it. + if (loadIndexData != null && loadIndexData.IsObject && loadIndexData.Keys.Contains("data")) + { + loadIndexData = loadIndexData["data"]; + } + var dump = new Dictionary { { "steam_id", _lastSeenSteamId } diff --git a/SVSimLoader/Patches/ExaminationPatches.cs b/SVSimLoader/Patches/ExaminationPatches.cs index 13ce38a..cfca631 100644 --- a/SVSimLoader/Patches/ExaminationPatches.cs +++ b/SVSimLoader/Patches/ExaminationPatches.cs @@ -23,8 +23,9 @@ public static class ExaminationPatches } if (SvSimConfig.DumpUserData && __instance.Url != null && __instance.Url.EndsWith("/load/index")) { - // The /load/index response data is the inner `data` payload by this point — the - // outer `data_headers` wrapper has already been stripped by the network task base. + // `data` is the FULL envelope { data_headers, data } (see TryExtractSpecialBattleSettings + // + NetworkTask.cs:108-110). WriteUserDataFromLoadIndex descends into the inner `data` + // key itself, so pass the envelope as-is. CaptureWriter.WriteUserDataFromLoadIndex(data); } if (SvSimConfig.SweepLeaderSkinPools && __instance.Url != null && __instance.Url.EndsWith("/pack/info"))