Implement world cache to monitor expeditions

This implements a small cache in world to track expedition states.

This fixes expired expeditions being left in zone caches unless the
expedition's dz instance was running to detect it (or unless an
expedition was deleted via a client using /kickplayers). This was also
leaving clients in a ghost expedition that no longer actually existed
This commit is contained in:
hg
2020-05-25 22:05:02 -04:00
parent 33f2336244
commit dcbcc5a156
9 changed files with 299 additions and 25 deletions
+8 -4
View File
@@ -431,8 +431,11 @@ int main(int argc, char** argv) {
PurgeInstanceTimer.Start(450000);
LogInfo("Purging expired expeditions");
Expedition::PurgeExpiredExpeditions();
Expedition::PurgeExpiredCharacterLockouts();
ExpeditionDatabase::PurgeExpiredExpeditions();
ExpeditionDatabase::PurgeExpiredCharacterLockouts();
LogInfo("Loading active expeditions");
expedition_cache.LoadActiveExpeditions();
LogInfo("Loading char create info");
content_db.LoadCharacterCreateAllocations();
@@ -604,8 +607,8 @@ int main(int argc, char** argv) {
if (PurgeInstanceTimer.Check()) {
database.PurgeExpiredInstances();
database.PurgeAllDeletedDataBuckets();
Expedition::PurgeExpiredExpeditions();
Expedition::PurgeExpiredCharacterLockouts();
ExpeditionDatabase::PurgeExpiredExpeditions();
ExpeditionDatabase::PurgeExpiredCharacterLockouts();
}
if (EQTimeTimer.Check()) {
@@ -621,6 +624,7 @@ int main(int argc, char** argv) {
launcher_list.Process();
LFPGroupList.Process();
adventure_manager.Process();
expedition_cache.Process();
if (InterserverTimer.Check()) {
InterserverTimer.Start();