mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-17 22:12:24 +00:00
Filter forage [skip ci]
This commit is contained in:
parent
dadd674b63
commit
68a2af1bce
@ -55,9 +55,25 @@ uint32 ZoneDatabase::GetZoneForage(uint32 ZoneID, uint8 skill) {
|
||||
}
|
||||
|
||||
uint32 chancepool = 0;
|
||||
std::string query = StringFormat("SELECT itemid, chance FROM "
|
||||
"forage WHERE zoneid = '%i' and level <= '%i' "
|
||||
"LIMIT %i", ZoneID, skill, FORAGE_ITEM_LIMIT);
|
||||
std::string query = fmt::format(
|
||||
SQL(
|
||||
SELECT
|
||||
itemid,
|
||||
chance
|
||||
FROM
|
||||
forage
|
||||
WHERE
|
||||
zoneid = '{}'
|
||||
and level <= '{}'
|
||||
{}
|
||||
LIMIT
|
||||
{}
|
||||
),
|
||||
ZoneID,
|
||||
skill,
|
||||
ContentFilterCriteria::apply(),
|
||||
FORAGE_ITEM_LIMIT
|
||||
);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
return 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user