mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +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:
+3
-3
@@ -142,7 +142,7 @@ void Trap::Trigger(Mob* trigger)
|
||||
|
||||
for (i = 0; i < effectvalue2; i++)
|
||||
{
|
||||
if ((tmp = database.GetNPCType(effectvalue)))
|
||||
if ((tmp = database.LoadNPCTypesData(effectvalue)))
|
||||
{
|
||||
auto randomOffset = glm::vec4(zone->random.Int(-5, 5),zone->random.Int(-5, 5),zone->random.Int(-5, 5), zone->random.Int(0, 249));
|
||||
auto spawnPosition = randomOffset + glm::vec4(m_Position, 0.0f);
|
||||
@@ -165,7 +165,7 @@ void Trap::Trigger(Mob* trigger)
|
||||
|
||||
for (i = 0; i < effectvalue2; i++)
|
||||
{
|
||||
if ((tmp = database.GetNPCType(effectvalue)))
|
||||
if ((tmp = database.LoadNPCTypesData(effectvalue)))
|
||||
{
|
||||
auto randomOffset = glm::vec4(zone->random.Int(-2, 2), zone->random.Int(-2, 2), zone->random.Int(-2, 2), zone->random.Int(0, 249));
|
||||
auto spawnPosition = randomOffset + glm::vec4(m_Position, 0.0f);
|
||||
@@ -294,7 +294,7 @@ void Trap::CreateHiddenTrigger()
|
||||
if(hiddenTrigger)
|
||||
return;
|
||||
|
||||
const NPCType *base_type = database.GetNPCType(500);
|
||||
const NPCType *base_type = database.LoadNPCTypesData(500);
|
||||
NPCType *make_npc = new NPCType;
|
||||
memcpy(make_npc, base_type, sizeof(NPCType));
|
||||
make_npc->max_hp = 100000;
|
||||
|
||||
Reference in New Issue
Block a user