瀏覽代碼

Battles: fix more cases where invalid wall hex position present

Arseniy Shestakov 9 年之前
父節點
當前提交
2cfdfca7e5
共有 4 個文件被更改,包括 5 次插入5 次删除
  1. 1 1
      AI/StupidAI/StupidAI.cpp
  2. 1 1
      client/battle/CBattleInterface.cpp
  3. 1 1
      client/battle/CBattleInterface.h
  4. 2 2
      lib/CBattleCallback.cpp

+ 1 - 1
AI/StupidAI/StupidAI.cpp

@@ -108,7 +108,7 @@ BattleAction CStupidAI::activeStack( const CStack * stack )
 	if(stack->type->idNumber == CreatureID::CATAPULT)
 	{
 		BattleAction attack;
-		static const std::vector<int> wallHexes = {50, 183, 182, 130, 62, 29, 12, 95};
+		static const std::vector<int> wallHexes = {50, 183, 182, 130, 78, 29, 12, 95};
 
 		attack.destinationTile = *RandomGeneratorUtil::nextItem(wallHexes, CRandomGenerator::getDefault());
 		attack.actionType = Battle::CATAPULT;

+ 1 - 1
client/battle/CBattleInterface.cpp

@@ -3451,7 +3451,7 @@ BattleObjectsByHex CBattleInterface::sortObjectsByHex()
 		sorted.afterAll.walls.push_back(SiegeHelper::BOTTOM_TOWER);
 		sorted.hex[182].walls.push_back(SiegeHelper::BOTTOM_WALL);
 		sorted.hex[130].walls.push_back(SiegeHelper::WALL_BELLOW_GATE);
-		sorted.hex[62].walls.push_back(SiegeHelper::WALL_OVER_GATE);
+		sorted.hex[78].walls.push_back(SiegeHelper::WALL_OVER_GATE);
 		sorted.hex[12].walls.push_back(SiegeHelper::UPPER_WALL);
 		sorted.beforeAll.walls.push_back(SiegeHelper::UPPER_TOWER);
 		sorted.hex[94].walls.push_back(SiegeHelper::GATE);

+ 1 - 1
client/battle/CBattleInterface.h

@@ -214,7 +214,7 @@ private:
 			WALL_OVER_GATE,
 			UPPER_WALL,
 			UPPER_TOWER,
-			GATE = 9,
+			GATE,
 			GATE_ARCH,
 			BOTTOM_STATIC_WALL,
 			UPPER_STATIC_WALL,

+ 2 - 2
lib/CBattleCallback.cpp

@@ -62,13 +62,13 @@ namespace SiegeStuffThatShouldBeMovedToHandlers //  <=== TODO
 		std::make_pair(183, EWallPart::BOTTOM_TOWER),
 		std::make_pair(182, EWallPart::BOTTOM_WALL),
 		std::make_pair(130, EWallPart::BELOW_GATE),
-		std::make_pair(62,  EWallPart::OVER_GATE),
+		std::make_pair(78,  EWallPart::OVER_GATE),
 		std::make_pair(29,  EWallPart::UPPER_WALL),
 		std::make_pair(12,  EWallPart::UPPER_TOWER),
 		std::make_pair(95,  EWallPart::INDESTRUCTIBLE_PART_OF_GATE),
 		std::make_pair(96,  EWallPart::GATE),
 		std::make_pair(45,  EWallPart::INDESTRUCTIBLE_PART),
-		std::make_pair(78,  EWallPart::INDESTRUCTIBLE_PART),
+		std::make_pair(62,  EWallPart::INDESTRUCTIBLE_PART),
 		std::make_pair(112, EWallPart::INDESTRUCTIBLE_PART),
 		std::make_pair(147, EWallPart::INDESTRUCTIBLE_PART)
 	};