mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Fix TC build
This commit is contained in:
@@ -14,6 +14,18 @@
|
|||||||
#include "ElunaCreatureAI.h"
|
#include "ElunaCreatureAI.h"
|
||||||
#include "ElunaInstanceAI.h"
|
#include "ElunaInstanceAI.h"
|
||||||
|
|
||||||
|
#if defined(TRINITY_PLATFORM) && defined(TRINITY_PLATFORM_WINDOWS)
|
||||||
|
#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
|
||||||
|
#define ELUNA_WINDOWS
|
||||||
|
#endif
|
||||||
|
#elif defined(PLATFORM) && defined(PLATFORM_WINDOWS)
|
||||||
|
#if PLATFORM == PLATFORM_WINDOWS
|
||||||
|
#define ELUNA_WINDOWS
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#error Eluna could not determine platform
|
||||||
|
#endif
|
||||||
|
|
||||||
// Some dummy includes containing BOOST_VERSION:
|
// Some dummy includes containing BOOST_VERSION:
|
||||||
// ObjectAccessor.h Config.h Log.h
|
// ObjectAccessor.h Config.h Log.h
|
||||||
#ifndef MANGOS
|
#ifndef MANGOS
|
||||||
@@ -92,7 +104,7 @@ void Eluna::LoadScriptPaths()
|
|||||||
lua_extensions.clear();
|
lua_extensions.clear();
|
||||||
|
|
||||||
lua_folderpath = eConfigMgr->GetStringDefault("Eluna.ScriptPath", "lua_scripts");
|
lua_folderpath = eConfigMgr->GetStringDefault("Eluna.ScriptPath", "lua_scripts");
|
||||||
#if PLATFORM == PLATFORM_UNIX || PLATFORM == PLATFORM_APPLE
|
#ifndef ELUNA_WINDOWS
|
||||||
if (lua_folderpath[0] == '~')
|
if (lua_folderpath[0] == '~')
|
||||||
if (const char* home = getenv("HOME"))
|
if (const char* home = getenv("HOME"))
|
||||||
lua_folderpath.replace(0, 1, home);
|
lua_folderpath.replace(0, 1, home);
|
||||||
@@ -382,7 +394,7 @@ void Eluna::GetScripts(std::string path)
|
|||||||
std::string fullpath = dir_iter->path().generic_string();
|
std::string fullpath = dir_iter->path().generic_string();
|
||||||
|
|
||||||
// Check if file is hidden
|
// Check if file is hidden
|
||||||
#if PLATFORM == PLATFORM_WINDOWS
|
#ifdef ELUNA_WINDOWS
|
||||||
DWORD dwAttrib = GetFileAttributes(fullpath.c_str());
|
DWORD dwAttrib = GetFileAttributes(fullpath.c_str());
|
||||||
if (dwAttrib != INVALID_FILE_ATTRIBUTES && (dwAttrib & FILE_ATTRIBUTE_HIDDEN))
|
if (dwAttrib != INVALID_FILE_ATTRIBUTES && (dwAttrib & FILE_ATTRIBUTE_HIDDEN))
|
||||||
continue;
|
continue;
|
||||||
@@ -429,7 +441,7 @@ void Eluna::GetScripts(std::string path)
|
|||||||
std::string fullpath = path + "/" + directory->d_name;
|
std::string fullpath = path + "/" + directory->d_name;
|
||||||
|
|
||||||
// Check if file is hidden
|
// Check if file is hidden
|
||||||
#if PLATFORM == PLATFORM_WINDOWS
|
#ifdef ELUNA_WINDOWS
|
||||||
DWORD dwAttrib = GetFileAttributes(fullpath.c_str());
|
DWORD dwAttrib = GetFileAttributes(fullpath.c_str());
|
||||||
if (dwAttrib != INVALID_FILE_ATTRIBUTES && (dwAttrib & FILE_ATTRIBUTE_HIDDEN))
|
if (dwAttrib != INVALID_FILE_ATTRIBUTES && (dwAttrib & FILE_ATTRIBUTE_HIDDEN))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user