Bazaar developer reference

CvGrandStrategyAI::Reset()

Defined in
CvGrandStrategyAI.cpp, line 166
Class
CvGrandStrategyAI
Hook name
CivHooks::CvGrandStrategyAI_Reset

Hooks

static bool BeforeCvGrandStrategyAI_Reset(CvGrandStrategyAI* self);static void AfterCvGrandStrategyAI_Reset(CvGrandStrategyAI* self);static void ReplaceCvGrandStrategyAI_Reset(void (*original)(CvGrandStrategyAI*), CvGrandStrategyAI* self);CivRegisterBefore<CivHooks::CvGrandStrategyAI_Reset>(host, &BeforeCvGrandStrategyAI_Reset);CivRegisterAfter<CivHooks::CvGrandStrategyAI_Reset>(host, &AfterCvGrandStrategyAI_Reset);CivRegisterReplace<CivHooks::CvGrandStrategyAI_Reset>(host, &ReplaceCvGrandStrategyAI_Reset);

Code

165/// Reset AIStrategy status array to all false166void CvGrandStrategyAI::Reset()167{168	int iI;169170	m_iNumTurnsSinceActiveSet = 0;171172	m_eActiveGrandStrategy = NO_AIGRANDSTRATEGY;173174	for(iI = 0; iI < m_pAIGrandStrategies->GetNumAIGrandStrategies(); iI++)175	{176		m_paiGrandStrategyPriority[iI] = -1;177	}178179	for(iI = 0; iI < MAX_MAJOR_CIVS; iI++)180	{181		m_eGuessOtherPlayerActiveGrandStrategy[iI] = NO_AIGRANDSTRATEGY;182		m_eGuessOtherPlayerActiveGrandStrategyConfidence[iI] = NO_GUESS_CONFIDENCE_TYPE;183	}184}

Calls

Called by