CvLuaUnit::lIsHigherTechThan(lua_State *)
- Defined in
- Lua/CvLuaUnit.cpp, line 5309
- Class
- CvLuaUnit
- Hook name
CivHooks::CvLuaUnit_lIsHigherTechThan
Hooks
static bool BeforeCvLuaUnit_lIsHigherTechThan(lua_State* L, int& result);static void AfterCvLuaUnit_lIsHigherTechThan(lua_State* L, int& result);static int ReplaceCvLuaUnit_lIsHigherTechThan(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaUnit_lIsHigherTechThan>(host, &BeforeCvLuaUnit_lIsHigherTechThan);CivRegisterAfter<CivHooks::CvLuaUnit_lIsHigherTechThan>(host, &AfterCvLuaUnit_lIsHigherTechThan);CivRegisterReplace<CivHooks::CvLuaUnit_lIsHigherTechThan>(host, &ReplaceCvLuaUnit_lIsHigherTechThan);
Code
5308//bool IsHigherTechThan(UnitTypes eOtherUnit );5309int CvLuaUnit::lIsHigherTechThan(lua_State* L)5310{5311 CvUnit* pkUnit = GetInstance(L);5312 UnitTypes eOtherUnit = (UnitTypes)lua_tointeger(L, 2);5313 const bool bResult = pkUnit->IsHigherTechThan(eOtherUnit);53145315 lua_pushboolean(L, bResult);5316 return 1;5317}
Calls
CvLuaScopedInstance::GetInstance- CvUnit::IsHigherTechThan(UnitTypes) const
lua_pushbooleanlua_tointeger