Bazaar developer reference

CvTeam::changeProjectMaking(ProjectTypes, int)

Defined in
CvTeam.cpp, line 4824
Class
CvTeam
Hook name
CivHooks::CvTeam_changeProjectMaking

Hooks

static bool BeforeCvTeam_changeProjectMaking(CvTeam* self, ProjectTypes eIndex, int iChange);static void AfterCvTeam_changeProjectMaking(CvTeam* self, ProjectTypes eIndex, int iChange);static void ReplaceCvTeam_changeProjectMaking(void (*original)(CvTeam*, ProjectTypes, int), CvTeam* self, ProjectTypes eIndex, int iChange);CivRegisterBefore<CivHooks::CvTeam_changeProjectMaking>(host, &BeforeCvTeam_changeProjectMaking);CivRegisterAfter<CivHooks::CvTeam_changeProjectMaking>(host, &AfterCvTeam_changeProjectMaking);CivRegisterReplace<CivHooks::CvTeam_changeProjectMaking>(host, &ReplaceCvTeam_changeProjectMaking);

Code

4824void CvTeam::changeProjectMaking(ProjectTypes eIndex, int iChange)4825{4826	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");4827	CvAssertMsg(eIndex < GC.getNumProjectInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");4828	m_paiProjectMaking[eIndex] = (m_paiProjectMaking[eIndex] + iChange);4829	CvAssert(getProjectMaking(eIndex) >= 0);4830}

Called by