Bazaar developer reference

CvHomelandAI::PlotArchaeologistMoves()

Defined in
CvHomelandAI.cpp, line 2188
Class
CvHomelandAI
Hook name
CivHooks::CvHomelandAI_PlotArchaeologistMoves

Hooks

static bool BeforeCvHomelandAI_PlotArchaeologistMoves(CvHomelandAI* self);static void AfterCvHomelandAI_PlotArchaeologistMoves(CvHomelandAI* self);static void ReplaceCvHomelandAI_PlotArchaeologistMoves(void (*original)(CvHomelandAI*), CvHomelandAI* self);CivRegisterBefore<CivHooks::CvHomelandAI_PlotArchaeologistMoves>(host, &BeforeCvHomelandAI_PlotArchaeologistMoves);CivRegisterAfter<CivHooks::CvHomelandAI_PlotArchaeologistMoves>(host, &AfterCvHomelandAI_PlotArchaeologistMoves);CivRegisterReplace<CivHooks::CvHomelandAI_PlotArchaeologistMoves>(host, &ReplaceCvHomelandAI_PlotArchaeologistMoves);

Code

2187/// Send archaeologists to safe sites2188void CvHomelandAI::PlotArchaeologistMoves()2189{2190	ClearCurrentMoveUnits();21912192	// Loop through all recruited units2193	for(list<int>::iterator it = m_CurrentTurnUnits.begin(); it != m_CurrentTurnUnits.end(); ++it)2194	{2195		UnitHandle pUnit = m_pPlayer->getUnit(*it);2196		if(pUnit)2197		{2198			if(pUnit->AI_getUnitAIType() == UNITAI_ARCHAEOLOGIST)2199			{2200				CvHomelandUnit unit;2201				unit.SetID(pUnit->GetID());2202				m_CurrentMoveUnits.push_back(unit);2203			}2204		}2205	}22062207	if(m_CurrentMoveUnits.size() > 0)2208	{2209		ExecuteArchaeologistMoves();2210	}2211}

Calls

Called by