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
-4
@@ -203,7 +203,7 @@ void QuestManager::write(const char *file, const char *str) {
|
||||
|
||||
Mob* QuestManager::spawn2(int npc_type, int grid, int unused, const glm::vec4& position) {
|
||||
const NPCType* tmp = 0;
|
||||
if (tmp = database.GetNPCType(npc_type))
|
||||
if (tmp = database.LoadNPCTypesData(npc_type))
|
||||
{
|
||||
NPC* npc = new NPC(tmp, nullptr, position, FlyMode3);
|
||||
npc->AddLootTable();
|
||||
@@ -225,7 +225,7 @@ Mob* QuestManager::unique_spawn(int npc_type, int grid, int unused, const glm::v
|
||||
}
|
||||
|
||||
const NPCType* tmp = 0;
|
||||
if (tmp = database.GetNPCType(npc_type))
|
||||
if (tmp = database.LoadNPCTypesData(npc_type))
|
||||
{
|
||||
NPC* npc = new NPC(tmp, nullptr, position, FlyMode3);
|
||||
npc->AddLootTable();
|
||||
@@ -275,7 +275,7 @@ Mob* QuestManager::spawn_from_spawn2(uint32 spawn2_id)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const NPCType* tmp = database.GetNPCType(npcid);
|
||||
const NPCType* tmp = database.LoadNPCTypesData(npcid);
|
||||
if(!tmp)
|
||||
{
|
||||
return nullptr;
|
||||
@@ -1574,7 +1574,7 @@ void QuestManager::respawn(int npcTypeID, int grid) {
|
||||
quests_running_.push(e);
|
||||
|
||||
const NPCType* npcType = nullptr;
|
||||
if ((npcType = database.GetNPCType(npcTypeID)))
|
||||
if ((npcType = database.LoadNPCTypesData(npcTypeID)))
|
||||
{
|
||||
owner = new NPC(npcType, nullptr, owner->GetPosition(), FlyMode3);
|
||||
owner->CastToNPC()->AddLootTable();
|
||||
|
||||
Reference in New Issue
Block a user