CvLuaPlayer::lIsPeaceBlocked(lua_State *)
- Defined in
- Lua/CvLuaPlayer.cpp, line 6538
- Class
- CvLuaPlayer
- Hook name
CivHooks::CvLuaPlayer_lIsPeaceBlocked
Hooks
static bool BeforeCvLuaPlayer_lIsPeaceBlocked(lua_State* L, int& result);static void AfterCvLuaPlayer_lIsPeaceBlocked(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lIsPeaceBlocked(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lIsPeaceBlocked>(host, &BeforeCvLuaPlayer_lIsPeaceBlocked);CivRegisterAfter<CivHooks::CvLuaPlayer_lIsPeaceBlocked>(host, &AfterCvLuaPlayer_lIsPeaceBlocked);CivRegisterReplace<CivHooks::CvLuaPlayer_lIsPeaceBlocked>(host, &ReplaceCvLuaPlayer_lIsPeaceBlocked);
Code
6538int CvLuaPlayer::lIsPeaceBlocked(lua_State* L)6539{6540 CvPlayerAI* pkPlayer = GetInstance(L);6541 const TeamTypes eTeam = (TeamTypes) lua_tointeger(L, 2);65426543 const bool bResult = pkPlayer->GetMinorCivAI()->IsPeaceBlocked(eTeam);6544 lua_pushboolean(L, bResult);6545 return 1;6546}
Calls
CvLuaScopedInstance::GetInstance- CvMinorCivAI::IsPeaceBlocked(TeamTypes) const
- CvPlayer::GetMinorCivAI() const
lua_pushbooleanlua_tointeger