Bazaar developer reference

CvGameTrade::GetDestCity(const TradeConnection &)

Defined in
CvTradeClasses.cpp, line 1306
Class
CvGameTrade
Hook name
CivHooks::CvGameTrade_GetDestCity

Hooks

static bool BeforeCvGameTrade_GetDestCity(const TradeConnection& kTradeConnection, CvCity*& result);static void AfterCvGameTrade_GetDestCity(const TradeConnection& kTradeConnection, CvCity*& result);static CvCity* ReplaceCvGameTrade_GetDestCity(CvCity* (*original)(const TradeConnection&), const TradeConnection& kTradeConnection);CivRegisterBefore<CivHooks::CvGameTrade_GetDestCity>(host, &BeforeCvGameTrade_GetDestCity);CivRegisterAfter<CivHooks::CvGameTrade_GetDestCity>(host, &AfterCvGameTrade_GetDestCity);CivRegisterReplace<CivHooks::CvGameTrade_GetDestCity>(host, &ReplaceCvGameTrade_GetDestCity);

Code

1306CvCity* CvGameTrade::GetDestCity(const TradeConnection& kTradeConnection)1307{1308	CvPlot* pPlot = GC.getMap().plot(kTradeConnection.m_iDestX, kTradeConnection.m_iDestY);13091310	CvAssertMsg(pPlot, "CvPlayerTrade - plot is null");1311	if (!pPlot)1312	{1313		return NULL;1314	}13151316	return pPlot->getPlotCity();	1317}

Calls

Called by