mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-29 12:47:54 +00:00
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:
+4
-3
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user