Bazaar developer reference

CvDiplomacyAI::IsGoingForSpaceshipVictory()

Defined in
CvDiplomacyAI.cpp, line 24408
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_IsGoingForSpaceshipVictory

Hooks

static bool BeforeCvDiplomacyAI_IsGoingForSpaceshipVictory(CvDiplomacyAI* self, bool& result);static void AfterCvDiplomacyAI_IsGoingForSpaceshipVictory(CvDiplomacyAI* self, bool& result);static bool ReplaceCvDiplomacyAI_IsGoingForSpaceshipVictory(bool (*original)(CvDiplomacyAI*), CvDiplomacyAI* self);CivRegisterBefore<CivHooks::CvDiplomacyAI_IsGoingForSpaceshipVictory>(host, &BeforeCvDiplomacyAI_IsGoingForSpaceshipVictory);CivRegisterAfter<CivHooks::CvDiplomacyAI_IsGoingForSpaceshipVictory>(host, &AfterCvDiplomacyAI_IsGoingForSpaceshipVictory);CivRegisterReplace<CivHooks::CvDiplomacyAI_IsGoingForSpaceshipVictory>(host, &ReplaceCvDiplomacyAI_IsGoingForSpaceshipVictory);

Code

24408bool CvDiplomacyAI::IsGoingForSpaceshipVictory()24409{24410	AIGrandStrategyTypes eGrandStrategy = (AIGrandStrategyTypes) GC.getInfoTypeForString("AIGRANDSTRATEGY_SPACESHIP");2441124412	if(eGrandStrategy != NO_AIGRANDSTRATEGY)24413	{24414		if(GetPlayer()->GetGrandStrategyAI()->GetActiveGrandStrategy() == eGrandStrategy)24415		{24416			return true;24417		}24418	}2441924420	return false;24421}

Calls

Called by