CvLuaPlayer::lIsSpyDiplomat(lua_State *)
- Defined in
- Lua/CvLuaPlayer.cpp, line 11582
- Class
- CvLuaPlayer
- Hook name
CivHooks::CvLuaPlayer_lIsSpyDiplomat
Hooks
static bool BeforeCvLuaPlayer_lIsSpyDiplomat(lua_State* L, int& result);static void AfterCvLuaPlayer_lIsSpyDiplomat(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lIsSpyDiplomat(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lIsSpyDiplomat>(host, &BeforeCvLuaPlayer_lIsSpyDiplomat);CivRegisterAfter<CivHooks::CvLuaPlayer_lIsSpyDiplomat>(host, &AfterCvLuaPlayer_lIsSpyDiplomat);CivRegisterReplace<CivHooks::CvLuaPlayer_lIsSpyDiplomat>(host, &ReplaceCvLuaPlayer_lIsSpyDiplomat);
Code
11582int CvLuaPlayer::lIsSpyDiplomat(lua_State* L)11583{11584 CvPlayer* pkPlayer = GetInstance(L);11585 int iSpyIndex = lua_tointeger(L, 2);11586 bool bIsDiplomat = pkPlayer->GetEspionage()->IsDiplomat(iSpyIndex);1158711588 lua_pushboolean(L, bIsDiplomat);11589 return 1;11590}
Calls
CvLuaScopedInstance::GetInstance- CvPlayer::GetEspionage() const
- CvPlayerEspionage::IsDiplomat(uint)
lua_pushbooleanlua_tointeger