mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-23 19:17:54 +00:00
[Code] ZoneStore Global to Singleton Cleanup (#4934)
This commit is contained in:
+1
-1
@@ -2368,7 +2368,7 @@ bool Client::StoreCharacter(
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::string& zone_name = zone_store.GetZoneName(p_player_profile_struct->zone_id, true);
|
||||
const std::string& zone_name = ZoneStore::Instance()->GetZoneName(p_player_profile_struct->zone_id, true);
|
||||
if (Strings::EqualFold(zone_name, "UNKNOWN")) {
|
||||
p_player_profile_struct->zone_id = Zones::QEYNOS;
|
||||
}
|
||||
|
||||
+2
-2
@@ -1219,7 +1219,7 @@ void ConsoleCrossZoneMove(
|
||||
const auto& zone_short_name = !Strings::IsNumber(args[2]) ? args[2] : "";
|
||||
const uint16 instance_id = Strings::IsNumber(args[2]) ? static_cast<uint16>(Strings::ToUnsignedInt(args[2])) : 0;
|
||||
|
||||
const auto& z = !zone_short_name.empty() ? zone_store.GetZone(zone_short_name) : nullptr;
|
||||
const auto& z = !zone_short_name.empty() ? ZoneStore::Instance()->GetZone(zone_short_name) : nullptr;
|
||||
|
||||
if (z && !z->id) {
|
||||
connection->SendLine(fmt::format("No zone with the short name '{}' exists.", zone_short_name));
|
||||
@@ -1289,7 +1289,7 @@ void ConsoleWorldWideMove(
|
||||
const auto& zone_short_name = !Strings::IsNumber(args[2]) ? args[2] : "";
|
||||
const uint16 instance_id = Strings::IsNumber(args[2]) ? static_cast<uint16>(Strings::ToUnsignedInt(args[2])) : 0;
|
||||
|
||||
const auto& z = !zone_short_name.empty() ? zone_store.GetZone(zone_short_name) : nullptr;
|
||||
const auto& z = !zone_short_name.empty() ? ZoneStore::Instance()->GetZone(zone_short_name) : nullptr;
|
||||
|
||||
if (z && !z->id) {
|
||||
connection->SendLine(fmt::format("No zone with the short name '{}' exists.", zone_short_name));
|
||||
|
||||
@@ -91,7 +91,6 @@
|
||||
#include "../common/repositories/character_parcels_repository.h"
|
||||
#include "../common/ip_util.h"
|
||||
|
||||
ZoneStore zone_store;
|
||||
ClientList client_list;
|
||||
GroupLFPList LFPGroupList;
|
||||
ZSList zoneserver_list;
|
||||
|
||||
@@ -279,9 +279,9 @@ bool WorldBoot::DatabaseLoadRoutines(int argc, char **argv)
|
||||
|
||||
LogInfo("Loading zones");
|
||||
|
||||
zone_store.LoadZones(content_db);
|
||||
ZoneStore::Instance()->LoadZones(content_db);
|
||||
|
||||
if (zone_store.GetZones().empty()) {
|
||||
if (ZoneStore::Instance()->GetZones().empty()) {
|
||||
LogError("Failed to load zones data, check your schema for possible errors");
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user