Bazaar developer reference

CvLuaUnit::lIsHasPromotion(lua_State *)

Defined in
Lua/CvLuaUnit.cpp, line 5012
Class
CvLuaUnit
Hook name
CivHooks::CvLuaUnit_lIsHasPromotion

Hooks

static bool BeforeCvLuaUnit_lIsHasPromotion(lua_State* L, int& result);static void AfterCvLuaUnit_lIsHasPromotion(lua_State* L, int& result);static int ReplaceCvLuaUnit_lIsHasPromotion(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaUnit_lIsHasPromotion>(host, &BeforeCvLuaUnit_lIsHasPromotion);CivRegisterAfter<CivHooks::CvLuaUnit_lIsHasPromotion>(host, &AfterCvLuaUnit_lIsHasPromotion);CivRegisterReplace<CivHooks::CvLuaUnit_lIsHasPromotion>(host, &ReplaceCvLuaUnit_lIsHasPromotion);

Code

5011//bool isHasPromotion(int /*PromotionTypes*/ ePromotion);5012int CvLuaUnit::lIsHasPromotion(lua_State* L)5013{5014	CvUnit* pkUnit = GetInstance(L);5015	const PromotionTypes ePromotion = (PromotionTypes)lua_tointeger(L, 2);5016	const bool bResult = pkUnit->isHasPromotion(ePromotion);50175018	lua_pushboolean(L, bResult);5019	return 1;5020}

Calls

Called by