Bazaar developer reference

CvGameTrade::IsTradeRouteIndexEmpty(int)

Defined in
CvTradeClasses.cpp, line 878
Class
CvGameTrade
Hook name
CivHooks::CvGameTrade_IsTradeRouteIndexEmpty

Hooks

static bool BeforeCvGameTrade_IsTradeRouteIndexEmpty(CvGameTrade* self, int iIndex, bool& result);static void AfterCvGameTrade_IsTradeRouteIndexEmpty(CvGameTrade* self, int iIndex, bool& result);static bool ReplaceCvGameTrade_IsTradeRouteIndexEmpty(bool (*original)(CvGameTrade*, int), CvGameTrade* self, int iIndex);CivRegisterBefore<CivHooks::CvGameTrade_IsTradeRouteIndexEmpty>(host, &BeforeCvGameTrade_IsTradeRouteIndexEmpty);CivRegisterAfter<CivHooks::CvGameTrade_IsTradeRouteIndexEmpty>(host, &AfterCvGameTrade_IsTradeRouteIndexEmpty);CivRegisterReplace<CivHooks::CvGameTrade_IsTradeRouteIndexEmpty>(host, &ReplaceCvGameTrade_IsTradeRouteIndexEmpty);

Code

878bool CvGameTrade::IsTradeRouteIndexEmpty(int iIndex)879{880	if (m_aTradeConnections[iIndex].m_iOriginX == -1 && m_aTradeConnections[iIndex].m_iOriginY == -1 && m_aTradeConnections[iIndex].m_iDestX == -1 && m_aTradeConnections[iIndex].m_iDestY == -1)881	{882		return true;883	}884	else885	{886		return false;887	}888}

Calls

Called by

43 functions in 6 files