mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-22 11:38:29 +00:00
[Zone] Zone State Improvements Part 3 (#4773)
* [Zone State] Additional improvements * Return early * Update zone_save_state.cpp * Push * Push * Update zone.cpp * Update zone_save_state.cpp * Equip items that were dynamically added on restore * IsZoneStateValid helper * ZoneStateSpawnsRepository::PurgeInvalidZoneStates * Add Zone:StateSaveClearDays and PurgeOldZoneStates * spawn2 / unique_spawn block when restored from zone state * One time purge * Update zone_state_spawns_repository.h * Update npc.cpp * Update npc.cpp * test * ORDER BY spawn2_id * Stuff * Restored corpses shouldn't trigger events * Fix weird edge case
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "../common/zone_store.h"
|
||||
#include "../common/path_manager.h"
|
||||
#include "../common/database/database_update.h"
|
||||
#include "../common/repositories/zone_state_spawns_repository.h"
|
||||
|
||||
extern ZSList zoneserver_list;
|
||||
extern WorldConfig Config;
|
||||
@@ -412,6 +413,11 @@ bool WorldBoot::DatabaseLoadRoutines(int argc, char **argv)
|
||||
LogInfo("Cleaning up instance corpses");
|
||||
database.CleanupInstanceCorpses();
|
||||
|
||||
if (RuleB(Zone, StateSavingOnShutdown)) {
|
||||
ZoneStateSpawnsRepository::PurgeInvalidZoneStates(database);
|
||||
ZoneStateSpawnsRepository::PurgeOldZoneStates(database);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user