mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 15:00:25 +00:00
Changed NPCTypes Data to bulk load when the zone loads or Repops, this bulk loading is stored in the npc_types cache
This commit is contained in:
+4
-1
@@ -183,7 +183,7 @@ bool Spawn2::Process() {
|
||||
}
|
||||
|
||||
//try to find our NPC type.
|
||||
const NPCType* tmp = database.GetNPCType(npcid);
|
||||
const NPCType* tmp = database.LoadNPCTypesData(npcid);
|
||||
if (tmp == nullptr) {
|
||||
Log.Out(Logs::Detail, Logs::Spawns, "Spawn2 %d: Spawn group %d yeilded an invalid NPC type %d", spawn2_id, spawngroup_id_, npcid);
|
||||
Reset(); //try again later
|
||||
@@ -358,6 +358,9 @@ bool ZoneDatabase::PopulateZoneSpawnList(uint32 zoneid, LinkedList<Spawn2*> &spa
|
||||
timeval tv;
|
||||
gettimeofday(&tv, nullptr);
|
||||
|
||||
/* Bulk Load NPC Types Data into the cache */
|
||||
database.LoadNPCTypesData(0, true);
|
||||
|
||||
std::string spawn_query = StringFormat(
|
||||
"SELECT "
|
||||
"respawn_times.id, "
|
||||
|
||||
Reference in New Issue
Block a user