Bazaar developer reference

CvGoodyHuts::Reset()

Defined in
CvGoodyHuts.cpp, line 69
Class
CvGoodyHuts
Hook name
CivHooks::CvGoodyHuts_Reset

Hooks

static bool BeforeCvGoodyHuts_Reset();static void AfterCvGoodyHuts_Reset();static void ReplaceCvGoodyHuts_Reset(void (*original)());CivRegisterBefore<CivHooks::CvGoodyHuts_Reset>(host, &BeforeCvGoodyHuts_Reset);CivRegisterAfter<CivHooks::CvGoodyHuts_Reset>(host, &AfterCvGoodyHuts_Reset);CivRegisterReplace<CivHooks::CvGoodyHuts_Reset>(host, &ReplaceCvGoodyHuts_Reset);

Code

68/// Reset69void CvGoodyHuts::Reset()70{71	int iI, iJ;7273	// Allocate memory74	if (m_aaiPlayerGoodyHutResults == NULL)75	{76		m_aaiPlayerGoodyHutResults = FNEW(int*[MAX_MAJOR_CIVS], c_eCiv5GameplayDLL, 0);77		for (iI = 0; iI < MAX_MAJOR_CIVS; iI++)78		{79			m_aaiPlayerGoodyHutResults[iI] = FNEW(int[NUM_GOODIES_REMEMBERED], c_eCiv5GameplayDLL, 0);80		}81	}8283	// Default values84	for (iI = 0; iI < MAX_MAJOR_CIVS; iI++)85	{86		for (iJ = 0; iJ < NUM_GOODIES_REMEMBERED; iJ++)87		{88			m_aaiPlayerGoodyHutResults[iI][iJ] = -1;89		}90	}91}

Called by