CvLuaPlayer::lIsAllies(lua_State *)
- Defined in
- Lua/CvLuaPlayer.cpp, line 6466
- Class
- CvLuaPlayer
- Hook name
CivHooks::CvLuaPlayer_lIsAllies
Hooks
static bool BeforeCvLuaPlayer_lIsAllies(lua_State* L, int& result);static void AfterCvLuaPlayer_lIsAllies(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lIsAllies(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lIsAllies>(host, &BeforeCvLuaPlayer_lIsAllies);CivRegisterAfter<CivHooks::CvLuaPlayer_lIsAllies>(host, &AfterCvLuaPlayer_lIsAllies);CivRegisterReplace<CivHooks::CvLuaPlayer_lIsAllies>(host, &ReplaceCvLuaPlayer_lIsAllies);
Code
6466int CvLuaPlayer::lIsAllies(lua_State* L)6467{6468 CvPlayerAI* pkPlayer = GetInstance(L);6469 const PlayerTypes ePlayer = (PlayerTypes) lua_tointeger(L, 2);64706471 const bool bResult = pkPlayer->GetMinorCivAI()->IsAllies(ePlayer);6472 lua_pushboolean(L, bResult);6473 return 1;6474}
Calls
CvLuaScopedInstance::GetInstance- CvMinorCivAI::IsAllies(PlayerTypes) const
- CvPlayer::GetMinorCivAI() const
lua_pushbooleanlua_tointeger