Bazaar developer reference

CvGame::isSpecialUnitValid(SpecialUnitTypes)

Defined in
CvGame.cpp, line 7482
Class
CvGame
Hook name
CivHooks::CvGame_isSpecialUnitValid

Hooks

static bool BeforeCvGame_isSpecialUnitValid(CvGame* self, SpecialUnitTypes eIndex, bool& result);static void AfterCvGame_isSpecialUnitValid(CvGame* self, SpecialUnitTypes eIndex, bool& result);static bool ReplaceCvGame_isSpecialUnitValid(bool (*original)(CvGame*, SpecialUnitTypes), CvGame* self, SpecialUnitTypes eIndex);CivRegisterBefore<CivHooks::CvGame_isSpecialUnitValid>(host, &BeforeCvGame_isSpecialUnitValid);CivRegisterAfter<CivHooks::CvGame_isSpecialUnitValid>(host, &AfterCvGame_isSpecialUnitValid);CivRegisterReplace<CivHooks::CvGame_isSpecialUnitValid>(host, &ReplaceCvGame_isSpecialUnitValid);

Code

7482bool CvGame::isSpecialUnitValid(SpecialUnitTypes eIndex)7483{7484	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");7485	CvAssertMsg(eIndex < GC.getNumSpecialUnitInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");7486	return m_pabSpecialUnitValid[eIndex];7487}

Called by