CvLuaPlayer::lIsFreePromotion(lua_State *)
- Defined in
- Lua/CvLuaPlayer.cpp, line 10126
- Class
- CvLuaPlayer
- Hook name
CivHooks::CvLuaPlayer_lIsFreePromotion
Hooks
static bool BeforeCvLuaPlayer_lIsFreePromotion(lua_State* L, int& result);static void AfterCvLuaPlayer_lIsFreePromotion(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lIsFreePromotion(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lIsFreePromotion>(host, &BeforeCvLuaPlayer_lIsFreePromotion);CivRegisterAfter<CivHooks::CvLuaPlayer_lIsFreePromotion>(host, &AfterCvLuaPlayer_lIsFreePromotion);CivRegisterReplace<CivHooks::CvLuaPlayer_lIsFreePromotion>(host, &ReplaceCvLuaPlayer_lIsFreePromotion);
Code
10125//int IsFreePromotion() const;10126int CvLuaPlayer::lIsFreePromotion(lua_State* L)10127{10128 CvPlayerAI* pkPlayer = GetInstance(L);10129 int iPromotionIndex = lua_tointeger(L, 2);10130 bool bResult = pkPlayer->IsFreePromotion((PromotionTypes)iPromotionIndex);10131 lua_pushboolean(L, bResult);10132 return 1;10133}
Calls
CvLuaScopedInstance::GetInstance- CvPlayer::IsFreePromotion(PromotionTypes) const
lua_pushbooleanlua_tointeger