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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user