Bazaar developer reference

CvDiplomacyAI::IsGoingForDiploVictory()

Defined in
CvDiplomacyAI.cpp, line 24377
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_IsGoingForDiploVictory

Hooks

static bool BeforeCvDiplomacyAI_IsGoingForDiploVictory(CvDiplomacyAI* self, bool& result);static void AfterCvDiplomacyAI_IsGoingForDiploVictory(CvDiplomacyAI* self, bool& result);static bool ReplaceCvDiplomacyAI_IsGoingForDiploVictory(bool (*original)(CvDiplomacyAI*), CvDiplomacyAI* self);CivRegisterBefore<CivHooks::CvDiplomacyAI_IsGoingForDiploVictory>(host, &BeforeCvDiplomacyAI_IsGoingForDiploVictory);CivRegisterAfter<CivHooks::CvDiplomacyAI_IsGoingForDiploVictory>(host, &AfterCvDiplomacyAI_IsGoingForDiploVictory);CivRegisterReplace<CivHooks::CvDiplomacyAI_IsGoingForDiploVictory>(host, &ReplaceCvDiplomacyAI_IsGoingForDiploVictory);

Code

24376/// Does this player want to win by diplo?24377bool CvDiplomacyAI::IsGoingForDiploVictory()24378{24379	AIGrandStrategyTypes eGrandStrategy = (AIGrandStrategyTypes) GC.getInfoTypeForString("AIGRANDSTRATEGY_UNITED_NATIONS");2438024381	if(eGrandStrategy != NO_AIGRANDSTRATEGY)24382	{24383		if(GetPlayer()->GetGrandStrategyAI()->GetActiveGrandStrategy() == eGrandStrategy)24384		{24385			return true;24386		}24387	}2438824389	return false;24390}

Calls

Called by