Bazaar developer reference

IfTradeUnit_DisplayPopupTradeRoute(CvUnit *)

Defined in
CvGame.cpp, line 2751
Hook name
CivHooks::CvGame_cpp_IfTradeUnit_DisplayPopupTradeRoute

Hooks

static bool BeforeCvGame_cpp_IfTradeUnit_DisplayPopupTradeRoute(CvUnit * pUnit);static void AfterCvGame_cpp_IfTradeUnit_DisplayPopupTradeRoute(CvUnit * pUnit);static void ReplaceCvGame_cpp_IfTradeUnit_DisplayPopupTradeRoute(void (*original)(CvUnit *), CvUnit * pUnit);CivRegisterBefore<CivHooks::CvGame_cpp_IfTradeUnit_DisplayPopupTradeRoute>(host, &BeforeCvGame_cpp_IfTradeUnit_DisplayPopupTradeRoute);CivRegisterAfter<CivHooks::CvGame_cpp_IfTradeUnit_DisplayPopupTradeRoute>(host, &AfterCvGame_cpp_IfTradeUnit_DisplayPopupTradeRoute);CivRegisterReplace<CivHooks::CvGame_cpp_IfTradeUnit_DisplayPopupTradeRoute>(host, &ReplaceCvGame_cpp_IfTradeUnit_DisplayPopupTradeRoute);

Code

2751static void IfTradeUnit_DisplayPopupTradeRoute(CvUnit *pUnit)2752{2753	int iRouteIndex;27542755	iRouteIndex = -1;2756	if (pUnit && pUnit->isTrade())2757	{2758		iRouteIndex = GC.getGame().GetGameTrade()->GetIndexFromUnitID(pUnit->GetID(),pUnit->getOwner());2759		if (iRouteIndex != -1) {2760			gDLL->TradeVisuals_ActivatePopupRoute(iRouteIndex);2761		}2762	}	2763}

Calls

Called by