[Zoning] Fix zoning logic issues (#2412)

* [Zoning] Fix various zoning issues, flag logic, #zone etc

* Enforce character restrictions later in the connection process so we don't end up in a loop race condition in world
This commit is contained in:
Chris Miles
2022-09-03 00:57:57 -05:00
committed by GitHub
parent 034667f03b
commit ec857cefae
4 changed files with 85 additions and 61 deletions
+24
View File
@@ -59,6 +59,8 @@ uint32 ZoneStore::GetZoneID(std::string zone_name)
}
}
LogInfo("[GetZoneID] Failed to get zone_name [{}]", zone_name);
return 0;
}
@@ -79,6 +81,12 @@ const char *ZoneStore::GetZoneName(uint32 zone_id, bool error_unknown)
return "UNKNOWN";
}
LogInfo(
"[GetZoneName] Failed to get zone name by zone_id [{}] error_unknown [{}]",
zone_id,
(error_unknown ? "true" : "false")
);
return nullptr;
}
@@ -99,6 +107,12 @@ const char *ZoneStore::GetZoneLongName(uint32 zone_id, bool error_unknown)
return "UNKNOWN";
}
LogInfo(
"[GetZoneLongName] Failed to get zone long name by zone_id [{}] error_unknown [{}]",
zone_id,
(error_unknown ? "true" : "false")
);
return nullptr;
}
@@ -114,6 +128,8 @@ std::string ZoneStore::GetZoneName(uint32 zone_id)
}
}
LogInfo("[GetZoneName] Failed to get zone long name by zone_id [{}]", zone_id);
return {};
}
@@ -129,6 +145,8 @@ std::string ZoneStore::GetZoneLongName(uint32 zone_id)
}
}
LogInfo("[GetZoneLongName] Failed to get zone long name by zone_id [{}]", zone_id);
return {};
}
@@ -145,6 +163,8 @@ ZoneRepository::Zone *ZoneStore::GetZone(uint32 zone_id, int version)
}
}
LogInfo("[GetZone] Failed to get zone by zone_id [{}] version [{}]", zone_id, version);
return nullptr;
}
@@ -160,6 +180,8 @@ ZoneRepository::Zone *ZoneStore::GetZone(const char *in_zone_name)
}
}
LogInfo("[GetZone] Failed to get zone by zone_name [{}]", in_zone_name);
return nullptr;
}
@@ -184,5 +206,7 @@ ZoneRepository::Zone *ZoneStore::GetZoneWithFallback(uint32 zone_id, int version
}
}
LogInfo("[GetZoneWithFallback] Failed to get zone by zone_id [{}] version [{}]", zone_id, version);
return nullptr;
}