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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user