客户端rsa,冗余清理,bug修复,安卓build问题

This commit is contained in:
FloatGaming
2026-07-14 01:43:49 +08:00
parent fd22501f71
commit f8985d91d2
682 changed files with 4595 additions and 11216 deletions
@@ -11,6 +11,7 @@ public static class PlayerEconomyStorage
private const string MainFileName = ".eco.dat";
private const string BackupFileName = ".eco.bak";
private const string TempFileName = ".eco.tmp";
private const string RecoverySlotKey = "player_economy_storage";
private static string VaultDirectoryPath
{
@@ -53,9 +54,23 @@ public static class PlayerEconomyStorage
return true;
}
if (LocalRecoveryMirror.TryLoadJson(RecoverySlotKey, out payload) && payload != null)
{
TrySave(payload);
return true;
}
return false;
}
public static bool HasAnyRecoverableState()
{
return HasAnyVaultFile(MainFileName)
|| HasAnyVaultFile(BackupFileName)
|| PlayerProgressBackupService.HasEconomyBackup()
|| LocalRecoveryMirror.HasSlotData(RecoverySlotKey);
}
public static bool TrySave(PlayerEconomyPayload payload)
{
try
@@ -77,6 +92,7 @@ public static class PlayerEconomyStorage
TryHidePath(MainFilePath);
File.Delete(TempFilePath);
PlayerProgressBackupService.SaveEconomy(payload);
LocalRecoveryMirror.SaveJson(RecoverySlotKey, payload);
return true;
}
catch (Exception ex)
@@ -170,6 +186,20 @@ public static class PlayerEconomyStorage
return false;
}
private static bool HasAnyVaultFile(string fileName)
{
var candidates = SaveIdentityUtility.GetVaultFilePathVariants(fileName);
for (int i = 0; i < candidates.Count; i++)
{
if (File.Exists(candidates[i]))
{
return true;
}
}
return false;
}
private static string BuildEnvelopeJson(PlayerEconomyPayload payload)
{
payload.lastUpdatedUtcTicks = DateTime.UtcNow.Ticks;