浏览代码

vcmi: make "noneOf" selector more restrictive

It should do "or-not" instead of "and-not".
Konstantin P 2 年之前
父节点
当前提交
1522ed85e2
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lib/JsonNode.cpp

+ 2 - 2
lib/JsonNode.cpp

@@ -1058,9 +1058,9 @@ CSelector JsonUtils::parseSelector(const JsonNode & ability)
 	value = &ability["noneOf"];
 	if(value->isVector())
 	{
-		CSelector base = Selector::all;
+		CSelector base = Selector::none;
 		for(const auto & andN : value->Vector())
-			base.And(parseSelector(andN));
+			base.Or(parseSelector(andN));
 		
 		ret = ret.And(base.Not());
 	}