Initial work on shared memory hotfixes

This commit is contained in:
KimLS
2015-06-23 17:39:06 -07:00
parent 32e880f571
commit 67143f1b8a
23 changed files with 266 additions and 185 deletions
+8 -2
View File
@@ -294,6 +294,12 @@ int main(int argc, char** argv) {
}
Log.Out(Logs::General, Logs::World_Server, "Loading variables..");
database.LoadVariables();
char hotfix_name[256] = { 0 };
if(database.GetVariable("hotfix_name", hotfix_name, 256)) {
Log.Out(Logs::General, Logs::Zone_Server, "Current hotfix in use: %s", hotfix_name);
}
Log.Out(Logs::General, Logs::World_Server, "Loading zones..");
database.LoadZoneNames();
Log.Out(Logs::General, Logs::World_Server, "Clearing groups..");
@@ -303,10 +309,10 @@ int main(int argc, char** argv) {
database.ClearRaidDetails();
database.ClearRaidLeader();
Log.Out(Logs::General, Logs::World_Server, "Loading items..");
if (!database.LoadItems())
if(!database.LoadItems(hotfix_name))
Log.Out(Logs::General, Logs::World_Server, "Error: Could not load item data. But ignoring");
Log.Out(Logs::General, Logs::World_Server, "Loading skill caps..");
if (!database.LoadSkillCaps())
if(!database.LoadSkillCaps(std::string(hotfix_name)))
Log.Out(Logs::General, Logs::World_Server, "Error: Could not load skill cap data. But ignoring");
Log.Out(Logs::General, Logs::World_Server, "Loading guilds..");
guild_mgr.LoadGuilds();
+17 -4
View File
@@ -1286,10 +1286,6 @@ bool ZoneServer::Process() {
case ServerOP_CZSignalNPC:
case ServerOP_CZSetEntityVariableByNPCTypeID:
case ServerOP_CZSignalClient:
{
zoneserver_list.SendPacket(pack);
break;
}
case ServerOP_DepopAllPlayersCorpses:
case ServerOP_DepopPlayerCorpse:
case ServerOP_ReloadTitles:
@@ -1301,6 +1297,23 @@ bool ZoneServer::Process() {
zoneserver_list.SendPacket(pack);
break;
}
case ServerOP_ChangeSharedMem: {
std::string hotfix_name = std::string((char*)pack->pBuffer);
Log.Out(Logs::General, Logs::World_Server, "Loading items...");
if(!database.LoadItems(hotfix_name)) {
Log.Out(Logs::General, Logs::World_Server, "Error: Could not load item data. But ignoring");
}
Log.Out(Logs::General, Logs::World_Server, "Loading skill caps...");
if(!database.LoadSkillCaps(hotfix_name)) {
Log.Out(Logs::General, Logs::World_Server, "Error: Could not load skill cap data. But ignoring");
}
zoneserver_list.SendPacket(pack);
break;
}
case ServerOP_RequestTellQueue:
{
ServerRequestTellQueue_Struct* rtq = (ServerRequestTellQueue_Struct*) pack->pBuffer;