diff --git a/SVSimLoader/Patches/UrlPatches.cs b/SVSimLoader/Patches/UrlPatches.cs index f617af5..511c6b0 100644 --- a/SVSimLoader/Patches/UrlPatches.cs +++ b/SVSimLoader/Patches/UrlPatches.cs @@ -14,4 +14,20 @@ public static class UrlPatches __result = SvSimConfig.ApplicationUrl; return false; } + + /// + /// Redirects the deck-builder server (shadowverse-portal.com in prod) to our app server so + /// the deck-code mint/resolve pair lands on the emulator's DeckBuilderController. + /// Both client tasks (GenerateDeckCodeTask, GetDeckDataFromCodeTask) build + /// their URL as GetDeckBuilderServerURL() + ApiList[type] where the right-hand side + /// is the bare deck_code?format=msgpack / deck?format=msgpack path — matches + /// our controller routes once this prefix returns the local server's base URL. + /// + [HarmonyPatch(typeof(CustomPreference), nameof(CustomPreference.GetDeckBuilderServerURL))] + [HarmonyPrefix] + public static bool GetDeckBuilderServerURL(ref string __result) + { + __result = SvSimConfig.ApplicationUrl; + return false; + } } \ No newline at end of file