Bazaar developer reference

CvPlayerTraits::IsEndOfMayaLongCount()

Defined in
CvTraitClasses.cpp, line 3214
Class
CvPlayerTraits
Hook name
CivHooks::CvPlayerTraits_IsEndOfMayaLongCount

Hooks

static bool BeforeCvPlayerTraits_IsEndOfMayaLongCount(CvPlayerTraits* self, bool& result);static void AfterCvPlayerTraits_IsEndOfMayaLongCount(CvPlayerTraits* self, bool& result);static bool ReplaceCvPlayerTraits_IsEndOfMayaLongCount(bool (*original)(CvPlayerTraits*), CvPlayerTraits* self);CivRegisterBefore<CivHooks::CvPlayerTraits_IsEndOfMayaLongCount>(host, &BeforeCvPlayerTraits_IsEndOfMayaLongCount);CivRegisterAfter<CivHooks::CvPlayerTraits_IsEndOfMayaLongCount>(host, &AfterCvPlayerTraits_IsEndOfMayaLongCount);CivRegisterReplace<CivHooks::CvPlayerTraits_IsEndOfMayaLongCount>(host, &ReplaceCvPlayerTraits_IsEndOfMayaLongCount);

Code

3213/// Is this the first turn at the end of a baktun (cycle) of the Maya Long Count calendar?3214bool CvPlayerTraits::IsEndOfMayaLongCount()3215{3216	bool bRtnValue = false;32173218	if (!IsUsingMayaCalendar())3219	{3220		return bRtnValue;3221	}32223223	ComputeMayaDate();32243225	if(m_iBaktunPreviousTurn + 1 == m_iBaktun)3226	{3227		bRtnValue = true;3228	}32293230	m_iBaktunPreviousTurn = m_iBaktun;32313232	return bRtnValue;3233}

Calls

Called by