loader: patch GetDeckBuilderServerURL to point at the app server
Redirects shadowverse-portal.com deck-builder calls to SvSimConfig.ApplicationUrl so the GenerateDeckCodeTask / GetDeckDataFromCodeTask URLs land on the emulator's DeckBuilderController routes (/deck_code, /deck). Both client call sites already pass encrypt:false to NetworkManager.Connect, so no additional encryption-side patch is needed. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -14,4 +14,20 @@ public static class UrlPatches
|
||||
__result = SvSimConfig.ApplicationUrl;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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 <c>DeckBuilderController</c>.
|
||||
/// Both client tasks (<c>GenerateDeckCodeTask</c>, <c>GetDeckDataFromCodeTask</c>) build
|
||||
/// their URL as <c>GetDeckBuilderServerURL() + ApiList[type]</c> where the right-hand side
|
||||
/// is the bare <c>deck_code?format=msgpack</c> / <c>deck?format=msgpack</c> path — matches
|
||||
/// our controller routes once this prefix returns the local server's base URL.
|
||||
/// </summary>
|
||||
[HarmonyPatch(typeof(CustomPreference), nameof(CustomPreference.GetDeckBuilderServerURL))]
|
||||
[HarmonyPrefix]
|
||||
public static bool GetDeckBuilderServerURL(ref string __result)
|
||||
{
|
||||
__result = SvSimConfig.ApplicationUrl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user