Bazaar developer reference

CvMilitaryAI::GetPureNavalAttackOperation(PlayerTypes)

Defined in
CvMilitaryAI.cpp, line 836
Class
CvMilitaryAI
Hook name
CivHooks::CvMilitaryAI_GetPureNavalAttackOperation

Hooks

static bool BeforeCvMilitaryAI_GetPureNavalAttackOperation(CvMilitaryAI* self, PlayerTypes eEnemy, CvAIOperation*& result);static void AfterCvMilitaryAI_GetPureNavalAttackOperation(CvMilitaryAI* self, PlayerTypes eEnemy, CvAIOperation*& result);static CvAIOperation* ReplaceCvMilitaryAI_GetPureNavalAttackOperation(CvAIOperation* (*original)(CvMilitaryAI*, PlayerTypes), CvMilitaryAI* self, PlayerTypes eEnemy);CivRegisterBefore<CivHooks::CvMilitaryAI_GetPureNavalAttackOperation>(host, &BeforeCvMilitaryAI_GetPureNavalAttackOperation);CivRegisterAfter<CivHooks::CvMilitaryAI_GetPureNavalAttackOperation>(host, &AfterCvMilitaryAI_GetPureNavalAttackOperation);CivRegisterReplace<CivHooks::CvMilitaryAI_GetPureNavalAttackOperation>(host, &ReplaceCvMilitaryAI_GetPureNavalAttackOperation);

Code

835/// Get a pointer to the pure naval operation against a target836CvAIOperation* CvMilitaryAI::GetPureNavalAttackOperation(PlayerTypes eEnemy)837{838	int iOperationID;839	bool bHasOperationUnderway = m_pPlayer->haveAIOperationOfType(AI_OPERATION_PURE_NAVAL_CITY_ATTACK, &iOperationID, eEnemy);840841	if(bHasOperationUnderway)842	{843		return m_pPlayer->getAIOperation(iOperationID);844	}845846	return NULL;847}

Calls

Called by