mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[Zoning] Zone routing adjustment (#4162)
This commit is contained in:
parent
b90139bd9a
commit
ee3d02bac6
@ -287,9 +287,14 @@ WorldContentService * WorldContentService::LoadZones()
|
|||||||
// era contextual routing, multiple version of zones, etc
|
// era contextual routing, multiple version of zones, etc
|
||||||
WorldContentService::FindZoneResult WorldContentService::FindZone(uint32 zone_id, uint32 instance_id)
|
WorldContentService::FindZoneResult WorldContentService::FindZone(uint32 zone_id, uint32 instance_id)
|
||||||
{
|
{
|
||||||
// if we're already in a regular instance, we don't want to route the player to another instance
|
// if there's an active dynamic instance, we don't need to route
|
||||||
if (instance_id > RuleI(Instances, ReservedInstances)) {
|
if (instance_id > 0) {
|
||||||
return WorldContentService::FindZoneResult{};
|
auto inst = InstanceListRepository::FindOne(*GetDatabase(), instance_id);
|
||||||
|
if (inst.id != 0 && !inst.is_global && !inst.never_expires) {
|
||||||
|
return WorldContentService::FindZoneResult{
|
||||||
|
.zone_id = 0,
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto &z: m_zones) {
|
for (auto &z: m_zones) {
|
||||||
@ -349,6 +354,6 @@ WorldContentService::FindZoneResult WorldContentService::FindZone(uint32 zone_id
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return WorldContentService::FindZoneResult{};
|
return WorldContentService::FindZoneResult{.zone_id = 0};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user