CvLuaPlayer::lWasResurrectedBy(lua_State *)
- Defined in
- Lua/CvLuaPlayer.cpp, line 10342
- Class
- CvLuaPlayer
- Hook name
CivHooks::CvLuaPlayer_lWasResurrectedBy
Hooks
static bool BeforeCvLuaPlayer_lWasResurrectedBy(lua_State* L, int& result);static void AfterCvLuaPlayer_lWasResurrectedBy(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lWasResurrectedBy(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lWasResurrectedBy>(host, &BeforeCvLuaPlayer_lWasResurrectedBy);CivRegisterAfter<CivHooks::CvLuaPlayer_lWasResurrectedBy>(host, &AfterCvLuaPlayer_lWasResurrectedBy);CivRegisterReplace<CivHooks::CvLuaPlayer_lWasResurrectedBy>(host, &ReplaceCvLuaPlayer_lWasResurrectedBy);
Code
10342int CvLuaPlayer::lWasResurrectedBy(lua_State* L)10343{10344 CvPlayerAI* pkPlayer = GetInstance(L);10345 PlayerTypes eWithPlayer = (PlayerTypes) lua_tointeger(L, 2);1034610347 const bool bResurrected = pkPlayer->GetDiplomacyAI()->WasResurrectedBy(eWithPlayer);1034810349 lua_pushboolean(L, bResurrected);10350 return 1;10351}
Calls
- CvDiplomacyAI::WasResurrectedBy(PlayerTypes) const
CvLuaScopedInstance::GetInstance- CvPlayer::GetDiplomacyAI() const
lua_pushbooleanlua_tointeger