mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Removed 0.98 compatibility
This commit is contained in:
parent
3be3c871fb
commit
526de47ca4
@ -177,12 +177,6 @@ CTown::~CTown()
|
||||
str.dellNull();
|
||||
}
|
||||
|
||||
std::vector<BattleHex> CTown::defaultMoatHexes()
|
||||
{
|
||||
static const std::vector<BattleHex> moatHexes = {11, 28, 44, 61, 77, 111, 129, 146, 164, 181};
|
||||
return moatHexes;
|
||||
}
|
||||
|
||||
std::string CTown::getLocalizedFactionName() const
|
||||
{
|
||||
if(faction == nullptr)
|
||||
@ -855,12 +849,7 @@ void CTownHandler::loadTown(CTown * town, const JsonNode & source)
|
||||
warMachinesToLoad[town] = source["warMachine"];
|
||||
|
||||
town->moatDamage = static_cast<si32>(source["moatDamage"].Float());
|
||||
|
||||
// Compatibility for <= 0.98f mods
|
||||
if(source["moatHexes"].isNull())
|
||||
town->moatHexes = CTown::defaultMoatHexes();
|
||||
else
|
||||
town->moatHexes = source["moatHexes"].convertTo<std::vector<BattleHex> >();
|
||||
town->moatHexes = source["moatHexes"].convertTo<std::vector<BattleHex> >();
|
||||
|
||||
town->mageLevel = static_cast<ui32>(source["mageGuild"].Float());
|
||||
town->names = source["names"].convertTo<std::vector<std::string> >();
|
||||
|
@ -232,8 +232,6 @@ class DLL_LINKAGE CTown
|
||||
public:
|
||||
CTown();
|
||||
~CTown();
|
||||
// TODO: remove once save and mod compatability not needed
|
||||
static std::vector<BattleHex> defaultMoatHexes();
|
||||
|
||||
std::string getLocalizedFactionName() const;
|
||||
std::string getBuildingScope() const;
|
||||
|
@ -258,9 +258,11 @@ bool Obstacle::isHexAvailable(const CBattleInfoCallback * cb, const BattleHex &
|
||||
{
|
||||
EWallPart part = cb->battleHexToWallPart(hex);
|
||||
|
||||
if(part == EWallPart::INVALID || part == EWallPart::INDESTRUCTIBLE_PART_OF_GATE)
|
||||
if(part == EWallPart::INVALID)
|
||||
return true;//no fortification here
|
||||
else if(static_cast<int>(part) < 0)
|
||||
else if(part == EWallPart::INDESTRUCTIBLE_PART_OF_GATE)
|
||||
return false; // location accessible to units, but not targetable by spells
|
||||
else if(part == EWallPart::INDESTRUCTIBLE_PART)
|
||||
return false;//indestructible part (cant be checked by battleGetWallState)
|
||||
else if(part == EWallPart::BOTTOM_TOWER || part == EWallPart::UPPER_TOWER)
|
||||
return false;//destructible, but should not be available
|
||||
|
Loading…
Reference in New Issue
Block a user