Bazaar developer reference

CvLuaPlayer::lIsPlayerForgivenForSpying(lua_State *)

Defined in
Lua/CvLuaPlayer.cpp, line 8703
Class
CvLuaPlayer
Hook name
CivHooks::CvLuaPlayer_lIsPlayerForgivenForSpying

Hooks

static bool BeforeCvLuaPlayer_lIsPlayerForgivenForSpying(lua_State* L, int& result);static void AfterCvLuaPlayer_lIsPlayerForgivenForSpying(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lIsPlayerForgivenForSpying(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lIsPlayerForgivenForSpying>(host, &BeforeCvLuaPlayer_lIsPlayerForgivenForSpying);CivRegisterAfter<CivHooks::CvLuaPlayer_lIsPlayerForgivenForSpying>(host, &AfterCvLuaPlayer_lIsPlayerForgivenForSpying);CivRegisterReplace<CivHooks::CvLuaPlayer_lIsPlayerForgivenForSpying>(host, &ReplaceCvLuaPlayer_lIsPlayerForgivenForSpying);

Code

8703int CvLuaPlayer::lIsPlayerForgivenForSpying(lua_State* L)8704{8705	CvPlayerAI* pkPlayer = GetInstance(L);8706	PlayerTypes eOtherPlayer = (PlayerTypes) lua_tointeger(L, 2);87078708	const bool bValue = pkPlayer->GetDiplomacyAI()->IsPlayerForgaveForSpying(eOtherPlayer);87098710	lua_pushboolean(L, bValue);8711	return 1;8712}

Calls

Called by