fix:修复bug(解密文件夹名字修改)

This commit is contained in:
barry
2026-05-20 09:38:24 +08:00
parent d1ed0d5747
commit aca0e4d1af
7 changed files with 23823 additions and 23676 deletions
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -598,7 +598,7 @@ namespace RedHotRoast
else
{
Levelunlock levelunlock_ = DataMgr.LevelUnlockListNew.Value.FirstOrDefault(x => x.level_ == GameHelper.GetLevel());
Debug.Log($"levelunlock_0-----------------:{levelunlock_.config_index} {levelunlock_.type}");
// Debug.Log($"levelunlock_0-----------------:{levelunlock_.config_index} {levelunlock_.type}");
if (levelunlock_ != null)
{
if (levelunlock_.type == 0)
@@ -116,7 +116,7 @@ namespace RedHotRoast {
return ConfigLoader.Instance.GetConfig<List<T>>() ?? new List<T>();
}
private static bool IsOrganic()
public static bool IsOrganic()
{
bool b = false;
@@ -124,6 +124,8 @@ namespace RedHotRoast {
{
b = GetCommonConf().IsOrganic == 1;
}
Debug.Log($"下载---------开关:{b}");
return b;
}
+3 -3
View File
@@ -15,7 +15,7 @@ namespace RedHotRoast
// 解密文件:从 src 读出,解密后写到 dst
public static void DecryptFile(string src, string dst)
{
var key = ConfigSystem.GetCommonConf().ResVersion;
var key = ConfigSystem.IsOrganic() ? ConfigSystem.GetCommonConf().ResVersion : ConfigSystem.GetCommonConf().ResVersion1;
var data = File.ReadAllBytes(src);
// 检查魔法字节
if (data.Length < Magic.Length || !data.Take(Magic.Length).SequenceEqual(Magic)) throw new InvalidDataException("文件未加密或格式错误");
@@ -42,7 +42,7 @@ namespace RedHotRoast
{
var data = File.ReadAllBytes(src);
var key = ConfigSystem.GetCommonConf().ResVersion;
var key = ConfigSystem.IsOrganic() ? ConfigSystem.GetCommonConf().ResVersion : ConfigSystem.GetCommonConf().ResVersion1;
// 检查魔法字节
if (data.Length < Magic.Length || !data.Take(Magic.Length).SequenceEqual(Magic))
@@ -66,7 +66,7 @@ namespace RedHotRoast
public static byte[] DecryptVideoToBytes(string src)
{
var key = ConfigSystem.GetCommonConf().ResVersion;
var key = ConfigSystem.IsOrganic() ? ConfigSystem.GetCommonConf().ResVersion : ConfigSystem.GetCommonConf().ResVersion1;
var data = File.ReadAllBytes(src);
if (data.Length < Magic.Length || !data.Take(Magic.Length).SequenceEqual(Magic))
File diff suppressed because one or more lines are too long