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