CvLuaPlayer::lIsPlayerDoFwithAnyEnemy(lua_State *)
- Defined in
- Lua/CvLuaPlayer.cpp, line 8285
- Class
- CvLuaPlayer
- Hook name
CivHooks::CvLuaPlayer_lIsPlayerDoFwithAnyEnemy
Hooks
static bool BeforeCvLuaPlayer_lIsPlayerDoFwithAnyEnemy(lua_State* L, int& result);static void AfterCvLuaPlayer_lIsPlayerDoFwithAnyEnemy(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lIsPlayerDoFwithAnyEnemy(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lIsPlayerDoFwithAnyEnemy>(host, &BeforeCvLuaPlayer_lIsPlayerDoFwithAnyEnemy);CivRegisterAfter<CivHooks::CvLuaPlayer_lIsPlayerDoFwithAnyEnemy>(host, &AfterCvLuaPlayer_lIsPlayerDoFwithAnyEnemy);CivRegisterReplace<CivHooks::CvLuaPlayer_lIsPlayerDoFwithAnyEnemy>(host, &ReplaceCvLuaPlayer_lIsPlayerDoFwithAnyEnemy);
Code
8285int CvLuaPlayer::lIsPlayerDoFwithAnyEnemy(lua_State* L)8286{8287 CvPlayerAI* pkPlayer = GetInstance(L);8288 PlayerTypes eWithPlayer = (PlayerTypes) lua_tointeger(L, 2);82898290 const bool bTooSoon = pkPlayer->GetDiplomacyAI()->IsPlayerDoFwithAnyEnemy(eWithPlayer);82918292 lua_pushboolean(L, bTooSoon);8293 return 1;8294}
Calls
- CvDiplomacyAI::IsPlayerDoFwithAnyEnemy(PlayerTypes) const
CvLuaScopedInstance::GetInstance- CvPlayer::GetDiplomacyAI() const
lua_pushbooleanlua_tointeger