CvLuaUnit::lGetBestSeaPillageInterceptor(lua_State *)
- Defined in
- Lua/CvLuaUnit.cpp, line 2737
- Class
- CvLuaUnit
- Hook name
CivHooks::CvLuaUnit_lGetBestSeaPillageInterceptor
Hooks
static bool BeforeCvLuaUnit_lGetBestSeaPillageInterceptor(lua_State* L, int& result);static void AfterCvLuaUnit_lGetBestSeaPillageInterceptor(lua_State* L, int& result);static int ReplaceCvLuaUnit_lGetBestSeaPillageInterceptor(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaUnit_lGetBestSeaPillageInterceptor>(host, &BeforeCvLuaUnit_lGetBestSeaPillageInterceptor);CivRegisterAfter<CivHooks::CvLuaUnit_lGetBestSeaPillageInterceptor>(host, &AfterCvLuaUnit_lGetBestSeaPillageInterceptor);CivRegisterReplace<CivHooks::CvLuaUnit_lGetBestSeaPillageInterceptor>(host, &ReplaceCvLuaUnit_lGetBestSeaPillageInterceptor);
Code
2736//CyUnit* bestSeaPillageInterceptor( CyPlot* pPlot);2737int CvLuaUnit::lGetBestSeaPillageInterceptor(lua_State* L)2738{2739 CvUnit* pkUnit = GetInstance(L);2740 CvPlot* pkPlot = CvLuaPlot::GetInstance(L, 2);27412742 CvUnit* pkBestUnit = 0;2743 if(pkPlot)2744 {2745 pkBestUnit = pkUnit->GetBestInterceptor(*pkPlot);2746 }27472748 CvLuaUnit::Push(L, pkBestUnit);2749 return 1;2750}
Calls
CvLuaScopedInstance::GetInstanceCvLuaScopedInstance::GetInstanceCvLuaScopedInstance::Push- CvUnit::GetBestInterceptor(const CvPlot &, CvUnit *, bool, bool) const