1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Remove ConstTransitivePtr from hero and town instances

This commit is contained in:
Ivan Savenko
2025-03-09 21:51:33 +00:00
parent 62234fcf92
commit 417ea6451a
57 changed files with 436 additions and 390 deletions

View File

@@ -20,13 +20,13 @@ namespace AIPathfinding
{
void BuyArmyAction::execute(AIGateway * ai, const CGHeroInstance * hero) const
{
if(!hero->visitedTown)
if(!hero->getVisitedTown())
{
throw cannotFulfillGoalException(
hero->getNameTranslated() + " being at " + hero->visitablePos().toString() + " has no town to recruit creatures.");
}
ai->recruitCreatures(hero->visitedTown, hero);
ai->recruitCreatures(hero->getVisitedTown(), hero);
}
std::string BuyArmyAction::toString() const