Authored Unity primitive/object-model shim, VFX layer (control-flow-preserving, InstantVfx never invokes its action -- headless suppression), god-object stubs (GameMgr/EffectMgr/UIManager with faithfully-extracted nested enums), View/UI/Touch tree, LitJson+BetterList+Tuple copied, third-party stubs. Discovered Roslyn header-error masking: fixing class-header type errors unmasks body references, so the true copy closure is ~2570 files (was 782 under masking). Errors: masked-25720 -> 268; our shim files compile clean. Remaining: ~50 residual shim/external types, 24 NGUI UI-base overrides, static-type fixes, plus likely 1-2 more unmask waves.
48 lines
1.2 KiB
C#
48 lines
1.2 KiB
C#
using LitJson;
|
|
|
|
namespace Cute;
|
|
|
|
public class UpdateiCloudUserDataTask : NetworkTask
|
|
{
|
|
private class iCloudUserParams : PostParams
|
|
{
|
|
public string carrier = "";
|
|
|
|
public string icloud_data = "";
|
|
}
|
|
|
|
private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.MigrateiCloudUser;
|
|
|
|
public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}";
|
|
|
|
public void SetParameter(string iCloudData)
|
|
{
|
|
iCloudUserParams iCloudUserParams = new iCloudUserParams();
|
|
iCloudUserParams.icloud_data = iCloudData;
|
|
iCloudUserParams.carrier = Toolbox.DeviceManager.GetCarrier();
|
|
base.Params = iCloudUserParams;
|
|
}
|
|
|
|
protected override int Parse()
|
|
{
|
|
if (resultCode != 1)
|
|
{
|
|
return base.Parse();
|
|
}
|
|
JsonData jsonData = base.ResponseData["data_headers"];
|
|
int viewerId = jsonData["viewer_id"].ToInt();
|
|
int shortUdid = jsonData["short_udid"].ToInt();
|
|
string text = jsonData["udid"].ToString();
|
|
if (Certification.Udid != text)
|
|
{
|
|
Debug.LogError("udid一致しません。不正のアクセスです。");
|
|
}
|
|
else
|
|
{
|
|
Certification.ViewerId = viewerId;
|
|
Certification.ShortUdid = shortUdid;
|
|
}
|
|
return resultCode;
|
|
}
|
|
}
|