Bazaar developer reference

CvCityEmphases::Reset()

Defined in
CvEmphasisClasses.cpp, line 139
Class
CvCityEmphases
Hook name
CivHooks::CvCityEmphases_Reset

Hooks

static bool BeforeCvCityEmphases_Reset(CvCityEmphases* self);static void AfterCvCityEmphases_Reset(CvCityEmphases* self);static void ReplaceCvCityEmphases_Reset(void (*original)(CvCityEmphases*), CvCityEmphases* self);CivRegisterBefore<CivHooks::CvCityEmphases_Reset>(host, &BeforeCvCityEmphases_Reset);CivRegisterAfter<CivHooks::CvCityEmphases_Reset>(host, &AfterCvCityEmphases_Reset);CivRegisterReplace<CivHooks::CvCityEmphases_Reset>(host, &ReplaceCvCityEmphases_Reset);

Code

138/// Reset status arrays to all false139void CvCityEmphases::Reset()140{141	Uninit();142143	m_iEmphasizeAvoidGrowthCount = 0;144	m_iEmphasizeGreatPeopleCount = 0;145146	for(int iI = 0; iI < NUM_YIELD_TYPES; iI++)147	{148		m_aiEmphasizeYieldCount[iI] = 0;149	}150151	CvAssertMsg(m_pbEmphasize == NULL, "m_pbEmphasize not NULL!!!");152	CvAssertMsg(GC.getNumEmphasisInfos() > 0,  "GC.getNumEmphasizeInfos() is not greater than zero but an array is being allocated in CvCityEmphases::Reset");153	m_pbEmphasize = FNEW(bool[GC.getNumEmphasisInfos()], c_eCiv5GameplayDLL, 0);154	for(int iI = 0; iI < GC.getNumEmphasisInfos(); iI++)155	{156		m_pbEmphasize[iI] = false;157	}158}

Calls

Called by