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.
52 lines
1.3 KiB
C#
52 lines
1.3 KiB
C#
using System;
|
|
using Cute;
|
|
|
|
namespace Wizard;
|
|
|
|
public class UserRegionUpdater
|
|
{
|
|
private enum UpdateRegionType
|
|
{
|
|
CURRENT,
|
|
INSTALL
|
|
}
|
|
|
|
private RegionCodeUpdateTask _regionUpdateTask;
|
|
|
|
private UpdateRegionType _updateType = UpdateRegionType.INSTALL;
|
|
|
|
private bool _isUpdateRegion;
|
|
|
|
public UserRegionUpdater()
|
|
{
|
|
_regionUpdateTask = new RegionCodeUpdateTask();
|
|
}
|
|
|
|
public void UpDateRegion(Action callback)
|
|
{
|
|
string value = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.INSTALL_REGION_CODE);
|
|
string currentRegionStr = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.CURRENT_REGION_CODE);
|
|
if (string.IsNullOrEmpty(value) && !string.IsNullOrEmpty(currentRegionStr))
|
|
{
|
|
_isUpdateRegion = true;
|
|
_updateType = UpdateRegionType.INSTALL;
|
|
}
|
|
else if (!string.IsNullOrEmpty(currentRegionStr) && value != currentRegionStr)
|
|
{
|
|
_isUpdateRegion = true;
|
|
_updateType = UpdateRegionType.CURRENT;
|
|
}
|
|
if (!_isUpdateRegion)
|
|
{
|
|
callback();
|
|
return;
|
|
}
|
|
_regionUpdateTask.SetParameter((int)_updateType);
|
|
UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(_regionUpdateTask, delegate
|
|
{
|
|
PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.INSTALL_REGION_CODE, currentRegionStr);
|
|
callback();
|
|
}, BaseTask.OnRequestFailed, BaseTask.OnFailedErrorCode));
|
|
}
|
|
}
|