本文整理汇总了C++中LauncherList::LoadList方法的典型用法代码示例。如果您正苦于以下问题:C++ LauncherList::LoadList方法的具体用法?C++ LauncherList::LoadList怎么用?C++ LauncherList::LoadList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LauncherList
的用法示例。
在下文中一共展示了LauncherList::LoadList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
_log(WORLD__INIT, "Clearing raids..");
database.ClearRaid();
database.ClearRaidDetails();
_log(WORLD__INIT, "Loading items..");
if (!database.LoadItems()) {
_log(WORLD__INIT_ERR, "Error: Could not load item data. But ignoring");
}
_log(WORLD__INIT, "Loading guilds..");
guild_mgr.LoadGuilds();
//rules:
{
char tmp[64];
if (database.GetVariable("RuleSet", tmp, sizeof(tmp)-1)) {
_log(WORLD__INIT, "Loading rule set '%s'", tmp);
if(!rules->LoadRules(&database, tmp)) {
_log(WORLD__INIT_ERR, "Failed to load ruleset '%s', falling back to defaults.", tmp);
}
} else {
if(!rules->LoadRules(&database, "default")) {
_log(WORLD__INIT, "No rule set configured, using default rules");
} else {
_log(WORLD__INIT, "Loaded default rule set 'default'", tmp);
}
}
}
if(RuleB(World, ClearTempMerchantlist)){
_log(WORLD__INIT, "Clearing temporary merchant lists..");
database.ClearMerchantTemp();
}
_log(WORLD__INIT, "Loading EQ time of day..");
if (!zoneserver_list.worldclock.loadFile(Config->EQTimeFile.c_str()))
_log(WORLD__INIT_ERR, "Unable to load %s", Config->EQTimeFile.c_str());
_log(WORLD__INIT, "Loading launcher list..");
launcher_list.LoadList();
char tmp[20];
tmp[0] = '\0';
database.GetVariable("holdzones",tmp, 20);
if ((strcasecmp(tmp, "1") == 0)) {
holdzones = true;
}
_log(WORLD__INIT, "Reboot zone modes %s",holdzones ? "ON" : "OFF");
_log(WORLD__INIT, "Deleted %i stale player corpses from database", database.DeleteStalePlayerCorpses());
_log(WORLD__INIT, "Deleted %i stale player backups from database", database.DeleteStalePlayerBackups());
_log(WORLD__INIT, "Purging expired instances");
database.PurgeExpiredInstances();
Timer PurgeInstanceTimer(450000);
PurgeInstanceTimer.Start(450000);
char errbuf[TCPConnection_ErrorBufferSize];
if (tcps.Open(Config->WorldTCPPort, errbuf)) {
_log(WORLD__INIT,"Zone (TCP) listener started.");
} else {
_log(WORLD__INIT_ERR,"Failed to start zone (TCP) listener on port %d:",Config->WorldTCPPort);
_log(WORLD__INIT_ERR," %s",errbuf);
return 1;
}
if (eqsf.Open()) {
_log(WORLD__INIT,"Client (UDP) listener started.");
} else {
_log(WORLD__INIT_ERR,"Failed to start client (UDP) listener (port 9000)");
return 1;
}
示例2: main
//.........这里部分代码省略.........
_log(WORLD__INIT, "Clearing raids..");
database.ClearRaid();
database.ClearRaidDetails();
_log(WORLD__INIT, "Loading items..");
if (!database.LoadItems()) {
_log(WORLD__INIT_ERR, "Error: Could not load item data. But ignoring");
}
_log(WORLD__INIT, "Loading guilds..");
guild_mgr.LoadGuilds();
//rules:
{
char tmp[64];
if (database.GetVariable("RuleSet", tmp, sizeof(tmp)-1)) {
_log(WORLD__INIT, "Loading rule set '%s'", tmp);
if(!RuleManager::Instance()->LoadRules(&database, tmp)) {
_log(WORLD__INIT_ERR, "Failed to load ruleset '%s', falling back to defaults.", tmp);
}
} else {
if(!RuleManager::Instance()->LoadRules(&database, "default")) {
_log(WORLD__INIT, "No rule set configured, using default rules");
} else {
_log(WORLD__INIT, "Loaded default rule set 'default'", tmp);
}
}
}
if(RuleB(World, ClearTempMerchantlist)){
_log(WORLD__INIT, "Clearing temporary merchant lists..");
database.ClearMerchantTemp();
}
_log(WORLD__INIT, "Loading EQ time of day..");
if (!zoneserver_list.worldclock.loadFile(Config->EQTimeFile.c_str()))
_log(WORLD__INIT_ERR, "Unable to load %s", Config->EQTimeFile.c_str());
_log(WORLD__INIT, "Loading launcher list..");
launcher_list.LoadList();
char tmp[20];
tmp[0] = '\0';
database.GetVariable("holdzones",tmp, 20);
if ((strcasecmp(tmp, "1") == 0)) {
holdzones = true;
}
_log(WORLD__INIT, "Reboot zone modes %s",holdzones ? "ON" : "OFF");
_log(WORLD__INIT, "Deleted %i stale player corpses from database", database.DeleteStalePlayerCorpses());
if (RuleB(World, DeleteStaleCorpeBackups) == true) {
_log(WORLD__INIT, "Deleted %i stale player backups from database", database.DeleteStalePlayerBackups());
}
_log(WORLD__INIT, "Loading adventures...");
if(!adventure_manager.LoadAdventureTemplates())
{
_log(WORLD__INIT_ERR, "Unable to load adventure templates.");
}
if(!adventure_manager.LoadAdventureEntries())
{
_log(WORLD__INIT_ERR, "Unable to load adventure templates.");
}
adventure_manager.Load();
adventure_manager.LoadLeaderboardInfo();
_log(WORLD__INIT, "Purging expired instances");
database.PurgeExpiredInstances();
Timer PurgeInstanceTimer(450000);
PurgeInstanceTimer.Start(450000);
示例3: main
//.........这里部分代码省略.........
std::string tmp;
if (database.GetVariable("RuleSet", tmp)) {
Log(Logs::General, Logs::World_Server, "Loading rule set '%s'", tmp.c_str());
if (!RuleManager::Instance()->LoadRules(&database, tmp.c_str())) {
Log(Logs::General, Logs::World_Server, "Failed to load ruleset '%s', falling back to defaults.", tmp.c_str());
}
}
else {
if (!RuleManager::Instance()->LoadRules(&database, "default")) {
Log(Logs::General, Logs::World_Server, "No rule set configured, using default rules");
}
else {
Log(Logs::General, Logs::World_Server, "Loaded default rule set 'default'", tmp.c_str());
}
}
}
if (RuleB(World, ClearTempMerchantlist)) {
Log(Logs::General, Logs::World_Server, "Clearing temporary merchant lists..");
database.ClearMerchantTemp();
}
RuleManager::Instance()->SaveRules(&database);
Log(Logs::General, Logs::World_Server, "Loading EQ time of day..");
TimeOfDay_Struct eqTime;
time_t realtime;
eqTime = database.LoadTime(realtime);
zoneserver_list.worldclock.SetCurrentEQTimeOfDay(eqTime, realtime);
Timer EQTimeTimer(600000);
EQTimeTimer.Start(600000);
Log(Logs::General, Logs::World_Server, "Loading launcher list..");
launcher_list.LoadList();
std::string tmp;
database.GetVariable("holdzones", tmp);
if (tmp.length() == 1 && tmp[0] == '1') {
holdzones = true;
}
Log(Logs::General, Logs::World_Server, "Reboot zone modes %s", holdzones ? "ON" : "OFF");
Log(Logs::General, Logs::World_Server, "Deleted %i stale player corpses from database", database.DeleteStalePlayerCorpses());
Log(Logs::General, Logs::World_Server, "Loading adventures...");
if (!adventure_manager.LoadAdventureTemplates())
{
Log(Logs::General, Logs::World_Server, "Unable to load adventure templates.");
}
if (!adventure_manager.LoadAdventureEntries())
{
Log(Logs::General, Logs::World_Server, "Unable to load adventure templates.");
}
adventure_manager.Load();
adventure_manager.LoadLeaderboardInfo();
Log(Logs::General, Logs::World_Server, "Purging expired instances");
database.PurgeExpiredInstances();
Timer PurgeInstanceTimer(450000);
PurgeInstanceTimer.Start(450000);
Log(Logs::General, Logs::World_Server, "Loading char create info...");
database.LoadCharacterCreateAllocations();
database.LoadCharacterCreateCombos();