Bazaar developer reference

CvHomelandAI::ExecutePatrolMoves()

Defined in
CvHomelandAI.cpp, line 3165
Class
CvHomelandAI
Hook name
CivHooks::CvHomelandAI_ExecutePatrolMoves

Hooks

static bool BeforeCvHomelandAI_ExecutePatrolMoves(CvHomelandAI* self);static void AfterCvHomelandAI_ExecutePatrolMoves(CvHomelandAI* self);static void ReplaceCvHomelandAI_ExecutePatrolMoves(void (*original)(CvHomelandAI*), CvHomelandAI* self);CivRegisterBefore<CivHooks::CvHomelandAI_ExecutePatrolMoves>(host, &BeforeCvHomelandAI_ExecutePatrolMoves);CivRegisterAfter<CivHooks::CvHomelandAI_ExecutePatrolMoves>(host, &AfterCvHomelandAI_ExecutePatrolMoves);CivRegisterReplace<CivHooks::CvHomelandAI_ExecutePatrolMoves>(host, &ReplaceCvHomelandAI_ExecutePatrolMoves);

Code

3164/// Patrol with chosen units3165void CvHomelandAI::ExecutePatrolMoves()3166{3167	FStaticVector< CvHomelandUnit, 64, true, c_eCiv5GameplayDLL >::iterator it;3168	for(it = m_CurrentMoveUnits.begin(); it != m_CurrentMoveUnits.end(); ++it)3169	{3170		UnitHandle pUnit = m_pPlayer->getUnit(it->GetID());3171		CvPlot* pTarget = it->GetTarget();3172		if(pUnit && pTarget)3173		{3174			pUnit->PushMission(CvTypes::getMISSION_MOVE_TO(), pTarget->getX(), pTarget->getY());3175			pUnit->finishMoves();3176			UnitProcessed(pUnit->GetID());3177		}3178	}3179}

Calls

Called by