mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Implement global loot system Fixes #619
This should allow us to emulate lives global tables The options available to filter tables are min_level, max_level, race, rare, raid, race, class, bodytype, and zone. race, class, bodytype, and zone are a pipe | separated list of IDs
This commit is contained in:
@@ -210,6 +210,8 @@ Mob* QuestManager::spawn2(int npc_type, int grid, int unused, const glm::vec4& p
|
||||
{
|
||||
auto npc = new NPC(tmp, nullptr, position, FlyMode3);
|
||||
npc->AddLootTable();
|
||||
if (npc->DropsGlobalLoot())
|
||||
npc->CheckGlobalLootTables();
|
||||
entity_list.AddNPC(npc,true,true);
|
||||
if(grid > 0)
|
||||
{
|
||||
@@ -232,6 +234,8 @@ Mob* QuestManager::unique_spawn(int npc_type, int grid, int unused, const glm::v
|
||||
{
|
||||
auto npc = new NPC(tmp, nullptr, position, FlyMode3);
|
||||
npc->AddLootTable();
|
||||
if (npc->DropsGlobalLoot())
|
||||
npc->CheckGlobalLootTables();
|
||||
entity_list.AddNPC(npc,true,true);
|
||||
if(grid > 0)
|
||||
{
|
||||
@@ -308,6 +312,8 @@ Mob* QuestManager::spawn_from_spawn2(uint32 spawn2_id)
|
||||
|
||||
found_spawn->SetNPCPointer(npc);
|
||||
npc->AddLootTable();
|
||||
if (npc->DropsGlobalLoot())
|
||||
npc->CheckGlobalLootTables();
|
||||
npc->SetSp2(found_spawn->SpawnGroupID());
|
||||
entity_list.AddNPC(npc);
|
||||
entity_list.LimitAddNPC(npc);
|
||||
@@ -1656,6 +1662,8 @@ void QuestManager::respawn(int npcTypeID, int grid) {
|
||||
{
|
||||
owner = new NPC(npcType, nullptr, owner->GetPosition(), FlyMode3);
|
||||
owner->CastToNPC()->AddLootTable();
|
||||
if (owner->CastToNPC()->DropsGlobalLoot())
|
||||
owner->CastToNPC()->CheckGlobalLootTables();
|
||||
entity_list.AddNPC(owner->CastToNPC(),true,true);
|
||||
if(grid > 0)
|
||||
owner->CastToNPC()->AssignWaypoints(grid);
|
||||
|
||||
Reference in New Issue
Block a user