CvLuaPlayer::lWasResurrectedThisTurnBy(lua_State *)
- Defined in
- Lua/CvLuaPlayer.cpp, line 10354
- Class
- CvLuaPlayer
- Hook name
CivHooks::CvLuaPlayer_lWasResurrectedThisTurnBy
Hooks
static bool BeforeCvLuaPlayer_lWasResurrectedThisTurnBy(lua_State* L, int& result);static void AfterCvLuaPlayer_lWasResurrectedThisTurnBy(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lWasResurrectedThisTurnBy(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lWasResurrectedThisTurnBy>(host, &BeforeCvLuaPlayer_lWasResurrectedThisTurnBy);CivRegisterAfter<CivHooks::CvLuaPlayer_lWasResurrectedThisTurnBy>(host, &AfterCvLuaPlayer_lWasResurrectedThisTurnBy);CivRegisterReplace<CivHooks::CvLuaPlayer_lWasResurrectedThisTurnBy>(host, &ReplaceCvLuaPlayer_lWasResurrectedThisTurnBy);
Code
10354int CvLuaPlayer::lWasResurrectedThisTurnBy(lua_State* L)10355{10356 CvPlayerAI* pkPlayer = GetInstance(L);10357 PlayerTypes eWithPlayer = (PlayerTypes) lua_tointeger(L, 2);1035810359 const bool bResurrected = pkPlayer->GetDiplomacyAI()->WasResurrectedThisTurnBy(eWithPlayer);1036010361 lua_pushboolean(L, bResurrected);10362 return 1;10363}
Calls
- CvDiplomacyAI::WasResurrectedThisTurnBy(PlayerTypes) const
CvLuaScopedInstance::GetInstance- CvPlayer::GetDiplomacyAI() const
lua_pushbooleanlua_tointeger