Commit 7c72f62a authored by nanahira's avatar nanahira

Revert "update download path"

This reverts commit 27fca303.
parent 034d12bb
...@@ -520,8 +520,8 @@ public class Program : MonoBehaviour ...@@ -520,8 +520,8 @@ public class Program : MonoBehaviour
{ {
try try
{ {
if(!Directory.Exists("tmp")) { if(!Directory.Exists("cdb")) {
Directory.CreateDirectory("tmp"); Directory.CreateDirectory("cdb");
} }
/*if(File.Exists("cdb/cards.cdb")) /*if(File.Exists("cdb/cards.cdb"))
...@@ -532,25 +532,25 @@ public class Program : MonoBehaviour ...@@ -532,25 +532,25 @@ public class Program : MonoBehaviour
File.Delete("cdb/strings.conf");*/ File.Delete("cdb/strings.conf");*/
HttpDldFile httpDldFile = new HttpDldFile(); HttpDldFile httpDldFile = new HttpDldFile();
httpDldFile.Download("http://koishi.222diy.gdn/ygopro/cards.cdb", "tmp/cards.cdb"); httpDldFile.Download("http://koishi.222diy.gdn/ygopro/cards.cdb", "cdb/_cards.cdb");
if(YGOSharp.CardsManager.initialize("tmp/cards.cdb", true)) { if(YGOSharp.CardsManager.initialize("cdb/_cards.cdb", true)) {
ReplaceFile("Documents/cards.cdb", "tmp/cards.cdb"); ReplaceFile("cdb/cards.cdb", "cdb/_cards.cdb");
} }
else else
{ {
PrintToChat(InterString.Get("卡片数据库更新失败。")); PrintToChat(InterString.Get("卡片数据库更新失败。"));
} }
httpDldFile.Download("http://koishi.222diy.gdn/ygopro/lflist.conf", "tmp/lflist.conf"); httpDldFile.Download("http://koishi.222diy.gdn/ygopro/lflist.conf", "cdb/_lflist.conf");
if(YGOSharp.BanlistManager.initialize("tmp/lflist.conf", true)) { if(YGOSharp.BanlistManager.initialize("cdb/_lflist.conf", true)) {
ReplaceFile("Documents/lflist.conf","tmp/lflist.conf"); ReplaceFile("cdb/lflist.conf","cdb/_lflist.conf");
} }
else else
{ {
PrintToChat(InterString.Get("禁止/限制卡表文件更新失败。")); PrintToChat(InterString.Get("禁止/限制卡表文件更新失败。"));
} }
httpDldFile.Download("http://koishi.222diy.gdn/ygopro/strings.conf", "tmp/strings.conf"); httpDldFile.Download("http://koishi.222diy.gdn/ygopro/strings.conf", "cdb/_strings.conf");
if(GameStringManager.initialize("tmp/strings.conf", true)) { if(GameStringManager.initialize("cdb/_strings.conf", true)) {
ReplaceFile("Documents/strings.conf","tmp/strings.conf"); ReplaceFile("cdb/strings.conf","cdb/_strings.conf");
} }
else else
{ {
...@@ -560,7 +560,7 @@ public class Program : MonoBehaviour ...@@ -560,7 +560,7 @@ public class Program : MonoBehaviour
} }
catch (Exception e) catch (Exception e)
{ {
PrintToChat("UPDATE ERROR: " + e.ToString()); Debug.Log("UPDATE ERROR: " + e.ToString());
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment