mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
Add spawn expansion filtering
This commit is contained in:
parent
80baf1b9ed
commit
be8a6b6af4
@ -47,11 +47,11 @@ namespace ContentFilterCriteria {
|
|||||||
|
|
||||||
std::string flags_in_filter;
|
std::string flags_in_filter;
|
||||||
if (!flags.empty()) {
|
if (!flags.empty()) {
|
||||||
flags_in_filter = fmt::format("OR content_flags IN ({})", implode(", ", flags));
|
flags_in_filter = fmt::format(" OR content_flags IN ({})", implode(", ", flags));
|
||||||
}
|
}
|
||||||
|
|
||||||
criteria += fmt::format(
|
criteria += fmt::format(
|
||||||
" AND (content_flags IS NULL {})",
|
" AND (content_flags IS NULL{})",
|
||||||
flags_in_filter
|
flags_in_filter
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
#include "spawngroup.h"
|
#include "spawngroup.h"
|
||||||
#include "zone.h"
|
#include "zone.h"
|
||||||
#include "zonedb.h"
|
#include "zonedb.h"
|
||||||
|
#include "../common/repositories/criteria/content_filter_criteria.h"
|
||||||
|
|
||||||
extern EntityList entity_list;
|
extern EntityList entity_list;
|
||||||
extern Zone *zone;
|
extern Zone *zone;
|
||||||
@ -209,9 +210,11 @@ bool ZoneDatabase::LoadSpawnGroups(const char *zone_name, uint16 version, SpawnG
|
|||||||
spawn2.spawngroupID = spawngroup.ID
|
spawn2.spawngroupID = spawngroup.ID
|
||||||
AND
|
AND
|
||||||
spawn2.version = {} and zone = '{}'
|
spawn2.version = {} and zone = '{}'
|
||||||
|
{}
|
||||||
),
|
),
|
||||||
version,
|
version,
|
||||||
zone_name
|
zone_name,
|
||||||
|
ContentFilterCriteria::apply()
|
||||||
);
|
);
|
||||||
|
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user