mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-13 06:48:20 +00:00
[Content Filtering] Updates contents flags to be checked at runtime. (#1940)
* Updates contents flags to be checked at runtime. * Fix formatting * Add expansion flags * Tweaks to logic * Logic tweaks * Update world_content_service.cpp * Inverse DoesPassContentFiltering logic * Update world_content_service.cpp * Update world_content_service.cpp Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
+10
-2
@@ -51,8 +51,13 @@ void ZoneDatabase::AddLootTableToNPC(NPC* npc,uint32 loottable_id, ItemList* ite
|
||||
}
|
||||
|
||||
lts = database.GetLootTable(loottable_id);
|
||||
if (!lts)
|
||||
if (!lts) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!content_service.DoesPassContentFiltering(lts->content_flags)) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 min_cash = lts->mincash;
|
||||
uint32 max_cash = lts->maxcash;
|
||||
@@ -128,6 +133,10 @@ void ZoneDatabase::AddLootDropToNPC(NPC *npc, uint32 lootdrop_id, ItemList *item
|
||||
return;
|
||||
}
|
||||
|
||||
if (!content_service.DoesPassContentFiltering(loot_drop->content_flags)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// if this lootdrop is droplimit=0 and mindrop 0, scan list once and return
|
||||
if (droplimit == 0 && mindrop == 0) {
|
||||
for (uint32 i = 0; i < loot_drop->NumEntries; ++i) {
|
||||
@@ -706,4 +715,3 @@ void ZoneDatabase::LoadGlobalLoot()
|
||||
zone->AddGlobalLootEntry(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user