Bazaar developer reference

CvPlayerAI::AI_doTurnUnitsPost()

Defined in
CvPlayerAI.cpp, line 153
Class
CvPlayerAI
Hook name
CivHooks::CvPlayerAI_AI_doTurnUnitsPost
Overrides
CvPlayer::AI_doTurnUnitsPost()

Hooks

static bool BeforeCvPlayerAI_AI_doTurnUnitsPost(CvPlayerAI* self);static void AfterCvPlayerAI_AI_doTurnUnitsPost(CvPlayerAI* self);static void ReplaceCvPlayerAI_AI_doTurnUnitsPost(void (*original)(CvPlayerAI*), CvPlayerAI* self);CivRegisterBefore<CivHooks::CvPlayerAI_AI_doTurnUnitsPost>(host, &BeforeCvPlayerAI_AI_doTurnUnitsPost);CivRegisterAfter<CivHooks::CvPlayerAI_AI_doTurnUnitsPost>(host, &AfterCvPlayerAI_AI_doTurnUnitsPost);CivRegisterReplace<CivHooks::CvPlayerAI_AI_doTurnUnitsPost>(host, &ReplaceCvPlayerAI_AI_doTurnUnitsPost);

Code

153void CvPlayerAI::AI_doTurnUnitsPost()154{155	CvUnit* pLoopUnit;156	int iLoop;157158	if(!isHuman())159	{160		for(pLoopUnit = firstUnit(&iLoop); pLoopUnit != NULL; pLoopUnit = nextUnit(&iLoop))161		{162			pLoopUnit->AI_promote();163		}164	}165}

Calls