CvLuaPlayer::lGetAlly(lua_State *)
- Defined in
- Lua/CvLuaPlayer.cpp, line 6438
- Class
- CvLuaPlayer
- Hook name
CivHooks::CvLuaPlayer_lGetAlly
Hooks
static bool BeforeCvLuaPlayer_lGetAlly(lua_State* L, int& result);static void AfterCvLuaPlayer_lGetAlly(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lGetAlly(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lGetAlly>(host, &BeforeCvLuaPlayer_lGetAlly);CivRegisterAfter<CivHooks::CvLuaPlayer_lGetAlly>(host, &AfterCvLuaPlayer_lGetAlly);CivRegisterReplace<CivHooks::CvLuaPlayer_lGetAlly>(host, &ReplaceCvLuaPlayer_lGetAlly);
Code
6438int CvLuaPlayer::lGetAlly(lua_State* L)6439{6440 CvPlayerAI* pkPlayer = GetInstance(L);64416442 const int iResult = pkPlayer->GetMinorCivAI()->GetAlly();6443 lua_pushinteger(L, iResult);6444 return 1;6445}
Calls
CvLuaScopedInstance::GetInstance- CvMinorCivAI::GetAlly() const
- CvPlayer::GetMinorCivAI() const
lua_pushinteger