1
0
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:
Opuszek
2025-07-13 22:51:30 +02:00
parent 25ba05cdab
commit ac3991b899
4 changed files with 4 additions and 4 deletions

View File

@@ -1671,7 +1671,7 @@ bool CBattleInfoCallback::isWallPartAttackable(EWallPart wallPart) const
return false; return false;
} }
BattleHexArray CBattleInfoCallback::getAttackableBattleHexes() const BattleHexArray CBattleInfoCallback::getAttackableWallParts() const
{ {
BattleHexArray attackableBattleHexes; BattleHexArray attackableBattleHexes;
RETURN_IF_NOT_BATTLE(attackableBattleHexes); RETURN_IF_NOT_BATTLE(attackableBattleHexes);

View File

@@ -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 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 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 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 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 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

View File

@@ -51,7 +51,7 @@ bool Catapult::applicable(Problem & problem, const Mechanics * m) const
return m->adaptProblem(ESpellCastProblem::NO_APPROPRIATE_TARGET, problem); 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); return !attackableBattleHexes.empty() || m->adaptProblem(ESpellCastProblem::NO_APPROPRIATE_TARGET, problem);
} }

View File

@@ -501,7 +501,7 @@ bool BattleFlowProcessor::tryMakeAutomaticActionOfCatapult(const CBattleInfoCall
const CGHeroInstance * curOwner = battle.battleGetOwnerHero(next); const CGHeroInstance * curOwner = battle.battleGetOwnerHero(next);
if (next->unitType()->getId() == CreatureID::CATAPULT) if (next->unitType()->getId() == CreatureID::CATAPULT)
{ {
const auto & attackableBattleHexes = battle.getAttackableBattleHexes(); const auto & attackableBattleHexes = battle.getAttackableWallParts();
if (attackableBattleHexes.empty()) if (attackableBattleHexes.empty())
{ {