[Expeditions] Cleanup client dz safe return methods (#1300)

This changes Zone::GetDynamicZone to return a pointer instead of a copy
and also lets DynamicZone be forward declared in zone.h
This commit is contained in:
hg
2021-03-19 00:42:20 -04:00
committed by GitHub
parent 739b975cad
commit ee4af65268
5 changed files with 21 additions and 30 deletions
+1 -10
View File
@@ -5251,16 +5251,7 @@ std::unordered_map<uint16, Mob *> &EntityList::GetCloseMobList(Mob *mob, float d
void EntityList::GateAllClientsToSafeReturn()
{
DynamicZone dz;
if (zone)
{
dz = zone->GetDynamicZone();
LogDynamicZones(
"Sending all clients in zone: [{}] instance: [{}] to dz safereturn or bind",
zone->GetZoneID(), zone->GetInstanceID()
);
}
DynamicZone* dz = zone ? zone->GetDynamicZone() : nullptr;
for (const auto& client_list_iter : client_list)
{