Bazaar developer reference

CvGameLeagues::IsLuxuryHappinessBanned(PlayerTypes, ResourceTypes)

Defined in
CvVotingClasses.cpp, line 7189
Class
CvGameLeagues
Hook name
CivHooks::CvGameLeagues_IsLuxuryHappinessBanned

Hooks

static bool BeforeCvGameLeagues_IsLuxuryHappinessBanned(CvGameLeagues* self, PlayerTypes ePlayer, ResourceTypes eLuxury, bool& result);static void AfterCvGameLeagues_IsLuxuryHappinessBanned(CvGameLeagues* self, PlayerTypes ePlayer, ResourceTypes eLuxury, bool& result);static bool ReplaceCvGameLeagues_IsLuxuryHappinessBanned(bool (*original)(CvGameLeagues*, PlayerTypes, ResourceTypes), CvGameLeagues* self, PlayerTypes ePlayer, ResourceTypes eLuxury);CivRegisterBefore<CivHooks::CvGameLeagues_IsLuxuryHappinessBanned>(host, &BeforeCvGameLeagues_IsLuxuryHappinessBanned);CivRegisterAfter<CivHooks::CvGameLeagues_IsLuxuryHappinessBanned>(host, &AfterCvGameLeagues_IsLuxuryHappinessBanned);CivRegisterReplace<CivHooks::CvGameLeagues_IsLuxuryHappinessBanned>(host, &ReplaceCvGameLeagues_IsLuxuryHappinessBanned);

Code

7189bool CvGameLeagues::IsLuxuryHappinessBanned(PlayerTypes ePlayer, ResourceTypes eLuxury)7190{7191	for (LeagueList::iterator it = m_vActiveLeagues.begin(); it != m_vActiveLeagues.end(); it++)7192	{7193		if (it->IsMember(ePlayer))7194		{7195			if (it->IsLuxuryHappinessBanned(eLuxury))7196			{7197				return true;7198			}7199		}7200	}7201	return false;7202}

Calls

Called by