Hooks
static bool BeforeCvLuaMap_lPlotXYWithRangeCheck(lua_State* L, int& result);static void AfterCvLuaMap_lPlotXYWithRangeCheck(lua_State* L, int& result);static int ReplaceCvLuaMap_lPlotXYWithRangeCheck(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaMap_lPlotXYWithRangeCheck>(host, &BeforeCvLuaMap_lPlotXYWithRangeCheck);CivRegisterAfter<CivHooks::CvLuaMap_lPlotXYWithRangeCheck>(host, &AfterCvLuaMap_lPlotXYWithRangeCheck);CivRegisterReplace<CivHooks::CvLuaMap_lPlotXYWithRangeCheck>(host, &ReplaceCvLuaMap_lPlotXYWithRangeCheck);
Code
376int CvLuaMap::lPlotXYWithRangeCheck(lua_State* L)377{378 int iX = lua_tointeger(L, 1);379 int iY = lua_tointeger(L, 2);380 int iDeltaHexX = lua_tointeger(L, 3);381 int iDeltaHexY = lua_tointeger(L, 4);382 int iRange = lua_tointeger(L, 5);383 CvPlot* pkPlot = plotXYWithRangeCheck(iX, iY, iDeltaHexX, iDeltaHexY, iRange);384 CvLuaPlot::Push(L, pkPlot);385 return 1;386}