Bazaar developer reference

CvGame::setBestLandUnit(UnitTypes)

Defined in
CvGame.cpp, line 5836
Class
CvGame
Hook name
CivHooks::CvGame_setBestLandUnit

Hooks

static bool BeforeCvGame_setBestLandUnit(CvGame* self, UnitTypes eNewValue);static void AfterCvGame_setBestLandUnit(CvGame* self, UnitTypes eNewValue);static void ReplaceCvGame_setBestLandUnit(void (*original)(CvGame*, UnitTypes), CvGame* self, UnitTypes eNewValue);CivRegisterBefore<CivHooks::CvGame_setBestLandUnit>(host, &BeforeCvGame_setBestLandUnit);CivRegisterAfter<CivHooks::CvGame_setBestLandUnit>(host, &AfterCvGame_setBestLandUnit);CivRegisterReplace<CivHooks::CvGame_setBestLandUnit>(host, &ReplaceCvGame_setBestLandUnit);

Code

5836void CvGame::setBestLandUnit(UnitTypes eNewValue)5837{5838	if(getBestLandUnit() != eNewValue)5839	{5840		m_eBestLandUnit = eNewValue;58415842		GC.GetEngineUserInterface()->setDirty(UnitInfo_DIRTY_BIT, true);5843	}5844}

Calls

Called by