mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
WIP remove thread_local CCallback in HeroPtr
This commit is contained in:
@@ -89,7 +89,7 @@ void handleCounterAttack(
|
||||
&& (threat.danger == maximumDanger.danger || threat.turn < maximumDanger.turn))
|
||||
{
|
||||
auto heroCapturingPaths = aiNk->pathfinder->getPathInfo(threat.heroPtr->visitablePos());
|
||||
auto goals = CaptureObjectsBehavior::getVisitGoals(heroCapturingPaths, aiNk, threat.heroPtr.get(aiNk->cc.get()));
|
||||
auto goals = CaptureObjectsBehavior::getVisitGoals(heroCapturingPaths, aiNk, threat.heroPtr.get());
|
||||
|
||||
for(int i = 0; i < heroCapturingPaths.size(); i++)
|
||||
{
|
||||
@@ -132,7 +132,7 @@ bool handleGarrisonHeroFromPreviousTurn(const CGTownInstance * town, Goals::TGoa
|
||||
|
||||
return false;
|
||||
}
|
||||
else if(aiNk->heroManager->getHeroRole(HeroPtr(town->getGarrisonHero())) == HeroRole::MAIN)
|
||||
else if(aiNk->heroManager->getHeroRole(town->getGarrisonHero()) == HeroRole::MAIN)
|
||||
{
|
||||
auto armyDismissLimit = 1000;
|
||||
auto heroToDismiss = aiNk->heroManager->findWeakHeroToDismiss(armyDismissLimit);
|
||||
|
||||
Reference in New Issue
Block a user