Bazaar developer reference

CvLuaPlayer::lIsMyDiplomatVisitingThem(lua_State *)

Defined in
Lua/CvLuaPlayer.cpp, line 11770
Class
CvLuaPlayer
Hook name
CivHooks::CvLuaPlayer_lIsMyDiplomatVisitingThem

Hooks

static bool BeforeCvLuaPlayer_lIsMyDiplomatVisitingThem(lua_State* L, int& result);static void AfterCvLuaPlayer_lIsMyDiplomatVisitingThem(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lIsMyDiplomatVisitingThem(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lIsMyDiplomatVisitingThem>(host, &BeforeCvLuaPlayer_lIsMyDiplomatVisitingThem);CivRegisterAfter<CivHooks::CvLuaPlayer_lIsMyDiplomatVisitingThem>(host, &AfterCvLuaPlayer_lIsMyDiplomatVisitingThem);CivRegisterReplace<CivHooks::CvLuaPlayer_lIsMyDiplomatVisitingThem>(host, &ReplaceCvLuaPlayer_lIsMyDiplomatVisitingThem);

Code

11770int CvLuaPlayer::lIsMyDiplomatVisitingThem(lua_State* L)11771{11772	CvPlayerAI* pkThisPlayer = GetInstance(L);11773	CvPlayerEspionage* pkPlayerEspionage = pkThisPlayer->GetEspionage();11774	PlayerTypes eOtherPlayer = (PlayerTypes) lua_tointeger(L, 2);1177511776	const bool bValue = pkPlayerEspionage->IsMyDiplomatVisitingThem(eOtherPlayer);11777	lua_pushboolean(L, bValue);11778	return 1;11779}

Calls

Called by