1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

parseSelector: fix anyOf and noneOf

This commit is contained in:
Konstantin 2023-10-28 18:35:59 +03:00
parent f6b03201db
commit df07b27129

View File

@ -1156,7 +1156,7 @@ CSelector JsonUtils::parseSelector(const JsonNode & ability)
{
CSelector base = Selector::none;
for(const auto & andN : value->Vector())
base.Or(parseSelector(andN));
base = base.Or(parseSelector(andN));
ret = ret.And(base);
}
@ -1166,7 +1166,7 @@ CSelector JsonUtils::parseSelector(const JsonNode & ability)
{
CSelector base = Selector::none;
for(const auto & andN : value->Vector())
base.Or(parseSelector(andN));
base = base.Or(parseSelector(andN));
ret = ret.And(base.Not());
}