From 2b47fde8e7902ddddd898309f281b9c310fc877f Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期三, 22 八月 2018 12:00:04 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into Skill_Polymorph_BeatBackPlayer

---
 Core/GameEngine/Model/ConfigManager.cs |   33 +++++++--------------------------
 1 files changed, 7 insertions(+), 26 deletions(-)

diff --git a/Core/GameEngine/Model/ConfigManager.cs b/Core/GameEngine/Model/ConfigManager.cs
index 82dbee8..003ed96 100644
--- a/Core/GameEngine/Model/ConfigManager.cs
+++ b/Core/GameEngine/Model/ConfigManager.cs
@@ -8,10 +8,8 @@
 using UnityEngine;
 using System.Threading;
 
-public class ConfigManager : Singleton<ConfigManager>
+public class Config : Singleton<Config>
 {
-    public readonly static string CustomIV = "4vHKRj3yfzU=";
-    public readonly static string CustomKey = "xhVs6DRXLfUGxw+AhtfQdpQGoa+8SA9d";
 
     bool isPlaying = true;
 
@@ -188,7 +186,7 @@
         AddAsyncTask<OrderInfoConfig>();
         AddAsyncTask<TrialExchangeConfig>();
         AddAsyncTask<TrialRewardsConfig>();
-
+        AddAsyncTask<DogzEquipPlusConfig>();
         while (!AllCompleted())
         {
             var completedCount = 0;
@@ -518,26 +516,9 @@
                 lines = File.ReadAllLines(path, Encoding.UTF8);
                 break;
             case AssetPath.External:
-                var assetVersion = AssetVersionUtility.GetAssetVersion(StringUtility.Contact("config/", fileName, ".bytes"));
+                var assetVersion = AssetVersionUtility.GetAssetVersion(StringUtility.Contact("config/", fileName, ".txt"));
                 path = StringUtility.Contact(ResourcesPath.Instance.ExternalStorePath, assetVersion.relativePath);
-
-                var provider = new TripleDESCryptoServiceProvider();
-                provider.Key = Convert.FromBase64String(CustomKey);
-                provider.IV = Convert.FromBase64String(CustomIV);
-                provider.Mode = CipherMode.CBC;
-                provider.Padding = PaddingMode.PKCS7;
-                var decryptor = provider.CreateDecryptor();
-
-                var fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read);
-                var bytes = new byte[fs.Length];
-                fs.Read(bytes, 0, bytes.Length);
-                var ms = new MemoryStream(bytes);
-
-                var crypS = new CryptoStream(ms, decryptor, CryptoStreamMode.Read);
-                var sr = new StreamReader(crypS, Encoding.UTF8);
-                var content = sr.ReadToEnd();
-                lines = content.Split(new string[] { "\r\n" }, StringSplitOptions.None);
-
+                lines = File.ReadAllLines(path, Encoding.UTF8);
                 break;
         }
 
@@ -599,7 +580,7 @@
 
     }
 
-    public T GetTemplate<T>(string _dwTemplateID) where T : ConfigBase, new()
+    public T Get<T>(string _dwTemplateID) where T : ConfigBase, new()
     {
         if (string.IsNullOrEmpty(_dwTemplateID))
         {
@@ -634,9 +615,9 @@
         return config as T;
     }
 
-    public T GetTemplate<T>(int _dwTemplateID) where T : ConfigBase, new()
+    public T Get<T>(int _dwTemplateID) where T : ConfigBase, new()
     {
-        return GetTemplate<T>(_dwTemplateID.ToString());
+        return Get<T>(_dwTemplateID.ToString());
     }
 
     public bool ContainKey<T>(int _id)

--
Gitblit v1.8.0