From 140aba9f69d7ca300da9695e9611e5c32d19d845 Mon Sep 17 00:00:00 2001 From: Chris Miles Date: Sat, 12 Aug 2023 22:28:40 -0500 Subject: [PATCH] [Spawns] Fixes a rarer issue where spawn2 is not being properly content filtered --- zone/spawn2.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zone/spawn2.cpp b/zone/spawn2.cpp index 42354603d..eb8b654ed 100644 --- a/zone/spawn2.cpp +++ b/zone/spawn2.cpp @@ -26,6 +26,7 @@ #include "worldserver.h" #include "zone.h" #include "zonedb.h" +#include "../common/repositories/criteria/content_filter_criteria.h" extern EntityList entity_list; extern Zone* zone; @@ -467,7 +468,7 @@ bool ZoneDatabase::PopulateZoneSpawnList(uint32 zoneid, LinkedList &spa LogInfo("Loaded [{}] respawn timer(s)", Strings::Commify(results.RowCount())); const char *zone_name = ZoneName(zoneid); - std::string query = StringFormat( + std::string query = fmt::format( "SELECT " "id, " "spawngroupID, " @@ -485,7 +486,8 @@ bool ZoneDatabase::PopulateZoneSpawnList(uint32 zoneid, LinkedList &spa "animation " "FROM " "spawn2 " - "WHERE zone = '%s' AND (version = %u OR version = -1)", + "WHERE TRUE {} AND zone = '{}' AND (version = {} OR version = -1) ", + ContentFilterCriteria::apply(), zone_name, version );