mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Rename a misleading method
This commit is contained in:
@@ -1671,7 +1671,7 @@ bool CBattleInfoCallback::isWallPartAttackable(EWallPart wallPart) const
|
||||
return false;
|
||||
}
|
||||
|
||||
BattleHexArray CBattleInfoCallback::getAttackableBattleHexes() const
|
||||
BattleHexArray CBattleInfoCallback::getAttackableWallParts() const
|
||||
{
|
||||
BattleHexArray attackableBattleHexes;
|
||||
RETURN_IF_NOT_BATTLE(attackableBattleHexes);
|
||||
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
EWallPart battleHexToWallPart(const BattleHex & hex) const; //returns part of destructible wall / gate / keep under given hex or -1 if not found
|
||||
bool isWallPartPotentiallyAttackable(EWallPart wallPart) const; // returns true if the wall part is potentially attackable (independent of wall state), false if not
|
||||
bool isWallPartAttackable(EWallPart wallPart) const; // returns true if the wall part is actually attackable, false if not
|
||||
BattleHexArray getAttackableBattleHexes() const;
|
||||
BattleHexArray getAttackableWallParts() const;
|
||||
|
||||
si8 battleMinSpellLevel(BattleSide side) const; //calculates maximum spell level possible to be cast on battlefield - takes into account artifacts of both heroes; if no effects are set, 0 is returned
|
||||
si8 battleMaxSpellLevel(BattleSide side) const; //calculates minimum spell level possible to be cast on battlefield - takes into account artifacts of both heroes; if no effects are set, 0 is returned
|
||||
|
||||
@@ -51,7 +51,7 @@ bool Catapult::applicable(Problem & problem, const Mechanics * m) const
|
||||
return m->adaptProblem(ESpellCastProblem::NO_APPROPRIATE_TARGET, problem);
|
||||
}
|
||||
|
||||
const auto attackableBattleHexes = m->battle()->getAttackableBattleHexes();
|
||||
const auto attackableBattleHexes = m->battle()->getAttackableWallParts();
|
||||
|
||||
return !attackableBattleHexes.empty() || m->adaptProblem(ESpellCastProblem::NO_APPROPRIATE_TARGET, problem);
|
||||
}
|
||||
|
||||
@@ -501,7 +501,7 @@ bool BattleFlowProcessor::tryMakeAutomaticActionOfCatapult(const CBattleInfoCall
|
||||
const CGHeroInstance * curOwner = battle.battleGetOwnerHero(next);
|
||||
if (next->unitType()->getId() == CreatureID::CATAPULT)
|
||||
{
|
||||
const auto & attackableBattleHexes = battle.getAttackableBattleHexes();
|
||||
const auto & attackableBattleHexes = battle.getAttackableWallParts();
|
||||
|
||||
if (attackableBattleHexes.empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user