CvLuaGame::lDoMinorPledgeProtection(lua_State *)
- Defined in
- Lua/CvLuaGame.cpp, line 1822
- Class
- CvLuaGame
- Hook name
CivHooks::CvLuaGame_lDoMinorPledgeProtection
Hooks
static bool BeforeCvLuaGame_lDoMinorPledgeProtection(lua_State* L, int& result);static void AfterCvLuaGame_lDoMinorPledgeProtection(lua_State* L, int& result);static int ReplaceCvLuaGame_lDoMinorPledgeProtection(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaGame_lDoMinorPledgeProtection>(host, &BeforeCvLuaGame_lDoMinorPledgeProtection);CivRegisterAfter<CivHooks::CvLuaGame_lDoMinorPledgeProtection>(host, &AfterCvLuaGame_lDoMinorPledgeProtection);CivRegisterReplace<CivHooks::CvLuaGame_lDoMinorPledgeProtection>(host, &ReplaceCvLuaGame_lDoMinorPledgeProtection);
Code
1821//void DoMinorPledgeProtection(int iMajorCivID, int iMinorCivID, bool bProtect);1822int CvLuaGame::lDoMinorPledgeProtection(lua_State* L)1823{1824 const int iMajor = lua_tointeger(L, 1);1825 const int iMinor = lua_tointeger(L, 2);1826 const bool bProtect = lua_toboolean(L, 3);1827 GC.getGame().DoMinorPledgeProtection((PlayerTypes)iMajor, (PlayerTypes)iMinor, bProtect);18281829 return 1;1830}
Calls
- CvGame::DoMinorPledgeProtection(PlayerTypes, PlayerTypes, bool, bool)
- CvGlobals::getGame()
lua_tobooleanlua_tointeger