Reduced #repop time dramatically by taking down hundreds of individual SELECT/DELETE/INSERT queries in routines and bringing it down to very few

See: https://www.youtube.com/watch?v=9kSFbyTBuAk
This commit is contained in:
Akkadius
2015-02-08 05:01:58 -06:00
parent 1149f04389
commit cb81d956f6
6 changed files with 119 additions and 41 deletions
+3
View File
@@ -931,6 +931,9 @@ bool Zone::Init(bool iStaticZone) {
Log.Out(Logs::General, Logs::Error, "Loading World Objects failed. continuing.");
}
Log.Out(Logs::General, Logs::Status, "Flushing old respawn timers...");
database.QueryDatabase("DELETE FROM `respawn_times` WHERE (`start` + `duration`) < UNIX_TIMESTAMP(NOW())");
//load up the zone's doors (prints inside)
zone->LoadZoneDoors(zone->GetShortName(), zone->GetInstanceVersion());
zone->LoadBlockedSpells(zone->GetZoneID());