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:
@@ -59,12 +59,12 @@ void RecruitHero::accept(AIGateway * ai)
|
||||
if(!heroToHire)
|
||||
throw cannotFulfillGoalException("No hero to hire!");
|
||||
|
||||
if(t->visitingHero)
|
||||
if(t->getVisitingHero())
|
||||
{
|
||||
cb->swapGarrisonHero(t);
|
||||
}
|
||||
|
||||
if(t->visitingHero)
|
||||
if(t->getVisitingHero())
|
||||
throw cannotFulfillGoalException("Town " + t->nodeName() + " is occupied. Cannot recruit hero!");
|
||||
|
||||
cb->recruitHero(t, heroToHire);
|
||||
|
||||
Reference in New Issue
Block a user