Implemented #repopclose [distance in units] - Used for development purposes, defaults to 500 units

- Real case use: Large zones with 700 NPC's and you are making fast quick tweaks to nearby NPC's you can refresh just the NPC's around you instead of all in the zone
- This can be quite the time saver
- This command will depop all NPC's and only respawn the NPC's that are 500 units around you or unless you specify otherwise
This commit is contained in:
Akkadius
2015-11-07 13:20:24 -06:00
parent 86f35e45d3
commit d64205124f
7 changed files with 171 additions and 3 deletions
+23
View File
@@ -1445,6 +1445,29 @@ void Zone::ClearNPCTypeCache(int id) {
}
}
void Zone::RepopClose(const glm::vec4& client_position, uint32 repop_distance)
{
if (!Depop())
return;
LinkedListIterator<Spawn2*> iterator(spawn2_list);
iterator.Reset();
while (iterator.MoreElements()) {
iterator.RemoveCurrent();
}
quest_manager.ClearAllTimers();
if (!database.PopulateZoneSpawnListClose(zoneid, spawn2_list, GetInstanceVersion(), client_position, repop_distance))
Log.Out(Logs::General, Logs::None, "Error in Zone::Repop: database.PopulateZoneSpawnList failed");
initgrids_timer.Start();
mod_repop();
}
void Zone::Repop(uint32 delay) {
if(!Depop())