Bazaar developer reference

CvLuaUnit::lIsNearGreatGeneral(lua_State *)

Defined in
Lua/CvLuaUnit.cpp, line 4628
Class
CvLuaUnit
Hook name
CivHooks::CvLuaUnit_lIsNearGreatGeneral

Hooks

static bool BeforeCvLuaUnit_lIsNearGreatGeneral(lua_State* L, int& result);static void AfterCvLuaUnit_lIsNearGreatGeneral(lua_State* L, int& result);static int ReplaceCvLuaUnit_lIsNearGreatGeneral(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaUnit_lIsNearGreatGeneral>(host, &BeforeCvLuaUnit_lIsNearGreatGeneral);CivRegisterAfter<CivHooks::CvLuaUnit_lIsNearGreatGeneral>(host, &AfterCvLuaUnit_lIsNearGreatGeneral);CivRegisterReplace<CivHooks::CvLuaUnit_lIsNearGreatGeneral>(host, &ReplaceCvLuaUnit_lIsNearGreatGeneral);

Code

4627//bool IsNearGreatGeneral();4628int CvLuaUnit::lIsNearGreatGeneral(lua_State* L)4629{4630	CvUnit* pkUnit = GetInstance(L);46314632#if defined(MOD_PROMOTIONS_AURA_CHANGE)4633	int iAuraEffectChange = 0;4634	const bool bResult = pkUnit->IsNearGreatGeneral(iAuraEffectChange);4635	lua_pushboolean(L, bResult);4636	lua_pushinteger(L, iAuraEffectChange);4637	return 2;4638#else4639	const bool bResult = pkUnit->IsNearGreatGeneral();4640	lua_pushboolean(L, bResult);4641	return 1;4642#endif4643}

Calls

Called by