[Content Filter] Fix Runtime Filtering When Set to -1 (All) (#2313)

This commit is contained in:
Chris Miles 2022-07-27 08:48:50 -05:00 committed by GitHub
parent 5af1620e50
commit 9f8f838265
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,12 +158,12 @@ bool WorldContentService::IsContentFlagDisabled(const std::string &content_flag)
bool WorldContentService::DoesPassContentFiltering(const ContentFlags &f)
{
// if we're not set to (-1 All) then fail when we aren't within minimum expansion
if (f.min_expansion > Expansion::EXPANSION_ALL && current_expansion < f.min_expansion) {
if (f.min_expansion > Expansion::EXPANSION_ALL && current_expansion < f.min_expansion && current_expansion != -1) {
return false;
}
// if we're not set to (-1 All) then fail when we aren't within max expansion
if (f.max_expansion > Expansion::EXPANSION_ALL && current_expansion > f.max_expansion) {
if (f.max_expansion > Expansion::EXPANSION_ALL && current_expansion > f.max_expansion && current_expansion != -1) {
return false;
}