Commit e3b988fb authored by nanahira's avatar nanahira

fix Expansions for capital letter

parent bbae1290
...@@ -438,6 +438,11 @@ unsigned char* DataManager::ScriptReaderEx(const char* script_name, int* slen) { ...@@ -438,6 +438,11 @@ unsigned char* DataManager::ScriptReaderEx(const char* script_name, int* slen) {
buffer = ScriptReaderExSingle("expansions/", script_name, slen); buffer = ScriptReaderExSingle("expansions/", script_name, slen);
if(buffer) if(buffer)
return buffer; return buffer;
#if defined(SERVER_PRO3_SUPPORT) && !defined(_WIN32)
buffer = ScriptReaderExSingle("Expansions/", script_name, slen);
if(buffer)
return buffer;
#endif
#if !defined(YGOPRO_SERVER_MODE) || defined(SERVER_ZIP_SUPPORT) #if !defined(YGOPRO_SERVER_MODE) || defined(SERVER_ZIP_SUPPORT)
buffer = ScriptReaderExSingle("", script_name, slen, 2, TRUE); buffer = ScriptReaderExSingle("", script_name, slen, 2, TRUE);
if(buffer) if(buffer)
......
...@@ -51,6 +51,9 @@ void DeckManager::LoadLFList() { ...@@ -51,6 +51,9 @@ void DeckManager::LoadLFList() {
#endif #endif
#ifdef SERVER_PRO3_SUPPORT #ifdef SERVER_PRO3_SUPPORT
LoadLFListSingle("Data/lflist.conf"); LoadLFListSingle("Data/lflist.conf");
#ifndef _WIN32
LoadLFListSingle("Expansions/lflist.conf");
#endif
#endif #endif
LoadLFListSingle("expansions/lflist.conf"); LoadLFListSingle("expansions/lflist.conf");
LoadLFListSingle("lflist.conf"); LoadLFListSingle("lflist.conf");
......
...@@ -1314,6 +1314,15 @@ void Game::LoadExpansions() { ...@@ -1314,6 +1314,15 @@ void Game::LoadExpansions() {
dataManager.LoadDB(fpath); dataManager.LoadDB(fpath);
} }
}); });
#ifndef _WIN32
FileSystem::TraversalDir(L"./Expansions", [](const wchar_t* name, bool isdir) {
wchar_t fpath[1024];
myswprintf(fpath, L"./Expansions/%ls", name);
if(!isdir && IsExtension(name, L".cdb")) {
dataManager.LoadDB(fpath);
}
});
#endif
#endif // SERVER_PRO3_SUPPORT #endif // SERVER_PRO3_SUPPORT
FileSystem::TraversalDir(L"./expansions", [](const wchar_t* name, bool isdir) { FileSystem::TraversalDir(L"./expansions", [](const wchar_t* name, bool isdir) {
wchar_t fpath[1024]; wchar_t fpath[1024];
......
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