瀏覽代碼

Merge pull request #3118 from rilian-la-te/glamor-slight-bonus-fixes

Small bonus fixes
Ivan Savenko 2 年之前
父節點
當前提交
e2cffd4c7b
共有 2 個文件被更改,包括 4 次插入2 次删除
  1. 2 2
      lib/JsonNode.cpp
  2. 2 0
      server/battles/BattleActionProcessor.cpp

+ 2 - 2
lib/JsonNode.cpp

@@ -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());
 	}

+ 2 - 0
server/battles/BattleActionProcessor.cpp

@@ -854,6 +854,8 @@ int BattleActionProcessor::moveStack(const CBattleInfoCallback & battle, int sta
 			|| start == battle::Unit::occupiedHex(dest, curStack->doubleWide(), curStack->unitSide()))
 			passed.clear(); //Just empty passed, obstacles will handled automatically
 	}
+	if(dest == start) 	//If dest is equal to start, then we should handle obstacles for it anyway
+		passed.clear();	//Just empty passed, obstacles will handled automatically
 	//handling obstacle on the final field (separate, because it affects both flying and walking stacks)
 	battle.handleObstacleTriggersForUnit(*gameHandler->spellEnv, *curStack, passed);