Require zone id to get expedition by instance id

This is a breaking api change
eq.get_expedition_by_instance_id(instance_id) is replaced with
eq.get_expedition_by_zone_instance(zone_id, instance_id)

This replaces the FindCachedExpeditionByInstanceID method of
obtaining expeditions via instance id with a new method that
requires the dz zone id as well
This commit is contained in:
hg
2020-10-04 19:20:54 -04:00
parent cd98b8bc6f
commit 79287fc507
6 changed files with 21 additions and 19 deletions
+4 -3
View File
@@ -353,13 +353,14 @@ Expedition* Expedition::FindCachedExpeditionByID(uint32_t expedition_id)
return nullptr;
}
Expedition* Expedition::FindCachedExpeditionByInstanceID(uint32_t instance_id)
Expedition* Expedition::FindCachedExpeditionByZoneInstance(uint32_t zone_id, uint32_t instance_id)
{
if (instance_id && zone)
if (zone && zone_id != 0 && instance_id != 0)
{
for (const auto& cached_expedition : zone->expedition_cache)
{
if (cached_expedition.second->GetInstanceID() == instance_id)
if (cached_expedition.second->GetDynamicZone().GetZoneID() == zone_id &&
cached_expedition.second->GetDynamicZone().GetInstanceID() == instance_id)
{
return cached_expedition.second.get();
}