1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

AI pathfinding shared storage

This commit is contained in:
Andrii Danylchenko
2021-05-15 19:22:49 +03:00
committed by Andrii Danylchenko
parent be4f803d4a
commit 0bff5f9eb6
14 changed files with 262 additions and 191 deletions

View File

@@ -22,11 +22,21 @@ namespace AIPathfinding
return Goals::sptr(Goals::BuildBoat(shipyard));
}
const ChainActor * BuildBoatAction::getActor(const ChainActor * sourceActor) const
{
return sourceActor->resourceActor;
}
Goals::TSubgoal SummonBoatAction::whatToDo(const HeroPtr & hero) const
{
return Goals::sptr(Goals::AdventureSpellCast(hero, SpellID::SUMMON_BOAT));
}
const ChainActor * SummonBoatAction::getActor(const ChainActor * sourceActor) const
{
return sourceActor->castActor;
}
void SummonBoatAction::applyOnDestination(
const CGHeroInstance * hero,
CDestinationNodeInfo & destination,