Bazaar developer reference

CvLuaUnit::lSetMadeAttack(lua_State *)

Defined in
Lua/CvLuaUnit.cpp, line 4481
Class
CvLuaUnit
Hook name
CivHooks::CvLuaUnit_lSetMadeAttack

Hooks

static bool BeforeCvLuaUnit_lSetMadeAttack(lua_State* L, int& result);static void AfterCvLuaUnit_lSetMadeAttack(lua_State* L, int& result);static int ReplaceCvLuaUnit_lSetMadeAttack(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaUnit_lSetMadeAttack>(host, &BeforeCvLuaUnit_lSetMadeAttack);CivRegisterAfter<CivHooks::CvLuaUnit_lSetMadeAttack>(host, &AfterCvLuaUnit_lSetMadeAttack);CivRegisterReplace<CivHooks::CvLuaUnit_lSetMadeAttack>(host, &ReplaceCvLuaUnit_lSetMadeAttack);

Code

4480//void setMadeAttack(bool bNewValue);4481int CvLuaUnit::lSetMadeAttack(lua_State* L)4482{4483	CvUnit* pkUnit = GetInstance(L);4484	const bool bNewValue = lua_toboolean(L, 2);44854486	pkUnit->setMadeAttack(bNewValue);4487	return 0;4488}

Calls

Called by