Move CDClientManager to be a namespace (#1431)

Tested that worlds still load data as expected.  Had no use being a singleton anyways.
This commit is contained in:
David Markowitz
2024-02-08 21:40:43 -08:00
committed by GitHub
parent 24f94edfeb
commit dc29f5962d
44 changed files with 128 additions and 142 deletions

View File

@@ -208,7 +208,7 @@ void Level::ReadSceneObjectDataChunk(std::istream& file, Header& header) {
uint32_t objectsCount = 0;
BinaryIO::BinaryRead(file, objectsCount);
CDFeatureGatingTable* featureGatingTable = CDClientManager::Instance().GetTable<CDFeatureGatingTable>();
CDFeatureGatingTable* featureGatingTable = CDClientManager::GetTable<CDFeatureGatingTable>();
CDFeatureGating gating;
gating.major = 1;

View File

@@ -154,7 +154,7 @@ void Zone::LoadZoneIntoMemory() {
std::string Zone::GetFilePathForZoneID() {
//We're gonna go ahead and presume we've got the db loaded already:
CDZoneTableTable* zoneTable = CDClientManager::Instance().GetTable<CDZoneTableTable>();
CDZoneTableTable* zoneTable = CDClientManager::GetTable<CDZoneTableTable>();
const CDZoneTable* zone = zoneTable->Query(this->GetZoneID().GetMapID());
if (zone != nullptr) {
std::string toReturn = "maps/" + zone->zoneName;

View File

@@ -29,7 +29,7 @@ void dZoneManager::Initialize(const LWOZONEID& zoneID) {
LOT zoneControlTemplate = 2365;
CDZoneTableTable* zoneTable = CDClientManager::Instance().GetTable<CDZoneTableTable>();
CDZoneTableTable* zoneTable = CDClientManager::GetTable<CDZoneTableTable>();
if (zoneTable != nullptr) {
const CDZoneTable* zone = zoneTable->Query(zoneID.GetMapID());
@@ -208,7 +208,7 @@ uint32_t dZoneManager::GetUniqueMissionIdStartingValue() {
bool dZoneManager::CheckIfAccessibleZone(LWOMAPID zoneID) {
//We're gonna go ahead and presume we've got the db loaded already:
CDZoneTableTable* zoneTable = CDClientManager::Instance().GetTable<CDZoneTableTable>();
CDZoneTableTable* zoneTable = CDClientManager::GetTable<CDZoneTableTable>();
const CDZoneTable* zone = zoneTable->Query(zoneID);
if (zone != nullptr) {
return Game::assetManager->HasFile(("maps/" + zone->zoneName).c_str());