客户端rsa,冗余清理,bug修复,安卓build问题
This commit is contained in:
@@ -20,6 +20,7 @@ public sealed class AllyHeroDeployLedger : MonoBehaviour
|
||||
private readonly Dictionary<int, long> joinDateUtcTicksByHeroId = new Dictionary<int, long>();
|
||||
private bool initialized;
|
||||
private bool loadedFromSave;
|
||||
private bool hasAnyRecoverableLocalState;
|
||||
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
|
||||
private static void Bootstrap()
|
||||
@@ -78,14 +79,18 @@ public sealed class AllyHeroDeployLedger : MonoBehaviour
|
||||
|
||||
AllyHeroDeployLedgerPayload payload;
|
||||
loadedFromSave = AllyHeroDeployLedgerStorage.TryLoad(out payload);
|
||||
hasAnyRecoverableLocalState = loadedFromSave || AllyHeroDeployLedgerStorage.HasAnyRecoverableState();
|
||||
RebuildFromPayload(payload);
|
||||
initialized = true;
|
||||
if (!loadedFromSave)
|
||||
if (!loadedFromSave && !hasAnyRecoverableLocalState)
|
||||
{
|
||||
ResetGrowthStateToDefaults();
|
||||
}
|
||||
SyncAllMirrorFlags();
|
||||
SaveNow();
|
||||
if (loadedFromSave || !hasAnyRecoverableLocalState)
|
||||
{
|
||||
SaveNow();
|
||||
}
|
||||
}
|
||||
|
||||
public void ResetToDefaultsIfSaveMissing()
|
||||
@@ -95,7 +100,7 @@ public sealed class AllyHeroDeployLedger : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
if (AllyHeroDeployLedgerStorage.HasExistingSaveFile())
|
||||
if (hasAnyRecoverableLocalState || AllyHeroDeployLedgerStorage.HasExistingSaveFile())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user