Bazaar developer reference

CvLuaPlayer::lGetOtherPlayerNumProtectedMinorsAttacked(lua_State *)

Defined in
Lua/CvLuaPlayer.cpp, line 8780
Class
CvLuaPlayer
Hook name
CivHooks::CvLuaPlayer_lGetOtherPlayerNumProtectedMinorsAttacked

Hooks

static bool BeforeCvLuaPlayer_lGetOtherPlayerNumProtectedMinorsAttacked(lua_State* L, int& result);static void AfterCvLuaPlayer_lGetOtherPlayerNumProtectedMinorsAttacked(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lGetOtherPlayerNumProtectedMinorsAttacked(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lGetOtherPlayerNumProtectedMinorsAttacked>(host, &BeforeCvLuaPlayer_lGetOtherPlayerNumProtectedMinorsAttacked);CivRegisterAfter<CivHooks::CvLuaPlayer_lGetOtherPlayerNumProtectedMinorsAttacked>(host, &AfterCvLuaPlayer_lGetOtherPlayerNumProtectedMinorsAttacked);CivRegisterReplace<CivHooks::CvLuaPlayer_lGetOtherPlayerNumProtectedMinorsAttacked>(host, &ReplaceCvLuaPlayer_lGetOtherPlayerNumProtectedMinorsAttacked);

Code

8780int CvLuaPlayer::lGetOtherPlayerNumProtectedMinorsAttacked(lua_State* L)8781{8782	CvPlayerAI* pkPlayer = GetInstance(L);8783	PlayerTypes eOtherPlayer = (PlayerTypes) lua_tointeger(L, 2);87848785	const int iValue = pkPlayer->GetDiplomacyAI()->GetOtherPlayerNumProtectedMinorsAttacked(eOtherPlayer);87868787	lua_pushinteger(L, iValue);8788	return 1;8789}

Calls

Called by