CvLuaUnit::lPromote(lua_State *)
- Defined in
- Lua/CvLuaUnit.cpp, line 1742
- Class
- CvLuaUnit
- Hook name
CivHooks::CvLuaUnit_lPromote
Hooks
static bool BeforeCvLuaUnit_lPromote(lua_State* L, int& result);static void AfterCvLuaUnit_lPromote(lua_State* L, int& result);static int ReplaceCvLuaUnit_lPromote(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaUnit_lPromote>(host, &BeforeCvLuaUnit_lPromote);CivRegisterAfter<CivHooks::CvLuaUnit_lPromote>(host, &AfterCvLuaUnit_lPromote);CivRegisterReplace<CivHooks::CvLuaUnit_lPromote>(host, &ReplaceCvLuaUnit_lPromote);
Code
1741//void promote(int /*PromotionTypes*/ ePromotion, int iLeaderUnitId);1742int CvLuaUnit::lPromote(lua_State* L)1743{1744 CvUnit* pkUnit = GetInstance(L);1745 const PromotionTypes ePromotion = (PromotionTypes)lua_tointeger(L, 2);1746 const int iLeaderUnitId = lua_tointeger(L, 3);17471748 pkUnit->promote(ePromotion, iLeaderUnitId);1749 return 0;1750}
Calls
CvLuaScopedInstance::GetInstance- CvUnit::promote(PromotionTypes, int)
lua_tointeger