Bazaar developer reference

CvDiplomacyAI::IsGoingForCultureVictory()

Defined in
CvDiplomacyAI.cpp, line 24393
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_IsGoingForCultureVictory

Hooks

static bool BeforeCvDiplomacyAI_IsGoingForCultureVictory(CvDiplomacyAI* self, bool& result);static void AfterCvDiplomacyAI_IsGoingForCultureVictory(CvDiplomacyAI* self, bool& result);static bool ReplaceCvDiplomacyAI_IsGoingForCultureVictory(bool (*original)(CvDiplomacyAI*), CvDiplomacyAI* self);CivRegisterBefore<CivHooks::CvDiplomacyAI_IsGoingForCultureVictory>(host, &BeforeCvDiplomacyAI_IsGoingForCultureVictory);CivRegisterAfter<CivHooks::CvDiplomacyAI_IsGoingForCultureVictory>(host, &AfterCvDiplomacyAI_IsGoingForCultureVictory);CivRegisterReplace<CivHooks::CvDiplomacyAI_IsGoingForCultureVictory>(host, &ReplaceCvDiplomacyAI_IsGoingForCultureVictory);

Code

24392/// Does this player want to win by diplo?24393bool CvDiplomacyAI::IsGoingForCultureVictory()24394{24395	AIGrandStrategyTypes eGrandStrategy = (AIGrandStrategyTypes) GC.getInfoTypeForString("AIGRANDSTRATEGY_CULTURE");2439624397	if(eGrandStrategy != NO_AIGRANDSTRATEGY)24398	{24399		if(GetPlayer()->GetGrandStrategyAI()->GetActiveGrandStrategy() == eGrandStrategy)24400		{24401			return true;24402		}24403	}2440424405	return false;24406}

Calls

Called by