Bazaar developer reference

CvLuaPlayer::lIsPlayerDoFwithAnyFriend(lua_State *)

Defined in
Lua/CvLuaPlayer.cpp, line 8274
Class
CvLuaPlayer
Hook name
CivHooks::CvLuaPlayer_lIsPlayerDoFwithAnyFriend

Hooks

static bool BeforeCvLuaPlayer_lIsPlayerDoFwithAnyFriend(lua_State* L, int& result);static void AfterCvLuaPlayer_lIsPlayerDoFwithAnyFriend(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lIsPlayerDoFwithAnyFriend(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lIsPlayerDoFwithAnyFriend>(host, &BeforeCvLuaPlayer_lIsPlayerDoFwithAnyFriend);CivRegisterAfter<CivHooks::CvLuaPlayer_lIsPlayerDoFwithAnyFriend>(host, &AfterCvLuaPlayer_lIsPlayerDoFwithAnyFriend);CivRegisterReplace<CivHooks::CvLuaPlayer_lIsPlayerDoFwithAnyFriend>(host, &ReplaceCvLuaPlayer_lIsPlayerDoFwithAnyFriend);

Code

8274int CvLuaPlayer::lIsPlayerDoFwithAnyFriend(lua_State* L)8275{8276	CvPlayerAI* pkPlayer = GetInstance(L);8277	PlayerTypes eWithPlayer = (PlayerTypes) lua_tointeger(L, 2);82788279	const bool bTooSoon = pkPlayer->GetDiplomacyAI()->IsPlayerDoFwithAnyFriend(eWithPlayer);82808281	lua_pushboolean(L, bTooSoon);8282	return 1;8283}

Calls

Called by