CvLuaPlayer::lAddMinorCivQuestIfAble(lua_State *)
- Defined in
- Lua/CvLuaPlayer.cpp, line 7170
- Class
- CvLuaPlayer
- Hook name
CivHooks::CvLuaPlayer_lAddMinorCivQuestIfAble
Hooks
static bool BeforeCvLuaPlayer_lAddMinorCivQuestIfAble(lua_State* L, int& result);static void AfterCvLuaPlayer_lAddMinorCivQuestIfAble(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lAddMinorCivQuestIfAble(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lAddMinorCivQuestIfAble>(host, &BeforeCvLuaPlayer_lAddMinorCivQuestIfAble);CivRegisterAfter<CivHooks::CvLuaPlayer_lAddMinorCivQuestIfAble>(host, &AfterCvLuaPlayer_lAddMinorCivQuestIfAble);CivRegisterReplace<CivHooks::CvLuaPlayer_lAddMinorCivQuestIfAble>(host, &ReplaceCvLuaPlayer_lAddMinorCivQuestIfAble);
Code
7169//bool AddMinorCivQuestIfAble(PlayerTypes eMajor, MinorCivQuestTypes eQuest);7170int CvLuaPlayer::lAddMinorCivQuestIfAble(lua_State* L)7171{7172 CvPlayerAI* pkPlayer = GetInstance(L);7173 PlayerTypes eMajor = (PlayerTypes) lua_tointeger(L, 2);7174 MinorCivQuestTypes eQuest = (MinorCivQuestTypes) lua_tointeger(L, 3);71757176 const bool bResult = pkPlayer->GetMinorCivAI()->AddQuestIfAble(eMajor, eQuest);7177 lua_pushboolean(L, bResult);7178 return 1;7179}
Calls
CvLuaScopedInstance::GetInstance- CvMinorCivAI::AddQuestIfAble(PlayerTypes, MinorCivQuestTypes)
- CvPlayer::GetMinorCivAI() const
lua_pushbooleanlua_tointeger