Bazaar developer reference

CvLuaUnit::lGetTradeInfluence(lua_State *)

Defined in
Lua/CvLuaUnit.cpp, line 1558
Class
CvLuaUnit
Hook name
CivHooks::CvLuaUnit_lGetTradeInfluence

Hooks

static bool BeforeCvLuaUnit_lGetTradeInfluence(lua_State* L, int& result);static void AfterCvLuaUnit_lGetTradeInfluence(lua_State* L, int& result);static int ReplaceCvLuaUnit_lGetTradeInfluence(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaUnit_lGetTradeInfluence>(host, &BeforeCvLuaUnit_lGetTradeInfluence);CivRegisterAfter<CivHooks::CvLuaUnit_lGetTradeInfluence>(host, &AfterCvLuaUnit_lGetTradeInfluence);CivRegisterReplace<CivHooks::CvLuaUnit_lGetTradeInfluence>(host, &ReplaceCvLuaUnit_lGetTradeInfluence);

Code

1557//int GetTradeInfluence(CyPlot* pPlot);1558int CvLuaUnit::lGetTradeInfluence(lua_State* L)1559{1560	CvUnit* pkUnit = GetInstance(L);1561	CvPlot* pkPlot = CvLuaPlot::GetInstance(L, 2);15621563	const int iResult = pkUnit->getTradeInfluence(pkPlot);1564	lua_pushinteger(L, iResult);1565	return 1;1566}

Calls

Called by