mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 13:41:31 +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 "quest_parser_collection.h"
|
||||||
#include "zonedb.h"
|
#include "zonedb.h"
|
||||||
|
#include "../common/repositories/criteria/content_filter_criteria.h"
|
||||||
|
|
||||||
#include <iostream>
|
#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) {
|
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, "
|
"min_x, min_y, heading, name, "
|
||||||
"item, max_allowed, respawn_timer "
|
"item, max_allowed, respawn_timer "
|
||||||
"FROM ground_spawns "
|
"FROM ground_spawns "
|
||||||
"WHERE zoneid = %i AND (version = %u OR version = -1) "
|
"WHERE zoneid = %i AND (version = %u OR version = -1) %s "
|
||||||
"LIMIT 50", zone_id, version);
|
"LIMIT 50",
|
||||||
|
zone_id,
|
||||||
|
version,
|
||||||
|
ContentFilterCriteria::apply().c_str()
|
||||||
|
);
|
||||||
|
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
if (!results.Success()) {
|
if (!results.Success()) {
|
||||||
return gs;
|
return gs;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user