Files
SVSimServer/SVSim.BattleEngine/Engine/Cute/PaymentPCFinishTask.cs
gamer147 957af3d1ec feat(battle-engine): full Unity/VFX/god-object shims + expanded copy closure (2570 files)
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.
2026-06-05 17:22:20 -04:00

70 lines
2.4 KiB
C#

using Wizard;
namespace Cute;
public class PaymentPCFinishTask : NetworkTask
{
public class PaymentPCFinishParams : PostParams
{
public string product_id = "";
public string steam_app_id = "";
public string steam_order_id = "";
public string steam_user_country = "";
}
private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.PaymentPCFinish;
public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}";
public void SetParameter(string ProductId, string StreamAppID = "", string SteamOrderId = "")
{
PaymentPCFinishParams paymentPCFinishParams = new PaymentPCFinishParams();
paymentPCFinishParams.product_id = ProductId;
paymentPCFinishParams.steam_app_id = StreamAppID;
paymentPCFinishParams.steam_order_id = SteamOrderId;
paymentPCFinishParams.steam_user_country = PCPlatformSTEAM.Country;
base.Params = paymentPCFinishParams;
}
protected override int Parse()
{
int num = base.Parse();
if (num != 1)
{
return num;
}
if (base.ResponseData["data"].Count > 0)
{
if (base.ResponseData["data"]["purchased_times_data"] != null)
{
Data.Load.data._userCrystalCount._lastPaymentItemBuyNumber = base.ResponseData["data"]["purchased_times_data"]["number_of_product_purchased"].ToInt();
if (base.ResponseData["data"]["purchased_times_data"].Keys.Contains("csv_data_id"))
{
Data.Load.data._userCrystalCount._lastPaymentId = base.ResponseData["data"]["purchased_times_data"]["csv_data_id"].ToString();
}
}
else
{
Data.Load.data._userCrystalCount._lastPaymentItemBuyNumber = 0;
Data.Load.data._userCrystalCount._lastPaymentId = null;
}
Data.Load.data._userCrystalCount.total_crystal = base.ResponseData["data"]["after_free_crystal"].ToInt() + base.ResponseData["data"]["after_crystal"].ToInt();
Data.Load.data._userCrystalCount.free_crystal = base.ResponseData["data"]["after_free_crystal"].ToInt();
Data.Load.data._userCrystalCount.charge_crystal = base.ResponseData["data"]["after_crystal"].ToInt();
MyPageMenu.Instance.UpdateCrystalCount();
if (CreateItemList.GetInstance() != null)
{
CreateItemList.GetInstance().UpdateCrystalCount();
}
if (GachaUI.GetInstance() != null)
{
GachaUI.GetInstance().UpdateUserItemCount();
}
}
return num;
}
}