本文整理汇总了C++中AddScripts函数的典型用法代码示例。如果您正苦于以下问题:C++ AddScripts函数的具体用法?C++ AddScripts怎么用?C++ AddScripts使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AddScripts函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: outstring_log
void ScriptMgr::ScriptsInit()
{
outstring_log(" ____ _____ _ _ ");
outstring_log(" / __ \\ / ____| (_) | | ");
outstring_log(" | | | |_ __ ___ __ _ ___ _ __ | (___ ___ _ __ _ _ __ | |_ ");
outstring_log(" | | | | '__/ _ \\/ _` |/ _ \\| '_ \\ \\___ \\ / __| '__| | '_ \\| __|");
outstring_log(" | |__| | | | __/ (_| | (_) | | | |____) | (__| | | | |_) | |_ ");
outstring_log(" \\____/|_| \\___|\\__, |\\___/|_| |_|_____/ \\___|_| |_| .__/ \\__|");
outstring_log(" __/ | | | ");
outstring_log(" |___/ |_| \n");
//Load database (must be called after SD2Config.SetSource).
LoadDatabase();
for (uint16 i = 0; i < MAX_SCRIPTS; ++i)
m_scripts[i] = NULL;
FillSpellSummary();
AddScripts();
outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
outstring_log(">> Load Overriden SQL Data.");
LoadOverridenSQLData();
}
示例2: __
void ScriptMgr::ScriptsInit()
{
//Trinity Script startup
/*sLog.outString(" _____ _ _ _ ____ _ _");
sLog.outString("|_ _| __(_)_ __ (_) |_ _ _/ ___| ___ _ __(_)_ __ | |_ ");
sLog.outString(" | || '__| | '_ \\| | __| | | \\___ \\ / __| \'__| | \'_ \\| __|");
sLog.outString(" | || | | | | | | | |_| |_| |___) | (__| | | | |_) | |_ ");
sLog.outString(" |_||_| |_|_| |_|_|\\__|\\__, |____/ \\___|_| |_| .__/ \\__|");
sLog.outString(" |___/ |_| ");
sLog.outString("");
sLog.outString("");*/
/* Beginning Of PDS-4TC Badge*/ /* Added by Pryd inspired by Lorac */
sLog.outString(" . . . ");
sLog.outString(" . . ");
sLog.outString(" ____ . \\ / . ");
sLog.outString(" /\\ / \\ . - ^ - ");
sLog.outString(" \\ \\_ / . / | \\ . . ");
sLog.outString(" \\ \\\\ _ . ");
sLog.outString(" \\ \\\\ \\// _ _ /\\ __ ");
sLog.outString(" \\ \\\\ \\\\ \\\\ // /`'\\ \\__ \\ / ");
sLog.outString(" \\//__\\\\ \\\\// /____\\ \\__ \\/ ");
sLog.outString(" _____// ```````` ");
sLog.outString(" /\\ ___\\ PDS-4TC-2011 ");
sLog.outString(" \\ \\ \\__/ ______ _ __ _____ ");
sLog.outString(" \\ \\ \\ /\\ __ \\/\\`'__\\/\\ __\\ ");
sLog.outString(" ,, \\ \\ \\___\\ \\ \\_\\ \\ \\ \\_/\\ \\ \\//_ ");
sLog.outString("_/\\_|_____\\ \\_____\\ \\_____\\ \\_\\ \\ \\____\\ ");
sLog.outString(" ` ` ` ` ` \\______/\\/_____/\\/_/ \\/____/ ");
sLog.outString(" ");
sLog.outString( "PryDevCore based on TrinityCore");
sLog.outString( "Project Resource Locations");
sLog.outString( "Main Site: Http://prydevserver.com");
sLog.outString( "Support Forum: Http://prydevserver.com/forum/");
sLog.outString( " ");
sLog.outString( "PryDevServer.com Development For the Community");
/* End Of PDS-4TC Badge*/ /* Added by Pryd inspired by Lorac */
//Load database (must be called after SD2Config.SetSource).
LoadDatabase();
sLog.outString("Loading C++ scripts");
barGoLink bar(1);
bar.step();
sLog.outString("");
for (uint16 i =0; i<MAX_SCRIPTS; ++i)
m_scripts[i]=NULL;
FillSpellSummary();
AddScripts();
sLog.outString(">> Loaded %i C++ Scripts.", num_sc_scripts);
sLog.outString(">> Load Overriden SQL Data.");
LoadOverridenSQLData();
}
示例3: LoadDatabase
void ScriptMgr::InitScriptLibrary()
{
LoadDatabase();
outstring_log("StrawberryScripts: Loading C++ scripts");
BarGoLink bar(1);
bar.step();
outstring_log("");
// Resize script ids to needed ammount of assigned ScriptNames (from core)
m_scripts.resize(GetScriptIdsCount(), NULL);
FillSpellSummary();
AddScripts();
// Check existance scripts for all registered by core script names
for (uint32 i = 1; i < GetScriptIdsCount(); ++i)
{
if (!m_scripts[i])
error_log("SSC: No script found for ScriptName '%s'.", GetScriptName(i));
}
outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
}
示例4: outstring_log
void ScriptMgr::ScriptsInit()
{
//Trinity Script startup
outstring_log(" _____ _ _ _ ____ _ _");
outstring_log("|_ _| __(_)_ __ (_) |_ _ _/ ___| ___ _ __(_)_ __ | |_ ");
outstring_log(" | || '__| | '_ \\| | __| | | \\___ \\ / __| \'__| | \'_ \\| __|");
outstring_log(" | || | | | | | | | |_| |_| |___) | (__| | | | |_) | |_ ");
outstring_log(" |_||_| |_|_| |_|_|\\__|\\__, |____/ \\___|_| |_| .__/ \\__|");
outstring_log(" |___/ |_| ");
outstring_log("");
outstring_log("");
//Load database (must be called after SD2Config.SetSource).
LoadDatabase();
outstring_log("TSCR: Loading C++ scripts");
barGoLink bar(1);
bar.step();
outstring_log("");
for (uint16 i =0; i<MAX_SCRIPTS; ++i)
m_scripts[i]=NULL;
FillSpellSummary();
AddScripts();
outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
outstring_log(">> Load Overriden SQL Data.");
LoadOverridenSQLData();
}
示例5: outstring_log
void ScriptMgr::ScriptsInit()
{
//Scripts startup
outstring_log("");
outstring_log(" DDD DDD DDDDD DD DDDDD DDDDDDDD DDD");
outstring_log("D DD DDD D DD DD D DD DD D DD");
outstring_log("DD DD D DD DD D DD DD DD");
outstring_log(" DDD D DDDDD DD DDDDD DD DDD");
outstring_log(" DD DD D DD DD D DD DD");
outstring_log("DD D DDD D DD DD D DD DD D");
outstring_log(" DDD DDD D DD DD D DD DDD");
outstring_log("");
//Load database (must be called after DSConfig.SetSource).
LoadDatabase();
outstring_log("DS: Loading Scripts");
for(int i=0; i<MAX_SCRIPTS; ++i)
m_scripts[i]=NULL;
FillSpellSummary();
AddScripts();
outstring_log(">> Loaded %i Scripts.", num_sc_scripts);
}
示例6: InitScriptLibrary
MANGOS_DLL_EXPORT
void InitScriptLibrary()
{
// ScriptDev2 startup
outstring_log("");
outstring_log(" MMM MMM MM");
outstring_log("M MM M M M M");
outstring_log("MM M M M");
outstring_log(" MMM M M M");
outstring_log(" MM M M MMMM");
outstring_log("MM M M M ");
outstring_log(" MMM MMM http://www.scriptdev2.com");
outstring_log("");
// Get configuration file
bool configFailure = false;
if (!SD2Config.SetSource(_MANGOSD_CONFIG))
configFailure = true;
else
outstring_log("SD2: Using configuration file %s", _MANGOSD_CONFIG);
// Set SD2 Error Log File
std::string sd2LogFile = SD2Config.GetStringDefault("SD2ErrorLogFile", "SD2Errors.log");
setScriptLibraryErrorFile(sd2LogFile.c_str(), "SD2");
if (configFailure)
script_error_log("Unable to open configuration file. Database will be unaccessible. Configuration values will use default.");
// Check config file version
if (SD2Config.GetIntDefault("ConfVersion", 0) != _MANGOSDCONFVERSION)
script_error_log("Configuration file version doesn't match expected version. Some config variables may be wrong or missing.");
outstring_log("");
// Load database (must be called after SD2Config.SetSource).
LoadDatabase();
outstring_log("SD2: Loading C++ scripts");
BarGoLink bar(1);
bar.step();
outstring_log("");
// Resize script ids to needed ammount of assigned ScriptNames (from core)
m_scripts.resize(GetScriptIdsCount(), NULL);
FillSpellSummary();
AddScripts();
// Check existance scripts for all registered by core script names
for (uint32 i = 1; i < GetScriptIdsCount(); ++i)
{
if (!m_scripts[i])
script_error_log("No script found for ScriptName '%s'.", GetScriptName(i));
}
outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
}
示例7: InitScriptLibrary
MANGOS_DLL_EXPORT
void InitScriptLibrary()
{
// ScriptDev2 startup
outstring_log("");
outstring_log(" MMM MMM MM");
outstring_log("M MM M M M M");
outstring_log("MM M M M");
outstring_log(" MMM M M M");
outstring_log(" MM M M MMMM");
outstring_log("MM M M M ");
outstring_log(" MMM MMM http://www.scriptdev2.com");
outstring_log("R2 modifications included (https://github.com/mangosR2/scriptdev2)");
outstring_log(_VERSION);
// Get configuration file
if (!SD2Config.SetSource(_SCRIPTDEV2_CONFIG))
error_log("SD2: Unable to open configuration file. Database will be unaccessible. Configuration values will use default.");
else
outstring_log("SD2: Using configuration file %s",_SCRIPTDEV2_CONFIG);
// Check config file version
if (SD2Config.GetIntDefault("ConfVersion", 0) != SD2_CONF_VERSION)
error_log("SD2: Configuration file version doesn't match expected version. Some config variables may be wrong or missing.");
outstring_log("");
// Load database (must be called after SD2Config.SetSource).
LoadDatabase();
outstring_log("SD2: Loading C++ scripts");
BarGoLink bar(1);
bar.step();
outstring_log("");
// Resize script ids to needed ammount of assigned ScriptNames (from core)
m_scripts.resize(GetScriptIdsCount(), NULL);
m_scriptStorage.clear();
FillSpellSummary();
AddScripts();
// Check existance scripts for all registered by core script names
for (uint32 i = 1; i < GetScriptIdsCount(); ++i)
{
if (!m_scripts[i])
error_log("SD2: No script found for ScriptName '%s'.", GetScriptName(i));
}
outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
}
示例8: getMSTime
void ScriptMgr::Initialize()
{
uint32 oldMSTime = getMSTime();
LoadDatabase();
TC_LOG_INFO("server.loading", "Loading C++ scripts");
FillSpellSummary();
AddScripts();
TC_LOG_INFO("server.loading", ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
}
示例9: getMSTime
void ScriptMgr::Initialize()
{
uint32 oldMSTime = getMSTime();
LoadDatabase();
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading C++ scripts");
FillSpellSummary();
AddScripts();
sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
}
示例10: getMSTime
void ScriptMgr::Initialize()
{
uint32 oldMSTime = getMSTime();
LoadDatabase();
sLog->outString("Loading C++ scripts");
FillSpellSummary();
AddScripts();
sLog->outString(">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
示例11: getMSTime
void ScriptMgr::Initialize()
{
uint32 oldMSTime = getMSTime();
LoadDatabase();
// Load TeleNPC2 - maybe not the best place to load it ...
LoadNpcTele();
TC_LOG_INFO("server.loading", "Loading C++ scripts");
FillSpellSummary();
AddScripts();
TC_LOG_INFO("server.loading", ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
}
示例12: getMSTime
void ScriptMgr::Initialize()
{
uint32 oldMSTime = getMSTime();
LoadDatabase();
// Load TeleNPC2 - maybe not the best place to load it ...
LoadNpcTele();
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading C++ scripts");
FillSpellSummary();
AddScripts();
sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
}
示例13: InitScriptLibrary
MANGOS_DLL_EXPORT
void InitScriptLibrary()
{
//ScriptDevZero startup
outstring_log("");
outstring_log("ScriptDevZero http://www.github.com/scriptdev/scriptdevzero/");
outstring_log("");
outstring_log("Fork of: ");
outstring_log(" MMM MMM MM");
outstring_log("M MM M M M M");
outstring_log("MM M M M");
outstring_log(" MMM M M M");
outstring_log(" MM M M MMMM");
outstring_log("MM M M M ");
outstring_log(" MMM MMM http://www.scriptdev2.com");
outstring_log("");
//Get configuration file
if (!SD0Config.SetSource(_SCRIPTDEVZERO_CONFIG))
error_log("SD2: Unable to open configuration file. Database will be unaccessible. Configuration values will use default.");
else
outstring_log("SD2: Using configuration file %s",_SCRIPTDEVZERO_CONFIG);
//Check config file version
if (SD0Config.GetIntDefault("ConfVersion", 0) != SD0_CONF_VERSION)
error_log("SD2: Configuration file version doesn't match expected version. Some config variables may be wrong or missing.");
outstring_log("");
//Load database (must be called after SD2Config.SetSource).
LoadDatabase();
outstring_log("SD2: Loading C++ scripts");
BarGoLink bar(1);
bar.step();
outstring_log("");
for(int i=0; i<MAX_SCRIPTS; ++i)
m_scripts[i]=NULL;
FillSpellSummary();
AddScripts();
outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
}
示例14: InitScriptLibrary
MANGOS_DLL_EXPORT
void InitScriptLibrary()
{
//ScriptDev2 startup
outstring_log("");
outstring_log("===========================================================================");
outstring_log(" P R O J E C T - The ChgMangos Project by Chglove ");
outstring_log(" Wish everyone can enjoy my work! ");
outstring_log("ChgMangos v1.3.0 beta ");
outstring_log("Mangos 11304,SD2 2016, ChgMangosDB v1.3.0 with ACID 3.0.8 full ");
outstring_log("===========================================================================");
//Get configuration file
if (!SD2Config.SetSource(_SCRIPTDEV2_CONFIG))
error_log("脚本库: 打开配置文件失败,系统将使用默认配置! ");
else
outstring_log("脚本库: 使用配置文件 %s",_SCRIPTDEV2_CONFIG);
//Check config file version
if (SD2Config.GetIntDefault("ConfVersion", 0) != SD2_CONF_VERSION)
error_log("脚本库: 配置文件版本不正确,可能过期了?一些功能将无法使用或不正常。 ");
outstring_log("");
//Load database (must be called after SD2Config.SetSource).
LoadDatabase();
outstring_log("脚本库: 加载C++脚本数据 ");
barGoLink bar(1);
bar.step();
outstring_log("");
for(int i=0; i<MAX_SCRIPTS; ++i)
m_scripts[i]=NULL;
m_scriptStorage.clear();
FillSpellSummary();
AddScripts();
SD2P_NAMESPACE::LoadScripts();
outstring_log(">> 加载了 %i 个脚本数据", num_sc_scripts);
}
示例15: ScriptsInit
TRINITY_DLL_EXPORT
void ScriptsInit(char const* cfg_file = _TRINITY_SCRIPT_CONFIG)
{
//Trinity Script startup
outstring_log(" _____ _ _ _ ____ _ _");
outstring_log("|_ _| __(_)_ __ (_) |_ _ _/ ___| ___ _ __(_)_ __ | |_ ");
outstring_log(" | || '__| | '_ \\| | __| | | \\___ \\ / __| \'__| | \'_ \\| __|");
outstring_log(" | || | | | | | | | |_| |_| |___) | (__| | | | |_) | |_ ");
outstring_log(" |_||_| |_|_| |_|_|\\__|\\__, |____/ \\___|_| |_| .__/ \\__|");
outstring_log(" |___/ |_| ");
outstring_log("Trinity Script initializing %s", _FULLVERSION);
outstring_log("");
//Get configuration file
if (!TScriptConfig.SetSource(cfg_file))
error_log("TSCR: Unable to open configuration file. Database will be unaccessible. Configuration values will use default.");
else
outstring_log("TSCR: Using configuration file %s",cfg_file);
outstring_log("");
//Load database (must be called after SD2Config.SetSource).
LoadDatabase();
outstring_log("TSCR: Loading C++ scripts");
barGoLink bar(1);
bar.step();
outstring_log("");
for (uint16 i =0; i<MAX_SCRIPTS; ++i)
m_scripts[i]=NULL;
FillSpellSummary();
AddScripts();
outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
outstring_log(">> Load Overriden SQL Data.");
LoadOverridenSQLData();
outstring_log(">> Load Overriden DBC Data.");
LoadOverridenDBCData();
}