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
+2 -2
View File
@@ -297,7 +297,7 @@ Mob* QuestManager::spawn_from_spawn2(uint32 spawn2_id)
}
}
database.UpdateSpawn2Timeleft(spawn2_id, zone->GetInstanceID(), 0);
database.UpdateRespawnTime(spawn2_id, zone->GetInstanceID(), 0);
found_spawn->SetCurrentNPCID(npcid);
auto position = glm::vec4(found_spawn->GetX(), found_spawn->GetY(), found_spawn->GetZ(), found_spawn->GetHeading());
@@ -2388,7 +2388,7 @@ void QuestManager::UpdateSpawnTimer(uint32 id, uint32 newTime)
{
bool found = false;
database.UpdateSpawn2Timeleft(id, 0, (newTime/1000));
database.UpdateRespawnTime(id, 0, (newTime/1000));
LinkedListIterator<Spawn2*> iterator(zone->spawn2_list);
iterator.Reset();
while (iterator.MoreElements())