CvLuaPlayer::lIsCapitalCapturedBy(lua_State *)
- Defined in
- Lua/CvLuaPlayer.cpp, line 8926
- Class
- CvLuaPlayer
- Hook name
CivHooks::CvLuaPlayer_lIsCapitalCapturedBy
Hooks
static bool BeforeCvLuaPlayer_lIsCapitalCapturedBy(lua_State* L, int& result);static void AfterCvLuaPlayer_lIsCapitalCapturedBy(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lIsCapitalCapturedBy(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lIsCapitalCapturedBy>(host, &BeforeCvLuaPlayer_lIsCapitalCapturedBy);CivRegisterAfter<CivHooks::CvLuaPlayer_lIsCapitalCapturedBy>(host, &AfterCvLuaPlayer_lIsCapitalCapturedBy);CivRegisterReplace<CivHooks::CvLuaPlayer_lIsCapitalCapturedBy>(host, &ReplaceCvLuaPlayer_lIsCapitalCapturedBy);
Code
8926int CvLuaPlayer::lIsCapitalCapturedBy(lua_State* L)8927{8928 CvPlayerAI* pkPlayer = GetInstance(L);8929 PlayerTypes eOtherPlayer = (PlayerTypes) lua_tointeger(L, 2);89308931 const bool bValue = pkPlayer->GetDiplomacyAI()->IsCapitalCapturedBy(eOtherPlayer);89328933 lua_pushboolean(L, bValue);8934 return 1;8935}
Calls
- CvDiplomacyAI::IsCapitalCapturedBy(PlayerTypes)
CvLuaScopedInstance::GetInstance- CvPlayer::GetDiplomacyAI() const
lua_pushbooleanlua_tointeger