[Code] WorldContentServer Global to Singleton Cleanup (#4939)

This commit is contained in:
Alex King
2025-06-25 15:55:39 -04:00
committed by GitHub
parent c99bda3f47
commit c0bb32ed12
20 changed files with 156 additions and 156 deletions
+8 -8
View File
@@ -72,7 +72,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
int(zone_mode)
);
content_service.HandleZoneRoutingMiddleware(zc);
WorldContentService::Instance()->HandleZoneRoutingMiddleware(zc);
uint16 target_zone_id = 0;
auto target_instance_id = zc->instanceID;
@@ -349,19 +349,19 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
//TODO: ADVENTURE ENTRANCE CHECK
// Expansion checks and routing
if (content_service.GetCurrentExpansion() >= Expansion::Classic && !GetGM()) {
if (WorldContentService::Instance()->GetCurrentExpansion() >= Expansion::Classic && !GetGM()) {
bool meets_zone_expansion_check = false;
auto z = ZoneStore::Instance()->GetZoneWithFallback(ZoneID(target_zone_name), 0);
if (z->expansion <= content_service.GetCurrentExpansion() || z->bypass_expansion_check) {
if (z->expansion <= WorldContentService::Instance()->GetCurrentExpansion() || z->bypass_expansion_check) {
meets_zone_expansion_check = true;
}
LogZoning(
"Checking zone request [{}] for expansion [{}] ({}) success [{}]",
target_zone_name,
(content_service.GetCurrentExpansion()),
content_service.GetCurrentExpansionName(),
(WorldContentService::Instance()->GetCurrentExpansion()),
WorldContentService::Instance()->GetCurrentExpansionName(),
meets_zone_expansion_check ? "true" : "false"
);
@@ -370,7 +370,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
}
}
if (content_service.GetCurrentExpansion() >= Expansion::Classic && GetGM()) {
if (WorldContentService::Instance()->GetCurrentExpansion() >= Expansion::Classic && GetGM()) {
LogInfo("[{}] Bypassing zone expansion checks because GM flag is set", GetCleanName());
Message(Chat::White, "Your GM flag allows you to bypass zone expansion checks.");
}
@@ -763,7 +763,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
pZoneName = strcpy(new char[zd->long_name.length() + 1], zd->long_name.c_str());
}
auto r = content_service.FindZone(zoneID, instance_id);
auto r = WorldContentService::Instance()->FindZone(zoneID, instance_id);
if (r.zone_id) {
zoneID = r.zone_id;
instance_id = r.instance.id;
@@ -781,7 +781,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
);
// If we are zoning to the same zone, we need to use the current instance ID if it is not specified.
if (content_service.IsInPublicStaticInstance(instance_id) && zoneID == zone->GetZoneID() && instance_id == 0) {
if (WorldContentService::Instance()->IsInPublicStaticInstance(instance_id) && zoneID == zone->GetZoneID() && instance_id == 0) {
instance_id = zone->GetInstanceID();
}
}