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.
This commit is contained in:
69
SVSim.BattleEngine/Engine/Cute/PaymentPCFinishTask.cs
Normal file
69
SVSim.BattleEngine/Engine/Cute/PaymentPCFinishTask.cs
Normal file
@@ -0,0 +1,69 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user