mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-15 11:46:56 +02:00
parseSelector: fix anyOf and noneOf
This commit is contained in:
parent
f6b03201db
commit
df07b27129
@ -1156,7 +1156,7 @@ CSelector JsonUtils::parseSelector(const JsonNode & ability)
|
|||||||
{
|
{
|
||||||
CSelector base = Selector::none;
|
CSelector base = Selector::none;
|
||||||
for(const auto & andN : value->Vector())
|
for(const auto & andN : value->Vector())
|
||||||
base.Or(parseSelector(andN));
|
base = base.Or(parseSelector(andN));
|
||||||
|
|
||||||
ret = ret.And(base);
|
ret = ret.And(base);
|
||||||
}
|
}
|
||||||
@ -1166,7 +1166,7 @@ CSelector JsonUtils::parseSelector(const JsonNode & ability)
|
|||||||
{
|
{
|
||||||
CSelector base = Selector::none;
|
CSelector base = Selector::none;
|
||||||
for(const auto & andN : value->Vector())
|
for(const auto & andN : value->Vector())
|
||||||
base.Or(parseSelector(andN));
|
base = base.Or(parseSelector(andN));
|
||||||
|
|
||||||
ret = ret.And(base.Not());
|
ret = ret.And(base.Not());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user