|
|
@@ -139,12 +139,7 @@ void Moat::placeObstacles(ServerCallback * server, const Mechanics * m, const Ef
|
|
|
BattleObstaclesChanged pack;
|
|
|
pack.battleID = m->battle()->getBattle()->getBattleID();
|
|
|
|
|
|
- auto all = m->battle()->battleGetAllObstacles(BattleSide::ALL_KNOWING);
|
|
|
-
|
|
|
- int obstacleIdToGive = 1;
|
|
|
- for(auto & one : all)
|
|
|
- if(one->uniqueID >= obstacleIdToGive)
|
|
|
- obstacleIdToGive = one->uniqueID + 1;
|
|
|
+ int obstacleIdToGive = m->battle()->nextObstacleId();
|
|
|
|
|
|
for(const auto & destination : moatHexes) //Moat hexes can be different obstacles
|
|
|
{
|