Bazaar developer reference

CvGameTrade::IsConnectionInternational(const TradeConnection &)

Defined in
CvTradeClasses.cpp, line 582
Class
CvGameTrade
Hook name
CivHooks::CvGameTrade_IsConnectionInternational

Hooks

static bool BeforeCvGameTrade_IsConnectionInternational(CvGameTrade* self, const TradeConnection& kConnection, bool& result);static void AfterCvGameTrade_IsConnectionInternational(CvGameTrade* self, const TradeConnection& kConnection, bool& result);static bool ReplaceCvGameTrade_IsConnectionInternational(bool (*original)(CvGameTrade*, const TradeConnection&), CvGameTrade* self, const TradeConnection& kConnection);CivRegisterBefore<CivHooks::CvGameTrade_IsConnectionInternational>(host, &BeforeCvGameTrade_IsConnectionInternational);CivRegisterAfter<CivHooks::CvGameTrade_IsConnectionInternational>(host, &AfterCvGameTrade_IsConnectionInternational);CivRegisterReplace<CivHooks::CvGameTrade_IsConnectionInternational>(host, &ReplaceCvGameTrade_IsConnectionInternational);

Code

582bool CvGameTrade::IsConnectionInternational	(const TradeConnection& kConnection)583{584	TeamTypes eOriginTeam = NO_TEAM;585	TeamTypes eDestTeam = NO_TEAM;586587	if (kConnection.m_eOriginOwner != NO_PLAYER)588	{589		eOriginTeam = GET_PLAYER(kConnection.m_eOriginOwner).getTeam();590	}591592	if (kConnection.m_eDestOwner != NO_PLAYER)593	{594		eDestTeam = GET_PLAYER(kConnection.m_eDestOwner).getTeam();595	}596597	return (eOriginTeam != eDestTeam);598}

Calls

Called by