mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-17 20:58:07 +02:00
Update Nullkiller.cpp
Further warning-removal
This commit is contained in:
parent
3d87568349
commit
49d73b438b
@ -443,10 +443,14 @@ void Nullkiller::makeTurn()
|
|||||||
decompose(bestTasks, sptr(ExplorationBehavior()), MAX_DEPTH);
|
decompose(bestTasks, sptr(ExplorationBehavior()), MAX_DEPTH);
|
||||||
|
|
||||||
TTaskVec selectedTasks;
|
TTaskVec selectedTasks;
|
||||||
|
#if NKAI_TRACE_LEVEL >= 1
|
||||||
int prioOfTask = 0;
|
int prioOfTask = 0;
|
||||||
|
#endif
|
||||||
for (int prio = PriorityEvaluator::PriorityTier::INSTAKILL; prio <= PriorityEvaluator::PriorityTier::MAX_PRIORITY_TIER; ++prio)
|
for (int prio = PriorityEvaluator::PriorityTier::INSTAKILL; prio <= PriorityEvaluator::PriorityTier::MAX_PRIORITY_TIER; ++prio)
|
||||||
{
|
{
|
||||||
|
#if NKAI_TRACE_LEVEL >= 1
|
||||||
prioOfTask = prio;
|
prioOfTask = prio;
|
||||||
|
#endif
|
||||||
selectedTasks = buildPlan(bestTasks, prio);
|
selectedTasks = buildPlan(bestTasks, prio);
|
||||||
if (!selectedTasks.empty() || settings->isUseFuzzy())
|
if (!selectedTasks.empty() || settings->isUseFuzzy())
|
||||||
break;
|
break;
|
||||||
@ -720,7 +724,7 @@ bool Nullkiller::handleTrading()
|
|||||||
if (toGive && toGive <= available[mostExpendable]) //don't try to sell 0 resources
|
if (toGive && toGive <= available[mostExpendable]) //don't try to sell 0 resources
|
||||||
{
|
{
|
||||||
cb->trade(m->getObjInstanceID(), EMarketMode::RESOURCE_RESOURCE, GameResID(mostExpendable), GameResID(mostWanted), toGive);
|
cb->trade(m->getObjInstanceID(), EMarketMode::RESOURCE_RESOURCE, GameResID(mostExpendable), GameResID(mostWanted), toGive);
|
||||||
#if NKAI_TRACE_LEVEL >= 1
|
#if NKAI_TRACE_LEVEL >= 2
|
||||||
logAi->info("Traded %d of %s for %d of %s at %s", toGive, mostExpendable, toGet, mostWanted, obj->getObjectName());
|
logAi->info("Traded %d of %s for %d of %s at %s", toGive, mostExpendable, toGet, mostWanted, obj->getObjectName());
|
||||||
#endif
|
#endif
|
||||||
haveTraded = true;
|
haveTraded = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user