1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

moatHexes: implement reading moat hexes from configuration files

This also fix Fortess moat that previously used wrong hexes
This commit is contained in:
Arseniy Shestakov
2016-01-06 12:53:40 +03:00
parent ffeb7f253b
commit c93f8fea48
3 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,7 @@
#include "StdInc.h"
#include "CObstacleInstance.h"
#include "CHeroHandler.h"
#include "CTownHandler.h"
#include "VCMI_Lib.h"
#include "spells/CSpellHandler.h"
@ -145,7 +146,5 @@ void SpellCreatedObstacle::battleTurnPassed()
std::vector<BattleHex> MoatObstacle::getAffectedTiles() const
{
//rrr... need initializer lists
static const BattleHex moatHexes[] = {11, 28, 44, 61, 77, 111, 129, 146, 164, 181};
return std::vector<BattleHex>(moatHexes, moatHexes + ARRAY_COUNT(moatHexes));
return VLC->townh->factions[ID]->town->moatHexes;
}