Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard/SkinProductDetail.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

66 lines
2.5 KiB
C#

using Cute;
using UnityEngine;
using Wizard.Scripts.Network.Data.TaskData.SkinPurchase;
namespace Wizard;
public class SkinProductDetail : BaseProductDetail
{
private const int WIDTH_PRODUCT_IMG_NORMAL = 249;
private const int HEIGHT_PRODUCT_IMG_NORMAL = 199;
private const int WIDTH_PRODUCT_IMG_LARGE = 370;
private const int HEIGHT_PRODUCT_IMG_LARGE = 213;
[SerializeField]
private GameObject _detailObjsParent;
[SerializeField]
private ProductDetailPlate _productTemplate;
public void SetMultiProductDetail(SkinSeriesPurchaseInfo seriesInfo)
{
Texture textureProductImage = Toolbox.ResourcesManager.LoadObject<Texture>(Toolbox.ResourcesManager.GetAssetTypePath(seriesInfo.saleInfo.path, ResourcesManager.AssetLoadPathType.ShopClassSkin, isfetch: true));
SetProductDetail(textureProductImage, seriesInfo.rewardInfoList);
if (Data.Master.LeaderSkinSeriesIdDic[seriesInfo.series_id].IsLargeImage)
{
_texProductImg.width = 370;
_texProductImg.height = 213;
}
else
{
_texProductImg.width = 249;
_texProductImg.height = 199;
}
_SetMultiSupplyList(seriesInfo);
ResetPositionScrollView();
}
public void SetSingleProductDetail(SkinProductInfo productInfo, string descriptionText = null)
{
_productTemplate.gameObject.SetActive(value: false);
Texture textureProductImage = Toolbox.ResourcesManager.LoadObject<Texture>(Toolbox.ResourcesManager.GetAssetTypePath(productInfo.saleInfo.path, ResourcesManager.AssetLoadPathType.ClassCharaSkinThumbnail, isfetch: true));
SetProductDetail(textureProductImage, productInfo.rewardInfoList, descriptionText);
}
private void _SetMultiSupplyList(SkinSeriesPurchaseInfo info)
{
bool flag = info.is_completed && info._rewardStatus != SkinSeriesPurchaseInfo.RewardStatus.not_got;
for (int i = 0; i < info.productList.Count; i++)
{
SkinProductInfo skinProductInfo = info.productList[i];
if (!skinProductInfo.is_purchased || flag)
{
GameObject obj = NGUITools.AddChild(_detailObjsParent.gameObject, _productTemplate.gameObject);
obj.transform.localPosition = Vector3.up * TailPosY;
ProductDetailPlate component = obj.GetComponent<ProductDetailPlate>();
ClassCharacterMasterData charaPrmBySkinId = GameMgr.GetIns().GetDataMgr().GetCharaPrmBySkinId(skinProductInfo.leader_skin_id);
TailPosY -= component.SetProductData(skinProductInfo.saleInfo.name, charaPrmBySkinId, skinProductInfo.rewardInfoList);
}
}
_productTemplate.gameObject.SetActive(value: false);
}
}