CvLuaPlayer::lIsDoF(lua_State *)
- Defined in
- Lua/CvLuaPlayer.cpp, line 8252
- Class
- CvLuaPlayer
- Hook name
CivHooks::CvLuaPlayer_lIsDoF
Hooks
static bool BeforeCvLuaPlayer_lIsDoF(lua_State* L, int& result);static void AfterCvLuaPlayer_lIsDoF(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lIsDoF(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lIsDoF>(host, &BeforeCvLuaPlayer_lIsDoF);CivRegisterAfter<CivHooks::CvLuaPlayer_lIsDoF>(host, &AfterCvLuaPlayer_lIsDoF);CivRegisterReplace<CivHooks::CvLuaPlayer_lIsDoF>(host, &ReplaceCvLuaPlayer_lIsDoF);
Code
8251//void IsDoF(PlayerTypes eWithPlayer);8252int CvLuaPlayer::lIsDoF(lua_State* L)8253{8254 CvPlayerAI* pkPlayer = GetInstance(L);8255 PlayerTypes eWithPlayer = (PlayerTypes) lua_tointeger(L, 2);82568257 const bool bTooSoon = pkPlayer->GetDiplomacyAI()->IsDoFAccepted(eWithPlayer);82588259 lua_pushboolean(L, bTooSoon);8260 return 1;8261}
Calls
- CvDiplomacyAI::IsDoFAccepted(PlayerTypes) const
CvLuaScopedInstance::GetInstance- CvPlayer::GetDiplomacyAI() const
lua_pushbooleanlua_tointeger