Bazaar developer reference

CvLuaPlayer::lIsProtectingMinor(lua_State *)

Defined in
Lua/CvLuaPlayer.cpp, line 8177
Class
CvLuaPlayer
Hook name
CivHooks::CvLuaPlayer_lIsProtectingMinor

Hooks

static bool BeforeCvLuaPlayer_lIsProtectingMinor(lua_State* L, int& result);static void AfterCvLuaPlayer_lIsProtectingMinor(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lIsProtectingMinor(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lIsProtectingMinor>(host, &BeforeCvLuaPlayer_lIsProtectingMinor);CivRegisterAfter<CivHooks::CvLuaPlayer_lIsProtectingMinor>(host, &AfterCvLuaPlayer_lIsProtectingMinor);CivRegisterReplace<CivHooks::CvLuaPlayer_lIsProtectingMinor>(host, &ReplaceCvLuaPlayer_lIsProtectingMinor);

Code

8176//void IsProtectingMinor(PlayerTypes ePlayer);8177int CvLuaPlayer::lIsProtectingMinor(lua_State* L)8178{8179	CvPlayerAI* pkPlayer = GetInstance(L);8180	PlayerTypes eMinor = (PlayerTypes) lua_tointeger(L, 2);81818182	const bool bProtecting = GET_PLAYER(eMinor).GetMinorCivAI()->IsProtectedByMajor(pkPlayer->GetID());81838184	lua_pushboolean(L, bProtecting);8185	return 1;8186}

Calls

Called by