Bazaar developer reference

CvPlayer::isOption(PlayerOptionTypes) const

Defined in
CvPlayer.cpp, line 19781
Class
CvPlayer
Hook name
CivHooks::CvPlayer_isOption

Hooks

static bool BeforeCvPlayer_isOption(const CvPlayer* self, PlayerOptionTypes eID, bool& result);static void AfterCvPlayer_isOption(const CvPlayer* self, PlayerOptionTypes eID, bool& result);static bool ReplaceCvPlayer_isOption(bool (*original)(const CvPlayer*, PlayerOptionTypes), const CvPlayer* self, PlayerOptionTypes eID);CivRegisterBefore<CivHooks::CvPlayer_isOption>(host, &BeforeCvPlayer_isOption);CivRegisterAfter<CivHooks::CvPlayer_isOption>(host, &AfterCvPlayer_isOption);CivRegisterReplace<CivHooks::CvPlayer_isOption>(host, &ReplaceCvPlayer_isOption);

Code

19781bool CvPlayer::isOption(PlayerOptionTypes eID) const19782{19783	for (PlayerOptionsVector::const_iterator itr = m_aOptions.begin(); itr != m_aOptions.end(); ++itr )19784	{19785		if ((*itr).first == eID)19786			return (*itr).second != 0;19787	}19788	return false;19789}

Calls

Called by