mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 06:21:28 +00:00
Fix all expansion enabled filtering [skip ci]
This commit is contained in:
parent
a0f8bbb3b9
commit
bcd62b76c4
@ -25,7 +25,8 @@
|
||||
#include <vector>
|
||||
|
||||
namespace Expansion {
|
||||
static const int EXPANSION_ALL = -1;
|
||||
static const int EXPANSION_ALL = -1;
|
||||
static const int EXPANSION_FILTER_MAX = 99;
|
||||
|
||||
enum ExpansionNumber {
|
||||
Classic = 0,
|
||||
|
||||
@ -34,17 +34,22 @@ namespace ContentFilterCriteria {
|
||||
table_prefix = table_prefix + ".";
|
||||
}
|
||||
|
||||
int current_expansion_filter_criteria = content_service.GetCurrentExpansion();
|
||||
if (current_expansion_filter_criteria == Expansion::EXPANSION_ALL) {
|
||||
current_expansion_filter_criteria = Expansion::EXPANSION_FILTER_MAX;
|
||||
}
|
||||
|
||||
criteria += fmt::format(
|
||||
" AND ({}min_expansion <= {} OR {}min_expansion = 0)",
|
||||
table_prefix,
|
||||
content_service.GetCurrentExpansion(),
|
||||
current_expansion_filter_criteria,
|
||||
table_prefix
|
||||
);
|
||||
|
||||
criteria += fmt::format(
|
||||
" AND ({}max_expansion >= {} OR {}max_expansion = 0)",
|
||||
table_prefix,
|
||||
content_service.GetCurrentExpansion(),
|
||||
current_expansion_filter_criteria,
|
||||
table_prefix
|
||||
);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user