mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
Removed 0.98 compatibility
This commit is contained in:
@@ -177,12 +177,6 @@ CTown::~CTown()
|
|||||||
str.dellNull();
|
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
|
std::string CTown::getLocalizedFactionName() const
|
||||||
{
|
{
|
||||||
if(faction == nullptr)
|
if(faction == nullptr)
|
||||||
@@ -855,11 +849,6 @@ void CTownHandler::loadTown(CTown * town, const JsonNode & source)
|
|||||||
warMachinesToLoad[town] = source["warMachine"];
|
warMachinesToLoad[town] = source["warMachine"];
|
||||||
|
|
||||||
town->moatDamage = static_cast<si32>(source["moatDamage"].Float());
|
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->mageLevel = static_cast<ui32>(source["mageGuild"].Float());
|
||||||
|
|||||||
@@ -232,8 +232,6 @@ class DLL_LINKAGE CTown
|
|||||||
public:
|
public:
|
||||||
CTown();
|
CTown();
|
||||||
~CTown();
|
~CTown();
|
||||||
// TODO: remove once save and mod compatability not needed
|
|
||||||
static std::vector<BattleHex> defaultMoatHexes();
|
|
||||||
|
|
||||||
std::string getLocalizedFactionName() const;
|
std::string getLocalizedFactionName() const;
|
||||||
std::string getBuildingScope() const;
|
std::string getBuildingScope() const;
|
||||||
|
|||||||
@@ -258,9 +258,11 @@ bool Obstacle::isHexAvailable(const CBattleInfoCallback * cb, const BattleHex &
|
|||||||
{
|
{
|
||||||
EWallPart part = cb->battleHexToWallPart(hex);
|
EWallPart part = cb->battleHexToWallPart(hex);
|
||||||
|
|
||||||
if(part == EWallPart::INVALID || part == EWallPart::INDESTRUCTIBLE_PART_OF_GATE)
|
if(part == EWallPart::INVALID)
|
||||||
return true;//no fortification here
|
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)
|
return false;//indestructible part (cant be checked by battleGetWallState)
|
||||||
else if(part == EWallPart::BOTTOM_TOWER || part == EWallPart::UPPER_TOWER)
|
else if(part == EWallPart::BOTTOM_TOWER || part == EWallPart::UPPER_TOWER)
|
||||||
return false;//destructible, but should not be available
|
return false;//destructible, but should not be available
|
||||||
|
|||||||
Reference in New Issue
Block a user