feat(battle-engine): EffectType full enum + collection/card/vfx extension copies
Replaces partial EffectMgr.EffectType with all 226 decomp values; copies the IsNotNullOrEmpty/EquelsID/FindFromCardId/GetAllFuncVfxResults extension files + UI extensions; adds Renderer/MeshFilter shared-material/mesh/sortingOrder. Compile loop then closed the revealed deps (3242 files). 9.1k -> 18 errors.
This commit is contained in:
12
SVSim.BattleEngine/Engine/Cute/IEnumerableExtensions.cs
Normal file
12
SVSim.BattleEngine/Engine/Cute/IEnumerableExtensions.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Cute;
|
||||
|
||||
public static class IEnumerableExtensions
|
||||
{
|
||||
public static bool IsNotNullOrEmpty<T>(this IEnumerable<T> enumerable)
|
||||
{
|
||||
return enumerable?.Any() ?? false;
|
||||
}
|
||||
}
|
||||
199
SVSim.BattleEngine/Engine/Cute/NativePluginWrapper.cs
Normal file
199
SVSim.BattleEngine/Engine/Cute/NativePluginWrapper.cs
Normal file
@@ -0,0 +1,199 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cute;
|
||||
|
||||
public static class NativePluginWrapper
|
||||
{
|
||||
public enum BatteryState
|
||||
{
|
||||
UNKNOWN,
|
||||
DISCHARGING,
|
||||
CHARGING,
|
||||
FULL
|
||||
}
|
||||
|
||||
public enum NetworkMode
|
||||
{
|
||||
UNCONNECTED,
|
||||
WIFI,
|
||||
MOBILE
|
||||
}
|
||||
|
||||
public static void DeviceInit()
|
||||
{
|
||||
}
|
||||
|
||||
public static int GetUseResidentMemory()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int GetUseVirtualMemory()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int GetDeviceFreeMemory()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int GetVmUseMemory()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int GetVmFreeMemory()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static void SetStringToClipboard(string copyText)
|
||||
{
|
||||
ClipboardHelper.Clipboard = copyText;
|
||||
}
|
||||
|
||||
public static int GetAccelerometerRotation()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public static void RequestAudioFocus()
|
||||
{
|
||||
}
|
||||
|
||||
public static void AbandonAudioFocus()
|
||||
{
|
||||
}
|
||||
|
||||
public static string GetMacAddressByName(string devicename)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void DispStatusBar(bool isDisp)
|
||||
{
|
||||
if (isDisp)
|
||||
{
|
||||
Screen.fullScreen = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Screen.fullScreen = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void RegistPhoneStateListener()
|
||||
{
|
||||
}
|
||||
|
||||
public static void UnregistPhoneStateListener()
|
||||
{
|
||||
}
|
||||
|
||||
public static int GetBatteryLevel()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static BatteryState GetBatteryState()
|
||||
{
|
||||
return BatteryState.UNKNOWN;
|
||||
}
|
||||
|
||||
public static int GetWifiAntenaLevel()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static NetworkMode GetNetworkMode()
|
||||
{
|
||||
return NetworkMode.UNCONNECTED;
|
||||
}
|
||||
|
||||
public static bool IsAirplaneMode()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public static int GetCdmaDbm()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int GetCdmaEcio()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int GetEvdoDbm()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int GetEvdoEcio()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int GetDescriveContents()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static bool IsGsm()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public static int GetSignalHashCode()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int GetGsmSignalStrength()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int GetGsmBitErrorRate()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static void ShowToast(string text)
|
||||
{
|
||||
}
|
||||
|
||||
public static void DumpWWWCache()
|
||||
{
|
||||
}
|
||||
|
||||
public static void SetCacheMemorySize(int nMemSize)
|
||||
{
|
||||
}
|
||||
|
||||
public static int GetCacheDiskUsage()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int GetCacheDiskCapacity()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int GetCacheCurrentMemoryUsage()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int GetCacheCurrentMemoryCapacity()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static void ClearWWWCache()
|
||||
{
|
||||
}
|
||||
}
|
||||
23
SVSim.BattleEngine/Engine/Cute/PaymentCancelTask.cs
Normal file
23
SVSim.BattleEngine/Engine/Cute/PaymentCancelTask.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace Cute;
|
||||
|
||||
public class PaymentCancelTask : NetworkTask
|
||||
{
|
||||
private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.PaymentCancel;
|
||||
|
||||
public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}";
|
||||
|
||||
public void SetParameter(PaymentSkuInfo skuInfo, string errorMessage)
|
||||
{
|
||||
PaymentStartCancelParams paymentStartCancelParams = new PaymentStartCancelParams();
|
||||
paymentStartCancelParams.payment.product_id = skuInfo.productId;
|
||||
paymentStartCancelParams.payment.currency_code = skuInfo.currencyCode;
|
||||
paymentStartCancelParams.payment.price = skuInfo.price;
|
||||
paymentStartCancelParams.error.message = errorMessage;
|
||||
base.Params = paymentStartCancelParams;
|
||||
}
|
||||
|
||||
protected override int Parse()
|
||||
{
|
||||
return base.Parse();
|
||||
}
|
||||
}
|
||||
64
SVSim.BattleEngine/Engine/Cute/PaymentItemListTask.cs
Normal file
64
SVSim.BattleEngine/Engine/Cute/PaymentItemListTask.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using LitJson;
|
||||
|
||||
namespace Cute;
|
||||
|
||||
public class PaymentItemListTask : NetworkTask
|
||||
{
|
||||
private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.PaymentItemList;
|
||||
|
||||
public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}";
|
||||
|
||||
protected override int Parse()
|
||||
{
|
||||
PaymentImpl instance = PaymentImpl.GetInstance();
|
||||
resultCode = (int)base.ResponseData["data_headers"]["result_code"];
|
||||
if (resultCode != 1)
|
||||
{
|
||||
return resultCode;
|
||||
}
|
||||
JsonData jsonData = base.ResponseData["data"];
|
||||
instance.ProductIdList.Clear();
|
||||
instance.IdList.Clear();
|
||||
instance.ProductNameList.Clear();
|
||||
instance.ProductPriceList.Clear();
|
||||
instance.ProductTextList.Clear();
|
||||
instance.ProductPurchaseLimitList.Clear();
|
||||
instance.ProductPurchaseNumberList.Clear();
|
||||
instance.FormatProductPriceList.Clear();
|
||||
instance.ProductCsvIdList.Clear();
|
||||
instance.ProductImageNameList.Clear();
|
||||
instance.ProductIsSpecialShop.Clear();
|
||||
instance.ProductCurrentPurchaseCount.Clear();
|
||||
instance.ProductPurchaseLimitCount.Clear();
|
||||
instance.ProductEndTime.Clear();
|
||||
for (int i = 0; i < jsonData.Count; i++)
|
||||
{
|
||||
JsonData jsonData2 = jsonData[i];
|
||||
string text = jsonData2["store_product_id"].ToString();
|
||||
string value = jsonData2["name"].ToString().Replace("\\n", "\n");
|
||||
string value2 = jsonData2["text"].ToString();
|
||||
string text2 = jsonData2["purchase_limit"].ToString();
|
||||
string text3 = jsonData2["id"].ToString();
|
||||
string value3 = jsonData2["image_name"].ToString();
|
||||
string value4 = jsonData2["end_time"].ToString();
|
||||
bool value5 = ((jsonData2["special_shop_flag"].ToInt() != 0) ? true : false);
|
||||
instance.ProductIdList.Add(text);
|
||||
instance.IdList.Add(text3);
|
||||
instance.ProductNameList.Add(text, value);
|
||||
instance.ProductTextList.Add(text, value2);
|
||||
instance.ProductPurchaseLimitList.Add(text3, text2);
|
||||
instance.ProductPurchaseLimitCount.Add(text, int.Parse(text2));
|
||||
instance.ProductImageNameList.Add(text, value3);
|
||||
if (jsonData2.Keys.Contains("number_of_product_purchased") && jsonData2["number_of_product_purchased"] != null)
|
||||
{
|
||||
string text4 = jsonData2["number_of_product_purchased"].ToString();
|
||||
instance.ProductPurchaseNumberList.Add(text3, text4);
|
||||
instance.ProductCurrentPurchaseCount.Add(text, int.Parse(text4));
|
||||
}
|
||||
instance.ProductCsvIdList.Add(text, text3);
|
||||
instance.ProductIsSpecialShop.Add(text, value5);
|
||||
instance.ProductEndTime.Add(text, value4);
|
||||
}
|
||||
return resultCode;
|
||||
}
|
||||
}
|
||||
61
SVSim.BattleEngine/Engine/Cute/PaymentPCItemListTask.cs
Normal file
61
SVSim.BattleEngine/Engine/Cute/PaymentPCItemListTask.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using LitJson;
|
||||
|
||||
namespace Cute;
|
||||
|
||||
public class PaymentPCItemListTask : NetworkTask
|
||||
{
|
||||
private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.PaymentPCItemList;
|
||||
|
||||
public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}";
|
||||
|
||||
protected override int Parse()
|
||||
{
|
||||
PaymentPC instance = PaymentPC.GetInstance();
|
||||
resultCode = (int)base.ResponseData["data_headers"]["result_code"];
|
||||
if (resultCode != 1)
|
||||
{
|
||||
return resultCode;
|
||||
}
|
||||
JsonData jsonData = base.ResponseData["data"];
|
||||
instance.ProductIdList.Clear();
|
||||
instance.IdList.Clear();
|
||||
instance.ProductNameList.Clear();
|
||||
instance.ProductPriceList.Clear();
|
||||
instance.ProductTextList.Clear();
|
||||
instance.ProductPurchaseLimitList.Clear();
|
||||
instance.FormatProductPriceList.Clear();
|
||||
instance.ProductCsvIdList.Clear();
|
||||
instance.ProductImageNameList.Clear();
|
||||
instance.ProductIsSpecialShop.Clear();
|
||||
instance.ProductCurrentPurchaseCount.Clear();
|
||||
instance.ProductEndTime.Clear();
|
||||
for (int i = 0; i < jsonData.Count; i++)
|
||||
{
|
||||
JsonData jsonData2 = jsonData[i];
|
||||
string text = jsonData2["store_product_id"].ToString();
|
||||
string value = jsonData2["name"].ToString().Replace("\\n", "\n");
|
||||
string value2 = jsonData2["text"].ToString();
|
||||
string value3 = jsonData2["price"].ToString();
|
||||
string text2 = jsonData2["purchase_limit"].ToString();
|
||||
string text3 = jsonData2["id"].ToString();
|
||||
string value4 = jsonData2["image_name"].ToString();
|
||||
string value5 = jsonData2["end_time"].ToString();
|
||||
bool value6 = ((jsonData2["special_shop_flag"].ToInt() != 0) ? true : false);
|
||||
int value7 = jsonData2["purchase_num_current"].ToInt();
|
||||
instance.ProductIdList.Add(text);
|
||||
instance.IdList.Add(text3);
|
||||
instance.ProductNameList.Add(text, value);
|
||||
instance.ProductPriceList.Add(text, value3);
|
||||
instance.FormatProductPriceList.Add(text, value3);
|
||||
instance.ProductTextList.Add(text, value2);
|
||||
instance.ProductPurchaseLimitList.Add(text3, text2);
|
||||
instance.ProductCsvIdList.Add(text, text3);
|
||||
instance.ProductImageNameList.Add(text, value4);
|
||||
instance.ProductIsSpecialShop.Add(text, value6);
|
||||
instance.ProductCurrentPurchaseCount.Add(text, value7);
|
||||
instance.ProductPurchaseLimitCount.Add(text, int.Parse(text2));
|
||||
instance.ProductEndTime.Add(text, value5);
|
||||
}
|
||||
return resultCode;
|
||||
}
|
||||
}
|
||||
32
SVSim.BattleEngine/Engine/Cute/PaymentStartTask.cs
Normal file
32
SVSim.BattleEngine/Engine/Cute/PaymentStartTask.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
namespace Cute;
|
||||
|
||||
public class PaymentStartTask : NetworkTask
|
||||
{
|
||||
private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.PaymentStart;
|
||||
|
||||
public PaymentBase.RefundWarningType NeedRefundWarningType { get; private set; }
|
||||
|
||||
public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}";
|
||||
|
||||
public void SetParameter(PaymentSkuInfo skuInfo, bool isAlertAgree, bool isAlertActive)
|
||||
{
|
||||
PaymentStartCancelParams paymentStartCancelParams = new PaymentStartCancelParams();
|
||||
paymentStartCancelParams.payment.product_id = skuInfo.productId;
|
||||
paymentStartCancelParams.payment.currency_code = skuInfo.currencyCode;
|
||||
paymentStartCancelParams.payment.price = skuInfo.price;
|
||||
paymentStartCancelParams.payment.isalertagree = (isAlertAgree ? 1 : 0);
|
||||
paymentStartCancelParams.payment.isalertactive = (isAlertActive ? 1 : 0);
|
||||
base.Params = paymentStartCancelParams;
|
||||
}
|
||||
|
||||
protected override int Parse()
|
||||
{
|
||||
int num = base.Parse();
|
||||
if (num != 1)
|
||||
{
|
||||
return num;
|
||||
}
|
||||
NeedRefundWarningType = (PaymentBase.RefundWarningType)base.ResponseData["data"]["refund_penalty_type"].ToInt();
|
||||
return num;
|
||||
}
|
||||
}
|
||||
14
SVSim.BattleEngine/Engine/Cute/SceneType.cs
Normal file
14
SVSim.BattleEngine/Engine/Cute/SceneType.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Cute;
|
||||
|
||||
public enum SceneType
|
||||
{
|
||||
None,
|
||||
_Splash,
|
||||
GameTitle,
|
||||
Title,
|
||||
Battle,
|
||||
CardList,
|
||||
GAMESCENE_TYPE_MAX,
|
||||
_SoftwareReset,
|
||||
TYPE_MAX
|
||||
}
|
||||
34
SVSim.BattleEngine/Engine/Cute/UpdateBirthTask.cs
Normal file
34
SVSim.BattleEngine/Engine/Cute/UpdateBirthTask.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cute;
|
||||
|
||||
public class UpdateBirthTask : NetworkTask
|
||||
{
|
||||
private class UpdateBirthPostParams : PostParams
|
||||
{
|
||||
public string birth = "";
|
||||
}
|
||||
|
||||
private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.BirthUpdate;
|
||||
|
||||
public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}";
|
||||
|
||||
public void SetParameter(string birth)
|
||||
{
|
||||
UpdateBirthPostParams updateBirthPostParams = new UpdateBirthPostParams();
|
||||
updateBirthPostParams.birth = birth;
|
||||
base.Params = updateBirthPostParams;
|
||||
}
|
||||
|
||||
protected override int Parse()
|
||||
{
|
||||
int num = base.Parse();
|
||||
if (num != 1)
|
||||
{
|
||||
return num;
|
||||
}
|
||||
CreateItemList.BirthDayUpdateServerTime = base.ResponseData["data_headers"]["servertime"].ToInt();
|
||||
CreateItemList.BirthDayUpdateRealTime = Time.realtimeSinceStartup;
|
||||
return num;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user