Bazaar developer reference

CvPlot::IsTradeRoute(PlayerTypes) const

Defined in
CvPlot.cpp, line 4469
Class
CvPlot
Hook name
CivHooks::CvPlot_IsTradeRoute

Hooks

static bool BeforeCvPlot_IsTradeRoute(const CvPlot* self, PlayerTypes ePlayer, bool& result);static void AfterCvPlot_IsTradeRoute(const CvPlot* self, PlayerTypes ePlayer, bool& result);static bool ReplaceCvPlot_IsTradeRoute(bool (*original)(const CvPlot*, PlayerTypes), const CvPlot* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvPlot_IsTradeRoute>(host, &BeforeCvPlot_IsTradeRoute);CivRegisterAfter<CivHooks::CvPlot_IsTradeRoute>(host, &AfterCvPlot_IsTradeRoute);CivRegisterReplace<CivHooks::CvPlot_IsTradeRoute>(host, &ReplaceCvPlot_IsTradeRoute);

Code

4469bool CvPlot::IsTradeRoute(PlayerTypes ePlayer) const4470{4471	if(ePlayer == NO_PLAYER)4472	{4473		if(m_uiTradeRouteBitFlags > 0)4474		{4475			return true;4476		}4477	}4478	else4479	{4480		uint uiNewBitValue = (1 << ePlayer);4481		if(m_uiTradeRouteBitFlags & uiNewBitValue)4482		{4483			return true;4484		}4485		else4486		{4487			return false;4488		}4489	}44904491	return false;4492}

Called by