CvLuaPlayer::lIsMinorPermanentWar(lua_State *)
- Defined in
- Lua/CvLuaPlayer.cpp, line 6548
- Class
- CvLuaPlayer
- Hook name
CivHooks::CvLuaPlayer_lIsMinorPermanentWar
Hooks
static bool BeforeCvLuaPlayer_lIsMinorPermanentWar(lua_State* L, int& result);static void AfterCvLuaPlayer_lIsMinorPermanentWar(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lIsMinorPermanentWar(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lIsMinorPermanentWar>(host, &BeforeCvLuaPlayer_lIsMinorPermanentWar);CivRegisterAfter<CivHooks::CvLuaPlayer_lIsMinorPermanentWar>(host, &AfterCvLuaPlayer_lIsMinorPermanentWar);CivRegisterReplace<CivHooks::CvLuaPlayer_lIsMinorPermanentWar>(host, &ReplaceCvLuaPlayer_lIsMinorPermanentWar);
Code
6548int CvLuaPlayer::lIsMinorPermanentWar(lua_State* L)6549{6550 CvPlayerAI* pkPlayer = GetInstance(L);6551 const TeamTypes eTeam = (TeamTypes) lua_tointeger(L, 2);65526553 const bool bResult = pkPlayer->GetMinorCivAI()->IsPermanentWar(eTeam);6554 lua_pushboolean(L, bResult);6555 return 1;6556}
Calls
CvLuaScopedInstance::GetInstance- CvMinorCivAI::IsPermanentWar(TeamTypes) const
- CvPlayer::GetMinorCivAI() const
lua_pushbooleanlua_tointeger