mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-30 13:47:57 +00:00
[Expeditions] Let dz process its expired state (#1310)
Move early empty shutdown and process rate rules to DynamicZone scope This decouples the expired status check from expeditions into an internal dz method that can be called by its owning system
This commit is contained in:
@@ -161,3 +161,21 @@ void Expedition::CheckLeader()
|
||||
ChooseNewLeader();
|
||||
}
|
||||
}
|
||||
|
||||
bool Expedition::Process()
|
||||
{
|
||||
// returns true if expedition needs to be deleted from world cache and db
|
||||
// expedition is not deleted until its dz has no clients to prevent exploits
|
||||
auto status = m_dynamic_zone.Process(IsEmpty()); // force expire if no members
|
||||
if (status == DynamicZoneStatus::ExpiredEmpty)
|
||||
{
|
||||
LogExpeditions("Expedition [{}] expired or empty, notifying zones and deleting", GetID());
|
||||
SendZonesExpeditionDeleted();
|
||||
return true;
|
||||
}
|
||||
|
||||
CheckExpireWarning();
|
||||
CheckLeader();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user