mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
Filter ground spawns [skip ci]
This commit is contained in:
parent
68a2af1bce
commit
9fbcd99be2
@ -26,6 +26,7 @@
|
||||
|
||||
#include "quest_parser_collection.h"
|
||||
#include "zonedb.h"
|
||||
#include "../common/repositories/criteria/content_filter_criteria.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -698,12 +699,18 @@ void ZoneDatabase::UpdateObject(uint32 id, uint32 type, uint32 icon, const Objec
|
||||
//
|
||||
Ground_Spawns* ZoneDatabase::LoadGroundSpawns(uint32 zone_id, int16 version, Ground_Spawns* gs) {
|
||||
|
||||
std::string query = StringFormat("SELECT max_x, max_y, max_z, "
|
||||
std::string query = StringFormat(
|
||||
"SELECT max_x, max_y, max_z, "
|
||||
"min_x, min_y, heading, name, "
|
||||
"item, max_allowed, respawn_timer "
|
||||
"FROM ground_spawns "
|
||||
"WHERE zoneid = %i AND (version = %u OR version = -1) "
|
||||
"LIMIT 50", zone_id, version);
|
||||
"WHERE zoneid = %i AND (version = %u OR version = -1) %s "
|
||||
"LIMIT 50",
|
||||
zone_id,
|
||||
version,
|
||||
ContentFilterCriteria::apply().c_str()
|
||||
);
|
||||
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
return gs;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user