Commit 27fca303 authored by nanahira's avatar nanahira

update download path

parent 409eccaa
...@@ -520,8 +520,8 @@ public class Program : MonoBehaviour ...@@ -520,8 +520,8 @@ public class Program : MonoBehaviour
{ {
try try
{ {
if(!Directory.Exists("cdb")) { if(!Directory.Exists("tmp")) {
Directory.CreateDirectory("cdb"); Directory.CreateDirectory("tmp");
} }
/*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", "cdb/_cards.cdb"); httpDldFile.Download("http://koishi.222diy.gdn/ygopro/cards.cdb", "tmp/cards.cdb");
if(YGOSharp.CardsManager.initialize("cdb/_cards.cdb", true)) { if(YGOSharp.CardsManager.initialize("tmp/cards.cdb", true)) {
ReplaceFile("cdb/cards.cdb", "cdb/_cards.cdb"); ReplaceFile("Documents/cards.cdb", "tmp/cards.cdb");
} }
else else
{ {
PrintToChat(InterString.Get("卡片数据库更新失败。")); PrintToChat(InterString.Get("卡片数据库更新失败。"));
} }
httpDldFile.Download("http://koishi.222diy.gdn/ygopro/lflist.conf", "cdb/_lflist.conf"); httpDldFile.Download("http://koishi.222diy.gdn/ygopro/lflist.conf", "tmp/lflist.conf");
if(YGOSharp.BanlistManager.initialize("cdb/_lflist.conf", true)) { if(YGOSharp.BanlistManager.initialize("tmp/lflist.conf", true)) {
ReplaceFile("cdb/lflist.conf","cdb/_lflist.conf"); ReplaceFile("Documents/lflist.conf","tmp/lflist.conf");
} }
else else
{ {
PrintToChat(InterString.Get("禁止/限制卡表文件更新失败。")); PrintToChat(InterString.Get("禁止/限制卡表文件更新失败。"));
} }
httpDldFile.Download("http://koishi.222diy.gdn/ygopro/strings.conf", "cdb/_strings.conf"); httpDldFile.Download("http://koishi.222diy.gdn/ygopro/strings.conf", "tmp/strings.conf");
if(GameStringManager.initialize("cdb/_strings.conf", true)) { if(GameStringManager.initialize("tmp/strings.conf", true)) {
ReplaceFile("cdb/strings.conf","cdb/_strings.conf"); ReplaceFile("Documents/strings.conf","tmp/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)
{ {
Debug.Log("UPDATE ERROR: " + e.ToString()); PrintToChat("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