Bazaar developer reference

CvHomelandAI::PlotArtistMoves()

Defined in
CvHomelandAI.cpp, line 1795
Class
CvHomelandAI
Hook name
CivHooks::CvHomelandAI_PlotArtistMoves

Hooks

static bool BeforeCvHomelandAI_PlotArtistMoves(CvHomelandAI* self);static void AfterCvHomelandAI_PlotArtistMoves(CvHomelandAI* self);static void ReplaceCvHomelandAI_PlotArtistMoves(void (*original)(CvHomelandAI*), CvHomelandAI* self);CivRegisterBefore<CivHooks::CvHomelandAI_PlotArtistMoves>(host, &BeforeCvHomelandAI_PlotArtistMoves);CivRegisterAfter<CivHooks::CvHomelandAI_PlotArtistMoves>(host, &AfterCvHomelandAI_PlotArtistMoves);CivRegisterReplace<CivHooks::CvHomelandAI_PlotArtistMoves>(host, &ReplaceCvHomelandAI_PlotArtistMoves);

Code

1794/// Find moves for great artists1795void CvHomelandAI::PlotArtistMoves()1796{1797	ClearCurrentMoveUnits();17981799	// Loop through all recruited units1800	for(list<int>::iterator it = m_CurrentTurnUnits.begin(); it != m_CurrentTurnUnits.end(); ++it)1801	{1802		UnitHandle pUnit = m_pPlayer->getUnit(*it);1803		if(pUnit)1804		{1805			if (pUnit->AI_getUnitAIType() == UNITAI_ARTIST)1806			{1807				CvHomelandUnit unit;1808				unit.SetID(pUnit->GetID());1809				m_CurrentMoveUnits.push_back(unit);1810			}1811		}1812	}18131814	if(m_CurrentMoveUnits.size() > 0)1815	{1816		ExecuteArtistMoves();1817	}1818}

Calls

Called by