mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user