Bazaar developer reference

CvGameLeagues::IsTradeEmbargoed(PlayerTypes, PlayerTypes)

Defined in
CvVotingClasses.cpp, line 7174
Class
CvGameLeagues
Hook name
CivHooks::CvGameLeagues_IsTradeEmbargoed

Hooks

static bool BeforeCvGameLeagues_IsTradeEmbargoed(CvGameLeagues* self, PlayerTypes eTrader, PlayerTypes eRecipient, bool& result);static void AfterCvGameLeagues_IsTradeEmbargoed(CvGameLeagues* self, PlayerTypes eTrader, PlayerTypes eRecipient, bool& result);static bool ReplaceCvGameLeagues_IsTradeEmbargoed(bool (*original)(CvGameLeagues*, PlayerTypes, PlayerTypes), CvGameLeagues* self, PlayerTypes eTrader, PlayerTypes eRecipient);CivRegisterBefore<CivHooks::CvGameLeagues_IsTradeEmbargoed>(host, &BeforeCvGameLeagues_IsTradeEmbargoed);CivRegisterAfter<CivHooks::CvGameLeagues_IsTradeEmbargoed>(host, &AfterCvGameLeagues_IsTradeEmbargoed);CivRegisterReplace<CivHooks::CvGameLeagues_IsTradeEmbargoed>(host, &ReplaceCvGameLeagues_IsTradeEmbargoed);

Code

7174bool CvGameLeagues::IsTradeEmbargoed(PlayerTypes eTrader, PlayerTypes eRecipient)7175{7176	for (LeagueList::iterator it = m_vActiveLeagues.begin(); it != m_vActiveLeagues.end(); it++)7177	{7178		if (it->IsMember(eTrader))7179		{7180			if (it->IsTradeEmbargoed(eTrader, eRecipient))7181			{7182				return true;7183			}7184		}7185	}7186	return false;7187}

Calls

Called by