mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[File Paths] Implement Path Manager (#2440)
* Push up branch for testing * Path manager * Tweaks * Changes * More path work * Update paths for eqemu_server.pl * More path work * Import and export client files * Path remove * More path work * Update eqemu_config.h * Fix tests * Tests disable temp * Update eqemu_config.h * Update .drone.yml * Hook tests back up * Update main.cpp * Platform tests * Fix include * Use std::filesystem on windows * Fix IPCMutex name on windows * std::filesystem changes * Update path_manager.cpp * Explicit string cast * Explicit string cast * Update path_manager.cpp * Windows fixes * Mapped files * Relative fixes * Use relative paths off of cwd * Update Debian image to Debian 11 (updates GCC) Co-authored-by: hg <4683435+hgtw@users.noreply.github.com>
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "../strings.h"
|
||||
#include "../item_instance.h"
|
||||
#include "titanium_structs.h"
|
||||
#include "../path_manager.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
@@ -69,11 +70,7 @@ namespace Titanium
|
||||
auto Config = EQEmuConfig::get();
|
||||
//create our opcode manager if we havent already
|
||||
if (opcodes == nullptr) {
|
||||
//TODO: get this file name from the config file
|
||||
std::string opfile = Config->PatchDir;
|
||||
opfile += "patch_";
|
||||
opfile += name;
|
||||
opfile += ".conf";
|
||||
std::string opfile = fmt::format("{}/patch_{}.conf", path.GetPatchPath(), name);
|
||||
//load up the opcode manager.
|
||||
//TODO: figure out how to support shared memory with multiple patches...
|
||||
opcodes = new RegularOpcodeManager();
|
||||
@@ -114,12 +111,7 @@ namespace Titanium
|
||||
//we need to go to every stream and replace it's manager.
|
||||
|
||||
if (opcodes != nullptr) {
|
||||
//TODO: get this file name from the config file
|
||||
auto Config = EQEmuConfig::get();
|
||||
std::string opfile = Config->PatchDir;
|
||||
opfile += "patch_";
|
||||
opfile += name;
|
||||
opfile += ".conf";
|
||||
std::string opfile = fmt::format("{}/patch_{}.conf", path.GetPatchPath(), name);
|
||||
if (!opcodes->ReloadOpcodes(opfile.c_str())) {
|
||||
LogNetcode("[OPCODES] Error reloading opcodes file [{}] for patch [{}]", opfile.c_str(), name);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user