mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 16:28:28 +00:00
Rewrite VarCache_Struct
Basically just remove manual memory management
This commit is contained in:
+13
-13
@@ -254,20 +254,20 @@ int main(int argc, char** argv) {
|
||||
|
||||
Log.Out(Logs::General, Logs::Zone_Server, "Mapping Incoming Opcodes");
|
||||
MapOpcodes();
|
||||
|
||||
|
||||
Log.Out(Logs::General, Logs::Zone_Server, "Loading Variables");
|
||||
database.LoadVariables();
|
||||
|
||||
char hotfix_name[256] = { 0 };
|
||||
if(database.GetVariable("hotfix_name", hotfix_name, 256)) {
|
||||
if(strlen(hotfix_name) > 0) {
|
||||
Log.Out(Logs::General, Logs::Zone_Server, "Current hotfix in use: '%s'", hotfix_name);
|
||||
|
||||
std::string hotfix_name;
|
||||
if(database.GetVariable("hotfix_name", hotfix_name)) {
|
||||
if(!hotfix_name.empty()) {
|
||||
Log.Out(Logs::General, Logs::Zone_Server, "Current hotfix in use: '%s'", hotfix_name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
Log.Out(Logs::General, Logs::Zone_Server, "Loading zone names");
|
||||
database.LoadZoneNames();
|
||||
|
||||
|
||||
Log.Out(Logs::General, Logs::Zone_Server, "Loading items");
|
||||
if(!database.LoadItems(hotfix_name)) {
|
||||
Log.Out(Logs::General, Logs::Error, "Loading items FAILED!");
|
||||
@@ -326,17 +326,17 @@ int main(int argc, char** argv) {
|
||||
|
||||
//rules:
|
||||
{
|
||||
char tmp[64];
|
||||
if (database.GetVariable("RuleSet", tmp, sizeof(tmp)-1)) {
|
||||
Log.Out(Logs::General, Logs::Zone_Server, "Loading rule set '%s'", tmp);
|
||||
if(!RuleManager::Instance()->LoadRules(&database, tmp)) {
|
||||
Log.Out(Logs::General, Logs::Error, "Failed to load ruleset '%s', falling back to defaults.", tmp);
|
||||
std::string tmp;
|
||||
if (database.GetVariable("RuleSet", tmp)) {
|
||||
Log.Out(Logs::General, Logs::Zone_Server, "Loading rule set '%s'", tmp.c_str());
|
||||
if(!RuleManager::Instance()->LoadRules(&database, tmp.c_str())) {
|
||||
Log.Out(Logs::General, Logs::Error, "Failed to load ruleset '%s', falling back to defaults.", tmp.c_str());
|
||||
}
|
||||
} else {
|
||||
if(!RuleManager::Instance()->LoadRules(&database, "default")) {
|
||||
Log.Out(Logs::General, Logs::Zone_Server, "No rule set configured, using default rules");
|
||||
} else {
|
||||
Log.Out(Logs::General, Logs::Zone_Server, "Loaded default rule set 'default'", tmp);
|
||||
Log.Out(Logs::General, Logs::Zone_Server, "Loaded default rule set 'default'", tmp.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user