Bazaar developer reference

CvProjectEntry::GetVictoryThreshold(int) const

Defined in
CvProjectClasses.cpp, line 235
Class
CvProjectEntry
Hook name
CivHooks::CvProjectEntry_GetVictoryThreshold

Hooks

static bool BeforeCvProjectEntry_GetVictoryThreshold(const CvProjectEntry* self, int i, int& result);static void AfterCvProjectEntry_GetVictoryThreshold(const CvProjectEntry* self, int i, int& result);static int ReplaceCvProjectEntry_GetVictoryThreshold(int (*original)(const CvProjectEntry*, int), const CvProjectEntry* self, int i);CivRegisterBefore<CivHooks::CvProjectEntry_GetVictoryThreshold>(host, &BeforeCvProjectEntry_GetVictoryThreshold);CivRegisterAfter<CivHooks::CvProjectEntry_GetVictoryThreshold>(host, &AfterCvProjectEntry_GetVictoryThreshold);CivRegisterReplace<CivHooks::CvProjectEntry_GetVictoryThreshold>(host, &ReplaceCvProjectEntry_GetVictoryThreshold);

Code

234/// Maximum number of these needed for victory condition235int CvProjectEntry::GetVictoryThreshold(int i) const236{237	CvAssertMsg(i < GC.getNumVictoryInfos(), "Index out of bounds");238	CvAssertMsg(i > -1, "Index out of bounds");239240	if(i > -1 && i < GC.getNumVictoryInfos() && m_piVictoryThreshold)241	{242		return  m_piVictoryThreshold[i];243	}244245	return -1;246}

Calls

Called by