Bazaar developer reference

CvGame::AnyoneHasTech(TechTypes) const

Defined in
CvGame.cpp, line 12233
Class
CvGame
Hook name
CivHooks::CvGame_AnyoneHasTech

Hooks

static bool BeforeCvGame_AnyoneHasTech(const CvGame* self, TechTypes iTechType, bool& result);static void AfterCvGame_AnyoneHasTech(const CvGame* self, TechTypes iTechType, bool& result);static bool ReplaceCvGame_AnyoneHasTech(bool (*original)(const CvGame*, TechTypes), const CvGame* self, TechTypes iTechType);CivRegisterBefore<CivHooks::CvGame_AnyoneHasTech>(host, &BeforeCvGame_AnyoneHasTech);CivRegisterAfter<CivHooks::CvGame_AnyoneHasTech>(host, &AfterCvGame_AnyoneHasTech);CivRegisterReplace<CivHooks::CvGame_AnyoneHasTech>(host, &ReplaceCvGame_AnyoneHasTech);

Code

12233bool CvGame::AnyoneHasTech(TechTypes iTechType) const12234{12235	for (int i = 0; i < MAX_PLAYERS; ++i) {12236		CvPlayer& player = GET_PLAYER(static_cast<PlayerTypes>(i));1223712238		if(player.isAlive() && player.HasTech(iTechType)) {12239			return true;12240		}12241	}1224212243	return false;12244}

Calls

Called by