mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28: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
-6
@@ -1426,14 +1426,12 @@ bool Zone::Depop(bool StartSpawnTimer) {
|
||||
std::map<uint32,NPCType *>::iterator itr;
|
||||
entity_list.Depop(StartSpawnTimer);
|
||||
|
||||
#ifdef DEPOP_INVALIDATES_NPC_TYPES_CACHE
|
||||
// Refresh npctable, getting current info from database.
|
||||
while(npctable.size()) {
|
||||
itr=npctable.begin();
|
||||
/* Refresh npctable (cache), getting current info from database. */
|
||||
while(npctable.size()) {
|
||||
itr = npctable.begin();
|
||||
delete itr->second;
|
||||
npctable.erase(itr);
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -2165,7 +2163,7 @@ void Zone::DoAdventureActions()
|
||||
{
|
||||
if(ds->assa_count >= RuleI(Adventure, NumberKillsForBossSpawn))
|
||||
{
|
||||
const NPCType* tmp = database.GetNPCType(ds->data_id);
|
||||
const NPCType* tmp = database.LoadNPCTypesData(ds->data_id);
|
||||
if(tmp)
|
||||
{
|
||||
NPC* npc = new NPC(tmp, nullptr, glm::vec4(ds->assa_x, ds->assa_y, ds->assa_z, ds->assa_h), FlyMode3);
|
||||
|
||||
Reference in New Issue
Block a user