CvLuaPlayer::lCanMajorWithdrawProtection(lua_State *)
- Defined in
- Lua/CvLuaPlayer.cpp, line 7001
- Class
- CvLuaPlayer
- Hook name
CivHooks::CvLuaPlayer_lCanMajorWithdrawProtection
Hooks
static bool BeforeCvLuaPlayer_lCanMajorWithdrawProtection(lua_State* L, int& result);static void AfterCvLuaPlayer_lCanMajorWithdrawProtection(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lCanMajorWithdrawProtection(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lCanMajorWithdrawProtection>(host, &BeforeCvLuaPlayer_lCanMajorWithdrawProtection);CivRegisterAfter<CivHooks::CvLuaPlayer_lCanMajorWithdrawProtection>(host, &AfterCvLuaPlayer_lCanMajorWithdrawProtection);CivRegisterReplace<CivHooks::CvLuaPlayer_lCanMajorWithdrawProtection>(host, &ReplaceCvLuaPlayer_lCanMajorWithdrawProtection);
Code
7000//bool CanMajorWithdrawProtection(PlayerTypes eMajor);7001int CvLuaPlayer::lCanMajorWithdrawProtection(lua_State* L)7002{7003 CvPlayerAI* pkPlayer = GetInstance(L);7004 PlayerTypes eMajor = (PlayerTypes) lua_tointeger(L, 2);70057006 const bool bResult = pkPlayer->GetMinorCivAI()->CanMajorWithdrawProtection(eMajor);7007 lua_pushboolean(L, bResult);7008 return 1;7009}
Calls
CvLuaScopedInstance::GetInstance- CvMinorCivAI::CanMajorWithdrawProtection(PlayerTypes)
- CvPlayer::GetMinorCivAI() const
lua_pushbooleanlua_tointeger