mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
NKAI: fix defense tasks priority evaluation
This commit is contained in:
@@ -299,6 +299,7 @@ void Nullkiller::makeTurn()
|
||||
|
||||
void Nullkiller::executeTask(Goals::TTask task)
|
||||
{
|
||||
auto start = std::chrono::high_resolution_clock::now();
|
||||
std::string taskDescr = task->toString();
|
||||
|
||||
boost::this_thread::interruption_point();
|
||||
@@ -307,10 +308,11 @@ void Nullkiller::executeTask(Goals::TTask task)
|
||||
try
|
||||
{
|
||||
task->accept(ai.get());
|
||||
logAi->trace("Task %s completed in %lld", taskDescr, timeElapsed(start));
|
||||
}
|
||||
catch(goalFulfilledException &)
|
||||
{
|
||||
logAi->trace("Task %s completed", task->toString());
|
||||
logAi->trace("Task %s completed in %lld", taskDescr, timeElapsed(start));
|
||||
}
|
||||
catch(cannotFulfillGoalException & e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user